Commit Graph

25 Commits

Author SHA1 Message Date
Vasco Franco
85e1fe8b68 Fix bug in extractHeaders and simplify its logic
`extractHeaders` had an incorrect regex that crashed Corsy with the msg:
"sre_constants.error: nothing to repeat at position 1". This was caused
by `^?`, which is not a valid regex, and can be reproduced with the
README example: `python3 corsy.py -u https://example.com --headers
"User-Agent: GoogleBot\nCookie: SESSION=Hacked"`.
Instead of using the regex this commit simplifies the logic by using a
`split` to split lines and header_name/value pairs.
2021-11-14 00:02:28 +00:00
Vasco Franco
b5c5c21926 Fixes "origin reflected" check
Previously there was a missing call to `headers = requester(url, scheme,
header_dict, origin)` in the "origin reflected" check. This meant that
the code was not using the intended origin (`origin = root + '://' +
'example.com'`). Intead, the check incorreclty used the headers from the
first request (with `origin = scheme + '://' + root`). This commit fixes
this problem by making the missing request.
2021-11-13 23:53:18 +00:00
Somdev Sangwan
de9aff1794 fix breaking bug, better error handling 2021-01-28 18:23:51 +05:30
Somdev Sangwan
29fe7d918c simplify origin, better error handling 2021-01-28 18:21:49 +05:30
Somdev Sangwan
ad0bd1429b Merge branch 'master' into master 2021-01-28 16:50:08 +05:30
Somdev Sangwan
aedf5b0581 follow format style of corsy 2021-01-28 16:34:37 +05:30
Somdev Sangwan
62fcc3974d added underscore bypass 2021-01-28 16:23:23 +05:30
Somdev Sangwan
2e3ea35807 fix support for IP addresses 2021-01-28 16:15:17 +05:30
duckie
fc4364675c remove pycache 2021-01-28 16:05:19 +05:30
Somdev Sangwan
437504ad80 fix #30 2020-12-09 14:17:42 +05:30
duckie
0f7d722bf6 beautfied the error in #23 2020-08-21 15:58:22 +05:30
duckie
370bf7bfd9 Converted Tab to Spaces 2020-08-21 11:10:58 +05:30
Somdev Sangwan
3f9b523028 minor ui changes 2020-01-17 03:20:20 +05:30
Somdev Sangwan
f8e57478fe 1.0-beta
- Bug fixes
- Scan URLs from file
- JSON output to file
- Custom HTTP header support
- Switch to ignore helpful messages
2020-01-17 02:44:46 +05:30
Mio
678517ca87 Update requester.py 2019-12-15 18:14:24 +08:00
Mio
3387c6355f Merge branch 'master' into develop 2019-12-15 18:12:56 +08:00
Somdev Sangwan
ed7eb17683 supress bad ssl warning 2019-12-13 18:13:21 +05:30
Somdev Sangwan
3b76d8c7fd skip verification of ssl certificates 2019-12-12 11:17:20 +05:30
vvMelody
c6d307b2bc Simplify some code 2019-12-04 14:04:03 +08:00
Somdev Sangwan
277c557975 should resolve #7 2019-11-27 15:02:42 +05:30
Somdev Sangwan
d90140ff21 Update requester.py 2019-11-25 14:26:20 +05:30
Somdev Sangwan
b68631c587 added unescaped regex test 2019-11-25 10:21:17 +05:30
Somdev Sangwan
392e82496d reordered checks 2019-11-24 21:57:45 +05:30
Somdev Sangwan
e99c000694 minor typo fix 2019-11-24 21:40:51 +05:30
Somdev Sangwan
a5529a0298 Add files via upload 2019-11-24 21:12:10 +05:30