-
Notifications
You must be signed in to change notification settings - Fork 0
/
fuzz.py
26 lines (18 loc) · 848 Bytes
/
fuzz.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
from boofuzz import *
host = '127.0.0.1' # windows VM
port = 9999 # vulnserver port
def main():
session = Session(target=Target(
connection=SocketConnection(host, port, proto='tcp')))
s_initialize("TRUN") # just giving our session a name, "TRUN"
# these strings are fuzzable by default, so here instead of blank
s_string("TRUN", fuzzable=False)
# we don't want to fuzz the space between "TRUN" and our arg
s_delim(" ", fuzzable=False)
# This value is arbitrary as we did not specify 'False' for fuzzable. Boofuzz will fuzz this string now
s_string("FUZZ")
# having our 'session' variable connect following the guidelines we established in "TRUN"
session.connect(s_get("TRUN"))
session.fuzz() # calling this function actually performs the fuzzing
if __name__ == "__main__":
main()