代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/osmedeus 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import time
import argparse
from multiprocessing import Process
from lib.core import utils
from lib.client import config
from lib.sender import auth
from lib.sender import initial
from lib.mode import routine
#############
# Osmedeus - One line to rude them all
#############
__author__ = '@j3ssiejjj'
__version__ = '2.2'
# run Django API as another process
def start_server(localhost=True):
utils.print_banner("Starting Django API")
if localhost:
os.system('python3 server/manage.py runserver')
else:
os.system('python3 server/manage.py runserver 0.0.0.0:8000')
def parsing_argument(args):
# parsing agument
options = config.parsing_config(args)
# Start Django API if it's not running
if not args.client:
if not utils.connection_check('127.0.0.1', 8000):
p = Process(target=start_server, args=(options.get('localhost'),))
p.start()
# wait for Django API start
time.sleep(3)
else:
utils.print_info("Look like Django API already ran")
options = auth.login(options)
if not options or not (options['JWT'] and options['JWT'] != "None"):
utils.print_bad("Can't login to get JWT")
sys.exit(-1)
# run list of target
if options.get('target_list') and utils.not_empty_file(options.get('target_list')):
targets = utils.just_read(options.get('target_list'), get_list=True)
for target in targets:
options['raw_target'] = target
options['workspace'] = target
single_target(options)
else:
single_target(options)
def single_target(options):
# don't create new workspace in report mode
if options.get('mode') != 'report':
options = initial.init_workspace(options)
# run specific task otherwise run the normal routine
routine.routine_handle(options)
def main():
config.banner(__version__, __author__)
parser = argparse.ArgumentParser(
description="One line to rude them all")
parser.add_argument('-c', '--config', action='store', dest='config_path',
help='config file')
parser.add_argument('-m', '--modules', action='store',
dest='modules', help='specific modules to action')
parser.add_argument('-x', '--exclude', action='store',
dest='exclude', help='ignore modules (eg: -x "linkfinding")')
# input
parser.add_argument('-i', '--input', action='store',
dest='input', help='input for specific module')
parser.add_argument('-I', '--input_list', action='store',
dest='inputlist', help='input file for specific module')
parser.add_argument('-t', '--target', action='store',
dest='target', help='target')
parser.add_argument('-T', '--target_list', action='store',
dest='targetlist', help='list of target')
# report
parser.add_argument('-r', '--report', action='store',
dest='report', help='report mode')
# workspace
parser.add_argument('-w', '--workspace', action='store',
dest='workspace', help='Domain')
# more options on routine
parser.add_argument('-s', '--slow', action='store',
help='run this tool with slow routine')
parser.add_argument('-f', '--forced', action='store_true',
help='force to run the module again if output exists')
# api options
parser.add_argument('--remote', action='store', dest='remote', help='remote address for API')
parser.add_argument('--auth', action='store', dest='auth',
help='Specify authentication e.g: --auth="username:password" ')
parser.add_argument('--proxy', action='store', dest='proxy',
help='Specify proxy --proxy="type://host:port" e.g: --proxy="socks4://127.0.0.1:9050" ')
parser.add_argument('--company', action='store',
dest='company', help='Company name')
parser.add_argument('-o', '--output', action='store',
dest='output', help='output')
parser.add_argument('-M', '--list_module',
action='store_true', help='List all module')
parser.add_argument('-v', '--verbose', action='store_true',
help='show verbose output')
parser.add_argument('--update', action='store_true',
help='update lastest from git')
parser.add_argument('--proxy_file', action='store', dest='proxy_file',
help='Specify proxychains config file --proxy_file=proxychains.conf')
parser.add_argument('--client', action='store_true',
help='just run client stuff in case you ran the flask server before')
parser.add_argument('--debug', action='store_true',
help='just for debug purpose')
parser.add_argument('--localhost', action='store_true',
help='Bind API Server on localhost')
parser.add_argument('--monitor', action='store_true',
help='Turn on monitor mode')
parser.add_argument('--slack', action='store_true',
help='Turn on slack notification')
parser.add_argument('-hh', '--helps', dest='helps',
action='store_true', help='Display more help messaage')
args = parser.parse_args()
if len(sys.argv) == 1:
config.custom_help()
sys.exit(0)
if args.helps:
config.custom_help()
if args.list_module:
config.list_module()
if args.update:
config.update()
parsing_argument(args)
if __name__ == '__main__':
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。