mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-09-08 18:59:34 +00:00
Update server.py
This commit is contained in:
parent
872c9c2e3e
commit
0d3ae9d2a7
38
server.py
38
server.py
|
@ -177,26 +177,26 @@ def proxy_check_filtered(data, webserver, port, scheme, method, url):
|
||||||
print ("[*] Found ID: %s" % (', '.join(matches)))
|
print ("[*] Found ID: %s" % (', '.join(matches)))
|
||||||
filtered = not all(map(pwnedpasswords_test, matches))
|
filtered = not all(map(pwnedpasswords_test, matches))
|
||||||
|
|
||||||
# f: download_base64string
|
|
||||||
def download_base64string(url):
|
|
||||||
try:
|
|
||||||
response = requests.get(url)
|
|
||||||
if response.status_code == 200:
|
|
||||||
return base64.b64encode(response.content).decode('utf-8')
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
except:
|
|
||||||
return None
|
|
||||||
|
|
||||||
# check an attached images
|
# check an attached images
|
||||||
urls = []
|
if truecaptcha_userid != '':
|
||||||
if not filtered:
|
def download_base64string(url):
|
||||||
urls = re.findall(r'https?://[^\s]+?\.webp\b', text)
|
try:
|
||||||
if len(urls) > 0:
|
response = requests.get(url)
|
||||||
for url in urls:
|
if response.status_code == 200:
|
||||||
if not filtered:
|
return base64.b64encode(response.content).decode('utf-8')
|
||||||
base64string = download_base64string(url)
|
else:
|
||||||
filtered = truecaptcha_solve(base64string) in ['ctkpaarr', 'SPAM']
|
return None
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
|
urls = []
|
||||||
|
if not filtered:
|
||||||
|
urls = re.findall(r'https?://[^\s]+?\.webp\b', text)
|
||||||
|
if len(urls) > 0:
|
||||||
|
for url in urls:
|
||||||
|
if not filtered:
|
||||||
|
base64string = download_base64string(url)
|
||||||
|
filtered = truecaptcha_solve(base64string) in ['ctkpaarr', 'SPAM']
|
||||||
|
|
||||||
# take action
|
# take action
|
||||||
if filtered:
|
if filtered:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user