mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-09-05 17:31:03 +00:00
Update server.py
This commit is contained in:
parent
c005db0058
commit
60c6b1f541
17
server.py
17
server.py
|
@ -205,8 +205,11 @@ def proxy_check_filtered(data, webserver, port, scheme, method, url):
|
|||
if encoded_image:
|
||||
print ("[*] solving...")
|
||||
solved = truecaptcha_solve(base64string)
|
||||
print ("[*] solved: %s" % (solved))
|
||||
filtered = solved in ['ctkpaarr', 'SPAM']
|
||||
if solved:
|
||||
print ("[*] solved: %s" % (solved))
|
||||
filtered = solved in ['ctkpaarr', 'SPAM']
|
||||
else:
|
||||
print ("[*] not solved")
|
||||
|
||||
# take action
|
||||
if filtered:
|
||||
|
@ -422,8 +425,14 @@ def truecaptcha_solve(encoded_image):
|
|||
}
|
||||
response = requests.post(url = url, json = data)
|
||||
data = response.json()
|
||||
print (data)
|
||||
return data['result']
|
||||
|
||||
if 'error_message' in data:
|
||||
print ("[*] Error: %s" % (data['error_message']))
|
||||
return None
|
||||
if 'result' in data:
|
||||
return data['result']
|
||||
|
||||
return None
|
||||
|
||||
if __name__== "__main__":
|
||||
start()
|
||||
|
|
Loading…
Reference in New Issue
Block a user