Permalink
Browse files

Merge pull request #9 from redcanaryco/target-hostname

Add option to target a specific username
  • Loading branch information...
keithmccammon committed Jan 12, 2018
2 parents 6c6d3cc + 5b1018e commit e6f7afc99215e30e7c0d78d7dcef338aa66345c2
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 e6f7afc

Please sign in to comment.