Ejemplo n.º 1
0
def web_app_identify():
    site_list = ["http://10.0.83.6:81/login.php"]
    site_info_list = services.fetch_site(site_list)
    web_analyze_map = {}
    for site_info in site_info_list:
        curr_site = site_info["site"]
        finger_list = [{
            'name': 'xxx',
            'confidence': '80',
            'version': '',
            'icon': 'default.png',
            'website': 'https://www.riskivy.com',
            'categories': []
        }]

        site_info["finger"] = finger_list

        web_app_finger = services.web_app_identify(site_info)
        flag = False
        if web_app_finger and finger_list:
            for finger in finger_list:
                if finger["name"].lower() == web_app_finger["name"].lower():
                    flag = True
                    break

        if not flag and web_app_finger:
            finger_list.append(web_app_finger)

        print(site_info["finger"])
Ejemplo n.º 2
0
    def fetch_site(self):
        '''***站点信息获取***'''
        site_info_list = services.fetch_site(self.site_list)
        self.site_info_list = site_info_list
        for site_info in site_info_list:
            curr_site = site_info["site"]
            if curr_site not in self.site_list:
                self.site_302_list.append(curr_site)
            site_path = "/image/" + self.task_id
            file_name = '{}/{}.jpg'.format(site_path,
                                           utils.gen_filename(curr_site))
            site_info["task_id"] = self.task_id
            site_info["screenshot"] = file_name

            finger_list = self.web_analyze_map.get(curr_site, [])
            site_info["finger"] = finger_list

            if self.options.get("site_identify"):
                web_app_finger = services.web_app_identify(site_info)
                flag = False
                if web_app_finger and finger_list:
                    for finger in finger_list:
                        if finger["name"].lower(
                        ) == web_app_finger["name"].lower():
                            flag = True
                            break

                if not flag and web_app_finger:
                    finger_list.append(web_app_finger)

            utils.conn_db('site').insert_one(site_info)
Ejemplo n.º 3
0
def web_app_identify1():
    site_info_list = services.fetch_site(["http://10.0.83.6:7001/"])
    for site_info in site_info_list:
        print(site_info)
        app = services.web_app_identify(site_info)
        print(app)