-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrashmonitor.py
31 lines (26 loc) · 1017 Bytes
/
crashmonitor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__DATE__ = '08.04.2020'
__AUTHORS__ = ['cemonatk','FeCassie']
__VERSION__ = 0.9
from subprocess import check_output, PIPE, run
from datetime import datetime as dt
with open("fuzzinputs.txt") as file: # malicious - fuzzing payloads.
fuzzlist = [line.strip() for line in file]
with open("payloadlist.txt",'r') as file: # babyfuzzer generated command lists with {{-DUMMY-}} string.
commands = file.readlines()
# karray fireh.
for fuzz in fuzzlist:
fuzz = fuzz.strip()
for command in commands:
command = command.strip().replace('{{-DUMMY-}}', fuzz.strip()).split(' ')
if command[0] != '':
try:
retcode = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True).returncode
except:
print("Command didn't work -> {} {}\n".format(command, str(dt.now())))
if retcode == -11:
message = "[+] SIGSEGV [-11] -> "+' '.join(command)+" "+str(dt.now())+"\n"
print(message)
with open("results.txt",'a') as file:
file.write(message)