GithubHelp home page GithubHelp logo

domain_scan's Introduction

功能及原理:

1.通过调用互联网上的api在线截图节省信息收集时间

2.通过request定时请求,监控js变化(监控间隔在app.py的IntervalTrigger(days=1)

搭建过程

在使用之前要先导入子域名

通过db_config.insert_host函数添加,可自行编写脚本

模版:

比如通过fofa api批量添加脚本

# -*- coding: utf-8 -*-
import json
import requests
import db_config
import sqlite3


apiurl = 'https://fofa.info/api/v1/search/all?email=&key=&qbase64=&size=10000'
response = requests.get(apiurl)
for i in range(len(json.loads(response.text)['results'])):
    host = json.loads(response.text)['results'][i][0].replace('https://','').replace('http://','')
    db_config.insert_host(host)
con = sqlite3.connect('material.db',check_same_thread=False)
c2 = con.cursor()
#去重
result = c2.execute('''DELETE FROM domains 
WHERE rowid NOT IN (SELECT min(rowid) 
                    FROM domains 
                    GROUP BY host);''')
con.commit()
print(list(result))

如果是在容器外面运行,需要选运行creat_tables.py创建数据库

容器内可直接运行即可

容器内

docker build -t domain_scan .
docker run -d --name domain_scan -p 80:80 domain_scan

访问80端口

image

要清除数据直接删除material.db就行了

domain_scan's People

Contributors

beishanxueyuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.