[Tutor] need help with socket / fuzzer not sure the while loop condition is wrong

la Y night_skystar at hotmail.com
Thu Jul 21 07:50:37 EDT 2016


need help with socket / fuzzer not sure the while loop condition is wrong - its superpose to fuzz testing programs over till program crashes but seems to have some errors.



import os
import sys
import datetime
import socket


def fuzzer():
    #fuzzer
    #user attack coordinates and junk
    currentEta = datetime.datetime.now()
    targetIP = raw_input("hello what is the target IP destinaition address: ")
    socketPort = int(raw_input("what port number : "))

    while ( socketPort < 4 ) and (socketPort <= 65535):
        socketPort = int(socketPort)

    junkData = raw_input("paste your junk for fuzzing [pattern create would be perfered]")



    # Symbolic name meaning all available interface
    #  Arbitrary non-privileged port
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.bind((targetIP , socketPort ))
    s.listen(1)
    conn, addr = s.accept()
    print ("Connected by",+ addr)

    counter = 0
    print(currentEta)
    print("Current Phase 1 initated")
    print(targetIP)
    print(socketPort)
    print(junkData)

    print(":sending:=================> fuzzie fuzzie")

    while conn.open(counter,junkData,data):
        counter =+ 1
        junkData = junkData + 1
        print(counter)
        print(junkData)
        data = conn.recv(1024)
        if not data: break
        conn.sendall(junkData)
        conn.open()


#option selection
print("Please Select an option")
options = input("1: Fuzzer n/ 2: Port Scanner ")

if options == 1:
    #run
    fuzzer()
elif options == 0:
    exit()



More information about the Tutor mailing list