Пример #1
0
def main(argv):
    config.logo()
    base.init()
    try:
        opts, args = getopt.getopt(argv, "ha:s:d:r:t:c", ["help","attone=", "attsrc=","attdetail=","readppp=","thread=","clean"])
    except getopt.GetoptError:
        config.scanHelp()
        sys.exit(2)
    for opt, arg in opts:
        target = arg
        filename = arg
        if opt in ("-h","--help"):
            config.scanHelp()
            sys.exit()
        elif opt in ("-t","--thread"):
            config.ThreadNum=int(arg)
        elif opt in ("-a", "--attone"):
            oneFoxScan(target)
        elif opt in ("-s", "--attsrc"):
            foxScan(target)
        elif opt in ("-d", "--attdetail"):
            foxScanDetail(target)
        elif opt in ("-r","--readppp"):
            pppFoxScan(filename)
        elif opt in ("-c","--clean"):
            config.delModel()
            sys.exit()
        else:
            config.scanHelp()
            sys.exit()
        SendNotice("{} 花溪九尾扫描完毕,保存文件名为 {} ".format(target,filename))
    return
Пример #2
0
def test_notification():
    init()
    with Feature(u"测试notification", ["flask.ext.report.test.tests.steps.notification_step"]):
        with Scenario(u"初始化"):
            given(u"初始化notification")

        with Scenario(u"notification的修改"):
            browser = when(u"访问notification", id_=1)
            browser = then(u"修改notification的name成功", browser)

            browser = when(u"启用notification", browser)
            then(u"启用成功", browser)
Пример #3
0
def test_notification():
    init()
    with Feature(u"测试notification",
                 ["flask.ext.report.test.tests.steps.notification_step"]):
        with Scenario(u"初始化"):
            given(u"初始化notification")

        with Scenario(u"notification的修改"):
            browser = when(u"访问notification", id_=1)
            browser = then(u"修改notification的name成功", browser)

            browser = when(u"启用notification", browser)
            then(u"启用成功", browser)
Пример #4
0
def test_it_works():
    init()
    with Feature(u"测试data_set的filter", ['flask.ext.report.test.tests.steps.data_set_step']):
        with Scenario(u"加载data_set"):
            browser = when(u"打开dataset", id_=1)
            then(u"配置shown的filter展示", browser)

        with Scenario(u"删除data_set的filter"):
            browser = when(u"打开dataset", id_=1)
            then(u"删除filter", browser)

        with Scenario(u"删除data_set的filter"):
            browser = when(u"打开dataset", id_=1)
            then(u"添加filter", browser)
Пример #5
0
def test_it_works():
    init()
    with Feature(u"测试data_set的filter",
                 ['flask.ext.report.test.tests.steps.data_set_step']):
        with Scenario(u"加载data_set"):
            browser = when(u"打开dataset", id_=1)
            then(u"配置shown的filter展示", browser)

        with Scenario(u"删除data_set的filter"):
            browser = when(u"打开dataset", id_=1)
            then(u"删除filter", browser)

        with Scenario(u"删除data_set的filter"):
            browser = when(u"打开dataset", id_=1)
            then(u"添加filter", browser)
Пример #6
0
def init(attone, attsrc, attdetail, thread, readppp, clean, plugins):
    """
    花溪九尾 懒狗必备\n
    https://github.com/Cl0udG0d/HXnineTails
    """
    base.init()
    Hx_config.ThreadNum = int(thread)
    if plugins:
        Hx_config.plugins = plugins
    if clean:
        Hx_config.delModel()
        sys.exit()
    if attone:
        oneFoxScan(attone)
    if attsrc:
        foxScan(attsrc)
    if attdetail:
        foxScanDetail(attdetail)
    if readppp:
        pppFoxScan(readppp)
    return
