mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-07-15 08:48:08 +00:00
Update server.py
This commit is contained in:
parent
4fbd9bf522
commit
d24045d2ce
|
@ -231,6 +231,11 @@ def proxy_check_filtered(data, webserver, port, scheme, method, url):
|
|||
score += 1
|
||||
strategies.append('SearchEngine3')
|
||||
|
||||
# check ID with RepeatedNumbers3 strategy
|
||||
if all(map(repeated_numbers_test, matches)):
|
||||
score += 1
|
||||
strategies.append('RepeatedNumbers3')
|
||||
|
||||
# logging score
|
||||
with open('score.log', 'a') as file:
|
||||
file.write("%s\t%s\t%s\r\n" % ('+'.join(matches), str(score), '+'.join(strategies)))
|
||||
|
@ -617,5 +622,9 @@ def search_engine_test(s):
|
|||
|
||||
return num_results > 2
|
||||
|
||||
# Strategy: RepeatedNumbers3
|
||||
def repeated_numbers_test(s):
|
||||
return bool(re.search(pattern, r'\d{3,}'))
|
||||
|
||||
if __name__== "__main__":
|
||||
start()
|
||||
|
|
Loading…
Reference in New Issue
Block a user