예제 #1
0
파일: webserver.py 프로젝트: leaf7th/WAAF
def pentest():
    # while True:
    #     print("test")
    #     time.sleep(1)
    while True:
        with open(f"./Data/scanlist.json", "r") as r:
            data = json.load(r)
        for k, v in data.items():
            if v["report"]:
                save_name = util.escapeurl(args.url)
                argsdict = {
                    "url": v["url"],
                    "save": save_name,
                    "file": False,
                    "lhost": args.lhost
                }
                if not argsdict["file"]:
                    scan = Scan.scanner(dict)
                    argsdict["file"] = scan.scan()
                data = Data_processing.data_processing(argsdict["file"])
                exploit = Plan.Attacker(dict)
                exploit.start()
예제 #2
0
parser.add_argument('--file',
                    '-F',
                    help='Start to exploit with existing scan results',
                    default=False)
parser.add_argument('--lhost',
                    '-L',
                    required=True,
                    help='Set the local host for exploit')
args = parser.parse_args()
save_name = util.escapeurl(args.url)

argsdict = {
    "url": args.url,
    "save": save_name,
    "cookie": args.cookie,
    "include": args.include,
    "exclude": args.exclude,
    "file": args.file,
    "lhost": args.lhost
}

print(framworkascii)
# print(argsdict)

if not argsdict["file"]:
    scan = Scan.scanner(argsdict)
    argsdict["file"] = scan.scan()
data = Data_processing.data_processing(argsdict["file"])
exploit = Plan.Attacker(argsdict)
exploit.start()