Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. import urllib
  2. from urllib.parse import urlencode
  3. from urllib.request import urlopen
  4. url="http://127.0.0.1/send.php"
  5. password=['Ciao','mail']#Lista Pswd
  6. a=0#Variabile per lo sorrimeimento della Lista
  7. print(a)
  8.  
  9. while 2: #avrei potuto usare un For ma mi dava problemi
  10.     print(a)
  11.  
  12.     params=urllib.parse.urlencode({'email':"mail@mail.com",'password': password[a]})
  13.     str=str.encode(params,'utf-8') #Conversione per la pagina send.php
  14.     f=urllib.request.Request(url,str)#Invia I Parametri
  15.     with urllib.request.urlopen(f) as c:
  16.         resp=c.read()#Legge il contenuto della Pagina
  17.         print(resp)
  18.         print("Pswd found "+":"+password[1])
  19.  
  20.  
  21.  
  22.         resp1=resp.decode('utf-8')
  23.         print(resp1)
  24.         if(resp1=="Login In effettuato"):
  25.             print("Pswd found "+":"+password[a])
  26.             break
  27.         else:
  28.             a+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement