Improved Documentation
This commit is contained in:
parent
d343cd2bbf
commit
81c46a31bc
33
README.md
33
README.md
@ -24,7 +24,8 @@ By default, several plugins are included.
|
||||
### Usage
|
||||
|
||||
```
|
||||
usage: ifxlookup [-h] [-c CONFIG] [-f FILTER] [-j] [-cg] [-b] [-l] [-gc] [-d] [-cms] [-vm] [-r] [-w] [-s] [-fw] [-m] [-v] subjects [subjects ...]
|
||||
usage: ifxlookup [-h] [-c CONFIG] [-f FILTER] [-j] [-cg] [-b] [-l] [-gc] [-d] [-cms] [-vm] [-r] [-w] [-s] [-fw] [-m] [-v]
|
||||
subjects [subjects ...]
|
||||
|
||||
positional arguments:
|
||||
subjects IP's, hostnames, MAC's, usernames, or other strings to look up.
|
||||
@ -36,18 +37,18 @@ optional arguments:
|
||||
-f FILTER, --filter FILTER
|
||||
Apply a JSONPath filter to the results (multiple filters may be specified)
|
||||
-j, --json Format output as json
|
||||
-cg, --vip Return VIP information about the subject (f5)
|
||||
-b, --bluecat Return network information about the subject (bluecat)
|
||||
-l, --ldap Return LDAP information about the subject (ldap)
|
||||
-gc, --guid_channels Return working channels for GUID
|
||||
-d, --dns Return DNS resolution about the subject (dns)
|
||||
-cms, --channel Return CMS channel info about the subject (cms)
|
||||
-vm, --vm Return VMWare information about the subject (vmware)
|
||||
-r, --vpn Return VPN information about the subject (openvpn)
|
||||
-w, --wifi Return wireless connection information about the subject (aruba)
|
||||
-s, --shodan Return Shodan information about the subject (dns)
|
||||
-fw, --rules Return Firewall addresses, groups, and rules relating to the subject
|
||||
-m, --mac Return vendor OUI from a MAC address (mac)
|
||||
-cg, --vip VIP information about the subject (f5)
|
||||
-b, --bluecat Bluecat information about the subject (bluecat)
|
||||
-l, --ldap LDAP information about the subject (ldap)
|
||||
-gc, --guid_channels Working channels for GUID
|
||||
-d, --dns DNS resolution about the subject (dns)
|
||||
-cms, --channel CMS channel info about the subject (cms)
|
||||
-vm, --vm VMWare information about the subject (vmware)
|
||||
-r, --vpn VPN log information about the subject (openvpn)
|
||||
-w, --wifi Wireless connection information about the subject (aruba)
|
||||
-s, --shodan Shodan information about the subject (dns)
|
||||
-fw, --rules Firewall addresses, groups, and rules relating to the subject
|
||||
-m, --mac Vendor OUI from a MAC address (mac)
|
||||
-v, --debug Include debug information in the output. Add 'v's for more output.
|
||||
```
|
||||
|
||||
@ -110,6 +111,11 @@ To find the email addresses of all LDAP users whose username starts with 'daniel
|
||||
ifxlookup -l daniel -f '*.ldap.*.mail[0]'
|
||||
```
|
||||
|
||||
To find the callsign of a channel with channel id '24696f5c20ad4d1490111064f0b32dc1':
|
||||
```sh
|
||||
ifxlookup -cms 24696f5c20ad4d1490111064f0b32dc1 -f '*.cms.channels[0].yaml_configuration_version.channel_title'
|
||||
```
|
||||
|
||||
To find the operating systems installed on all VM's with 'ifxes' in the name:
|
||||
```sh
|
||||
ifxlookup --vm ifxes -f "*.vmware[*].guest.full_name.default_message"
|
||||
@ -291,4 +297,3 @@ each into a text file for storage.
|
||||
## Known issues with this version:
|
||||
|
||||
* Caching is not yet implemented
|
||||
* VMWare plugins are not finished
|
||||
|
@ -17,7 +17,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return ['-w', '--wifi', 'store_true', 'Return wireless connection information about the subject (aruba)']
|
||||
return ['-w', '--wifi', 'store_true', 'Wireless connection information about the subject (aruba)']
|
||||
|
||||
def startup(self) :
|
||||
for requirement in ['host','username','key'] :
|
||||
|
@ -13,7 +13,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
_max_results = 1000
|
||||
|
||||
def get_arguments(cls) :
|
||||
return ['-b', '--bluecat', 'store_true', 'Return network information about the subject (bluecat)']
|
||||
return ['-b', '--bluecat', 'store_true', 'Bluecat information about the subject (bluecat)']
|
||||
|
||||
def startup(self) :
|
||||
for requirement in ['host','username','key','page_size','max_results'] :
|
||||
|
@ -7,7 +7,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-cms','--channel', 'store_true', "Return CMS channel info about the subject (cms)" ]
|
||||
return [ '-cms','--channel', 'store_true', "CMS channel info about the subject (cms)" ]
|
||||
|
||||
def startup(self) :
|
||||
pass
|
||||
|
@ -8,7 +8,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-d', '--dns', 'store_true', 'Return DNS resolution about the subject (dns)' ]
|
||||
return [ '-d', '--dns', 'store_true', 'DNS resolution about the subject (dns)' ]
|
||||
|
||||
def startup(self) :
|
||||
self.resolver = dns.resolver.Resolver()
|
||||
|
@ -13,7 +13,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
_partition = 'Common'
|
||||
|
||||
def get_arguments(cls) :
|
||||
return ['-cg', '--vip', 'store_true', 'Return VIP information about the subject (f5)']
|
||||
return ['-cg', '--vip', 'store_true', 'VIP information about the subject (f5)']
|
||||
|
||||
def startup(self) :
|
||||
for requirement in ['hosts','username','key'] :
|
||||
|
@ -7,7 +7,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-gc','--guid_channels', 'store_true', 'Return working channels for GUID' ]
|
||||
return [ '-gc','--guid_channels', 'store_true', 'Working channels for GUID' ]
|
||||
|
||||
def startup(self) :
|
||||
|
||||
|
@ -6,7 +6,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-l', '--ldap', 'store_true', 'Return LDAP information about the subject (ldap)' ]
|
||||
return [ '-l', '--ldap', 'store_true', 'LDAP information about the subject (ldap)' ]
|
||||
|
||||
def startup(self) :
|
||||
for requirement in ['host','bind_string','bind_key','search_base','scope','filter_string'] :
|
||||
|
@ -6,7 +6,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-m', '--mac', 'store_true', 'Return vendor OUI from a MAC address (mac)' ]
|
||||
return [ '-m', '--mac', 'store_true', 'Vendor OUI from a MAC address (mac)' ]
|
||||
|
||||
def lookup(self,subject) :
|
||||
self.debug('Requesting MAC info from API...',1)
|
||||
|
@ -9,7 +9,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return ['-r', '--vpn','store_true','Return VPN information about the subject (openvpn)']
|
||||
return ['-r', '--vpn','store_true','VPN log information about the subject (openvpn)']
|
||||
|
||||
def startup(self) :
|
||||
for requirement in ['hosts','username','key'] :
|
||||
|
@ -9,7 +9,7 @@ RULE_SEARCH_FIELDS = ['to','from','source','destination']
|
||||
class ServiceDelegate(ServiceBase) :
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return ['-fw', '--rules', 'store_true', 'Return Firewall addresses, groups, and rules relating to the subject']
|
||||
return ['-fw', '--rules', 'store_true', 'Firewall addresses, groups, and rules relating to the subject']
|
||||
|
||||
def startup(self) :
|
||||
if not self.config_valid() :
|
||||
|
@ -11,7 +11,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-s', '--shodan', 'store_true', 'Return Shodan information about the subject (dns)' ]
|
||||
return [ '-s', '--shodan', 'store_true', 'Shodan information about the subject (dns)' ]
|
||||
|
||||
def startup(self) :
|
||||
for requirement in ['keys'] :
|
||||
|
@ -8,7 +8,7 @@ class ServiceDelegate(ServiceBase) :
|
||||
|
||||
def get_arguments(cls) :
|
||||
"""Returns an array of information used to construct an argumentparser argument."""
|
||||
return [ '-vm', '--vm', 'store_true', "Return VMWare information about the subject (vmware)" ]
|
||||
return [ '-vm', '--vm', 'store_true', "VMWare information about the subject (vmware)" ]
|
||||
|
||||
def startup(self) :
|
||||
# Verify config
|
||||
|
2
setup.py
2
setup.py
@ -14,6 +14,6 @@ setup(name='ifxlookup',
|
||||
package_data={"": ['plugins/*.py']},
|
||||
install_requires=['dnspython','jsonpath-ng','paramiko','PyYAML','requests','shodan','ldap3','vsphere-automation-sdk @ git+https://github.com/vmware/vsphere-automation-sdk-python.git'],
|
||||
scripts=['bin/ifxlookup'],
|
||||
long_description=open('README').read(),
|
||||
long_description=open('README.md').read(),
|
||||
zip_safe=True
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user