Exemplo n.º 1
0
def add_rule():
    if request.method == 'POST':
        if request.form.get('name') and request.form.get('rule'):
            # print(request.form['name'], request.form['rule'])
            Rules().insert_application(request.form['name'],
                                       request.form['rule'])
            return redirect('/fingerprint/1')
Exemplo n.º 2
0
def update(mode):
    if request.method == 'POST':
        if mode == "fingerprint":
            if request.form.get('name') and request.form.get('rule'):
                Rules().update_fingerprint(request.form['name'],
                                           request.form['rule'])
                return redirect(request.referrer)
Exemplo n.º 3
0
def fingerprint(page=1):
    finger_print = Rules().select_fingerprint(page)
    return render_template('fingerprint.html',
                           mode="fingerprint",
                           page=page,
                           max_page=max_fingerprint // item_size + 1,
                           fingerprints=finger_print)
Exemplo n.º 4
0
def delete(id, mode):
    if mode == 'src':
        SrcList().delete(id)
    if mode == 'fingerprint':
        Rules().delete(id)
    else:
        Database().delete(id, mode)
    return redirect(request.referrer)
Exemplo n.º 5
0
def fingerprint(page=1):
    finger_print = Rules().select_application(page)
    return render_template('fingerprint.html',
                           page=page,
                           max_page=max_fingerprint // 15 + 1,
                           fingerprints=finger_print)
Exemplo n.º 6
0
#!/usr/bin/python
# __author__ = 'jasonsheh'
# -*- coding:utf-8 -*-

from flask import Flask, render_template, request, redirect
from database.database import Database
from database.rules import Rules
from lib.cel import port_scan, domain_scan, sendir_scan, site_scan

app = Flask(__name__)

max_domain = Database().count('subdomain')
max_port = Database().count('port')
max_sendir = Database().count('sendir')
max_fingerprint = Rules().count('application')
max_task = Database().count('task')
max_vul = Database().count('vul')


@app.route('/')
@app.route('/index')
@app.route('/index/<int:page>')
def index(page=1):
    tasks = Database().select_task(page)
    return render_template('index.html',
                           page=page,
                           max_page=max_task,
                           tasks=tasks,
                           max_domain=max_domain,
                           max_port=max_port,
                           max_sendir=max_sendir,
Exemplo n.º 7
0
from database.srcList import SrcList
from setting import item_size

from web.gitleak import gitleak

app = Flask(__name__)
app.register_blueprint(gitleak)

# TODO 每次刷新
d = Database()
max_domain = d.count('subdomain')
max_port = d.count('port')
max_sendir = d.count('sendir')
max_vul = d.count('vul')

r = Rules()
max_fingerprint = r.count()
max_src = SrcList().count()


@app.route('/')
@app.route('/index')
@app.route('/index/<int:page>')
def index(page=1):
    src_list = SrcList().select_recent_src_list(page)
    return render_template('index.html',
                           mode="index",
                           page=page,
                           max_page=max_src // item_size + 1,
                           src_list=src_list,
                           max_domain=max_domain,
Exemplo n.º 8
0
#!/usr/bin/python
# __author__ = 'jasonsheh'
# -*- coding:utf-8 -*-

from flask import Flask, render_template, request, redirect
from database.database import Database
from database.rules import Rules
from database.srcList import SrcList
from setting import item_size

app = Flask(__name__)

max_domain = Database().count('subdomain')
max_port = Database().count('port')
max_sendir = Database().count('sendir')
max_fingerprint = Rules().count('fingerprint')
max_vul = Database().count('vul')
max_src = SrcList().count()


@app.route('/')
@app.route('/index')
@app.route('/index/<int:page>')
def index(page=1):
    src_list = SrcList().select_recent_src_list(page)
    return render_template('index.html',
                           mode="index",
                           page=page,
                           max_page=max_src // item_size + 1,
                           src_list=src_list,
                           max_domain=max_domain,