Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# -*- coding: utf-8 -*-
import re
import requests
from config import headers
def getParams(url, cookie, isRawHtml = False):
if not isRawHtml:
res = requests.get(url, headers = headers, cookies = cookie)
res.encode = 'utf-8'
html = res.text
else:
html = url
params = []
rawParams = {}
forms = re.findall(r'(?i)(?s)<form.*?</form.*?>', html)
for thisForm in forms:
inputs = re.findall(r'(?i)(?s)<input.*?>', thisForm)
for each in inputs:
this = {}
try:
name = re.search(r'(?i)name=[\'"](.*?)[\'"]', each).group(1)
this['name'] = name.encode('utf-8').decode('utf-8')
rawParams[name.encode('utf-8').decode('utf-8')] = ""
except:
pass
try:
Id = re.search(r'(?i)id=[\'"](.*?)[\'"]', each).group(1)
this['id'] = Id.encode('utf-8').decode('utf-8')
except:
pass
if len(this) != 0:
params.append(this)
return (params, rawParams)
def fuzzParams(url, GET, debugMode = False):
params = []
f = open("database\\params.txt", 'r')
if GET:
res = requests.get(url, headers = headers, cookies = {"PHPSESSID": "7tam65v270jlee5grjb7i2imkc"}, data = {'iurr8egnvo782n8754t':'123'})
else:
res = requests.post(url, headers = headers, cookies = {"PHPSESSID": "7tam65v270jlee5grjb7i2imkc"}, data = {'iurr8egnvo782n8754t':'123'})
res.encode = 'utf-8'
bullshit = res.text
for eachLine in f:
if debugMode:
print('.', end = '')
eachLine = eachLine[:-1]
if GET:
res = requests.get(url, headers = headers, cookies = {"PHPSESSID": "7tam65v270jlee5grjb7i2imkc"}, data = {eachLine:'123'})
else:
res = requests.post(url, headers = headers, cookies = {"PHPSESSID": "7tam65v270jlee5grjb7i2imkc"}, data = {eachLine:'123'})
res.encode = 'utf-8'
if res.text != bullshit:
params.append(eachLine)
return params