def __init__(self): self._proxy_info = None self._proxy = None self.local = False self.extensive = False self._threshold = 0 self._timeout = None self._timeout_in_secs = None self.ast_debug = False self.http_debug = 0 self._useragent = 'winxpie60' self._referer = 'about:blank' self._events = list() self._delay = 0 self._file_logging = False self._json_logging = False self._maec11_logging = False self._es_logging = False self._no_fetch = False self._broken_url = False self._vt_query = False self._vt_submit = False self._vt_runtime_apikey = None self._mongodb_address = None self._web_tracking = False self._honeyagent = True self._cache = '/tmp/thug-cache-%s' % (os.getuid(), ) self.Personality = Personality()
def usage(self): msg = """ Synopsis: Thug: Pure Python honeyclient implementation Usage: python thug.py [ options ] url Options: -h, --help \tDisplay this help information -o, --output= \tLog to a specified file -r, --referer= \tSpecify a referer -p, --proxy= \tSpecify a proxy (see below for format and supported schemes) -l, --local -v, --verbose \tEnable verbose mode -d, --debug \tEnable debug mode -u, --useragent= \tSelect a user agent (see below for values, default: xpie61) Proxy Format: scheme://[username:password@]host:port (supported schemes: http, socks4, socks5) Available User-Agents: """ for key, value in sorted(Personality.iteritems(), key = lambda (k, v): (v['id'], k)): msg += "\t%s\t\t\t%s\n" % (key, value['description'], ) print msg sys.exit(0)
def __init__(self): self._proxy_info = None self.local = False self.extensive = False self._threshold = 0 self._timeout = None self.ast_debug = False self._useragent = 'winxpie60' self._referer = 'about:blank' self._events = list() self._delay = 0 self._no_fetch = False self._cache = '/tmp/thug-cache-%s' % (os.getuid(), ) self.Personality = Personality()
def usage(self): msg = """ Synopsis: Thug: Pure Python honeyclient implementation Usage: python thug.py [ options ] url Options: -h, --help \tDisplay this help information -o, --output= \tLog to a specified file -l, --local -v, --verbose \tEnable verbose mode -d, --debug \tEnable debug mode -u, --useragent= \tSelect a user agent (see below for values, default: xpie61) Available User-Agents: """ for key, value in sorted(Personality.iteritems(), key = lambda (k, v): (v['id'], k)): msg += "\t%s\t\t\t%s\n" % (key, value['description'], ) print msg sys.exit(0)
def get_personalities(): return [('', 'Default')] + \ sorted([(x, y['description'].replace('\t', ' ')) for x, y in Personality().iteritems()], key=lambda x: x[1])