Пример #7
0
    def add_user():
        configinfo = base.init()
        userdb = os.path.join(BASE_PATH, configinfo['userdb'])
        data_path = os.path.join(BASE_PATH, configinfo['data'])
        username = input('请输入用户名: ')
        passwd = input('请输入密码: ')
        fp = open(userdb, 'a+')
        fp.write("%s:%s" % (username, common.encrypt(passwd)) + '\n')  #写入密码文件
        fp.close()
        user_file = os.path.join(data_path, username)  #用户数据目录
        os.mkdir(user_file)  #创建目录

        print('用户%s添加成功' % username)
Пример #8
0
def upload_file():

    if request.method == 'POST':
        # check if the post request has the file part
        if 'file' not in request.files:
            print('No file part')
            return jsonify({"Message": "File Not Found"}), 200
        file = request.files['file']
        # if user does not select file, browser also
        # submit a empty part without filename
        if file.filename == '':
            print('No selected file')
            return redirect(request.url)
        if file:
            # saving file in raw folder
            # TODO: Save it with client name and timestamp
            result = base.init(file)
            return result
Пример #9
0
#!/usr/bin/env python
from optparse import OptionParser
from models import Message
import base
import graph

def display_froms():
    email_authors = Message.objects().distinct(field="from_str")

    for x in email_authors[:25]:
        print x
    print "%s unique email authors" % (len(email_authors))

def display_from(email_addr):
    emails = Message.objects(from_str=email_addr).all()
    count = emails.count()
    print "%s emails found authored by '%s'" % (count, email_addr)
    g = graph.generate_graph(emails)
    graph.display_graph(g)

if __name__ == "__main__":
    base.init()
    parser = OptionParser(description="Explore the data")
    parser.add_option("--email", action="store", help="Generate graph focused on this email address", default=None)
    (opts, args) = parser.parse_args()
    if opts.email:
        display_from(opts.email)
    else:
        display_froms()
Пример #10
0
def main():
    base.logo()
    base.checkSession()
    base.init()
    spider()
Пример #11
0
import base
import argparse
import os

import account_setup as setup

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Creates the email->section mappings for accounts")
    parser.add_argument('mapping', type=str,
                        help='the path to the csv file containing email to section mappings')
    args = base.init(parser)

    setup.main(os.path.expanduser(args.mapping), staff=True)
Пример #12
0
 def setup(self):
     self.log_template = "user:%s-action:%s-filename:%s-resualt:%s-msg:%s"
     self.configinfo = base.init()
     self.data_path = os.path.join(BASE_PATH, self.configinfo['data'])
     self.log_path = os.path.join(BASE_PATH, self.configinfo['logs'])
     self.quota_size = int(self.configinfo['quota_size'])
Пример #13
0
def start():
    CONFIGINFO = base.init()
    ip_port = (CONFIGINFO['ip'], int(CONFIGINFO['port']))
    server = socketserver.ThreadingTCPServer(ip_port, ftpserver.FtpServer)
    server.serve_forever()
Пример #14
0
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

"""Widget subsystem of OcempGUI. This module contains various classes to
create and use graphical user interface elements in a pygame
application. All provided classes are fully accessible and support
various attributes and methods to make them suitable for a GUI driven
program.
"""

# Initialize the widget subsystem.
import base
base.init ()

import Constants
import StyleInformation
from Style import WidgetStyle, Style

# Basic widgets.
from BaseWidget import BaseWidget
BaseWidget.initclass ()

from Alignment import Alignment
from ButtonBase import ButtonBase
from Button import Button
from CheckButton import CheckButton
from Entry import Entry
from ImageButton import ImageButton
Пример #15
0
"""
项目启动文集

获取帮助:
    python manager.py --help

启动服务:
    python manager.py runserver
"""
from base import init

app, manager = init('dev')

if __name__ == '__main__':
    manager.run()
Пример #16
0
def main():
    base.init()
    foxScan()
    # subDomainsBruteMain.subDomainsBruteScan('wkj.work',"aa")
    return