Permalink
Browse files

Add option to target a specific username

  • Loading branch information...
keithmccammon committed Jan 12, 2018
1 parent c487478 commit 5b1018e94f85981d6922b13756be4f1ba7532d9c
Showing with 7 additions and 0 deletions.
  1. +7 −0 surveyor.py
@@ -115,6 +115,8 @@ def main():
help="IOC file to process. One IOC per line. REQUIRES --ioctype")
parser.add_argument('--hostname', type=str, action="store",
help="Target specific host by name.")
parser.add_argument('--username', type=str, action="store",
help="Target specific username.")
# IOC survey criteria
parser.add_argument('--ioctype', type=str, action="store",
@@ -141,6 +143,11 @@ def main():
parser.error('Cannot use --hostname with "hostname:" (in query)')
query_base += ' hostname:%s' % args.hostname
if args.username:
if args.query and 'username' in args.query:
parser.error('Cannot use --username with "username:" (in query)')
query_base += ' username:%s' % args.username
definition_files = []
if args.deffile:
if not os.path.exists(args.deffile):

0 comments on commit 5b1018e

Please sign in to comment.