projectdiscovery / httpx

httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.
https://docs.projectdiscovery.io/tools/httpx
MIT License
7.75k stars 843 forks source link

erorr -mr & -er flag in version 1.6.5 but not in 1.6.3 #1793

Closed hnvdie closed 4 months ago

hnvdie commented 4 months ago

Issue with -mr and -er options in httpx 1.6.5

In httpx 1.6.5, the features of -mr or -er seem to be causing errors and cannot be used. The error message indicates an issue with parsing the regex, which did not occur in version 1.6.3.

Output from version httpx 1.6.5

~/debug $ cat example | sort | uniq | httpx -mr '(SIMP[A-Z0-9]{12,24}|simper-curs)' -er '(SIMP[A-Z0-9]{12,24}|simper-curs)' -o result.out

[banner]
projectdiscovery.io

[INF] Current httpx version v1.6.5 (latest)
[FTL] Invalid value for match regex option: error parsing regexp: missing closing ): `(simp[a-z0-9]{12`

Output from version httpx 1.6.3

root@ubuntu:~/downloads# cat example | sort | uniq | httpx -mr '(SIMP[A-Z0-9]{12,24}|simper-curs)' -er '(SIMP[A-Z0-9]{12,24}|simper-curs)' -o result.out

[banner]
projectdiscovery.io
[INF] Current httpx version v1.6.3 (outdated)

Question

How can this issue be resolved?

dogancanbakir commented 4 months ago

We recently introduced support for multiple values and , in your regex causing this error. Can you retry with

'`(SIMP[A-Z0-9]{12,24}|simper-curs)`'

?

hnvdie commented 4 months ago

We recently introduced support for multiple values and , in your regex causing this error. Can you retry with

'`(SIMP[A-Z0-9]{12,24}|simper-curs)`'

?

this is working, thanks for giving a little direction.

for use `` might make me a little more adaptable from here. but it's okay it's still easy to do.

solved with

httpx -mr '`(SIMP[A-Z0-9]{12,24}|simper-curs)`'