Esempio n. 1
0
def do_scan_thread():
    global glo_pkg_list
    global glo_lock
    global glo_scanner

    req2file = format_save('')
    while True:
        glo_lock.acquire()
        if len(glo_pkg_list) > 0:
            pkg = json.loads(glo_pkg_list.pop(0))
            glo_lock.release()

            if glo_conf['server_host'] != '*':
                req2file.save_request(pkg['method'], pkg['uri'],
                                      pkg['version'], pkg['header'],
                                      pkg['body'])

            # do all test here
            for fun in glo_scanner:
                fun.run(pkg['method'], pkg['uri'], pkg['version'],
                        pkg['header'], pkg['body'])
            # test finished
        else:
            glo_lock.release()
            time.sleep(1)
Esempio n. 2
0
 def __init__(self):
     self.filecnt = 1
     with open('config.json', 'r') as fp:
         self.conf = json.loads(fp.read())
     self.log = format_save('unauth')
     self.checkpkg = check_repeat_package(key_with_value=True)
     self.name = 'unauth access'
Esempio n. 3
0
 def __init__(self):
     self.filecnt = 1
     with open('config.json', 'r') as fp:
         self.conf = json.loads(fp.read())
     self.name = 'unauth'
     self.log = format_save(self.name)
     self.httptimeout = 10
     self.http_client = None
     self.checkpkg = check_repeat_package(key_with_value=True)
Esempio n. 4
0
 def __init__(self):
     with open('config.json', 'r') as fp:
         self.conf = json.loads(fp.read())
     self.name = 'CMDi'
     self.log = format_save(self.name)
     self.checkpkg = check_repeat_package(key_with_value=False)
     self.blind_timeout = 10
     self.http_client = None
     with open(self.conf['cmdi_payload'], "r") as fp:
         self.payloads = fp.read().replace(
             'PH_TIMEOUT', str(self.blind_timeout)).split('\n')
Esempio n. 5
0
 def __init__(self):
     with open('config.json', 'r') as fp:
         self.conf = json.loads(fp.read())
     self.name = 'SQLi'
     self.log = format_save('SQLi')
     self.checkpkg = check_repeat_package(key_with_value=False)