Skip to content

Commit

Permalink
added unescaped regex test
Browse files Browse the repository at this point in the history
  • Loading branch information
s0md3v authored Nov 25, 2019
1 parent 205b214 commit b68631c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ def active_tests(url, root, scheme, delay):
if acao_header:
if '`.example.com' in acao_header:
return 'Broken parser'
time.sleep(delay)
if root.count('.') > 1:
time.sleep(delay)
spoofed_root = root.replace('.', 'x', 1)
acao_header = requester(url, scheme, spoofed_root)
if acao_header:
if host(acao_header) == spoofed_root:
return 'Unescaped regex'
time.sleep(delay)
acao_header = requester(url, 'http', root)
if acao_header:
if acao_header.startswith('http://'):
Expand Down

0 comments on commit b68631c

Please sign in to comment.