@@ -116,11 +116,12 @@ MATCHERS:
116116 -mfc, -match-favicon string[] match response with specified favicon hash (-mfc 1494302000)
117117 -ms, -match-string string match response with specified string (-ms admin)
118118 -mr, -match-regex string match response with specified regex (-mr admin)
119- -mcdn, -match-cdn string[] match host with specified cdn provider (google, azure, cloudflare, cloudfront, fastly, incapsula, oracle, akamai, sucuri, leaseweb)
119+ -mcdn, -match-cdn string[] match host with specified cdn provider (azure, cloudflare, cloudfront, fastly, incapsula, oracle, google , akamai, sucuri, leaseweb)
120120 -mrt, -match-response-time string match response with specified response time in seconds (-mrt '< 1')
121121
122122EXTRACTOR:
123- -er, -extract-regex string display response content for specified regex
123+ -er, -extract-regex string[] Display response content with matched regex
124+ -ep, -extract-preset string[] Display response content with matched preset regex
124125
125126FILTERS:
126127 -fc, -filter-code string filter response with specified status code (-fc 403,401)
@@ -130,7 +131,7 @@ FILTERS:
130131 -ffc, -filter-favicon string[] filter response with specified favicon hash (-mfc 1494302000)
131132 -fs, -filter-string string filter response with specified string (-fs admin)
132133 -fe, -filter-regex string filter response with specified regex (-fe admin)
133- -fcdn, -filter-cdn string[] filter host with specified cdn provider (google, azure, cloudflare, cloudfront, fastly, incapsula, oracle, akamai, sucuri, leaseweb)
134+ -fcdn, -filter-cdn string[] filter host with specified cdn provider (azure, cloudflare, cloudfront, fastly, incapsula, oracle, google , akamai, sucuri, leaseweb)
134135 -frt, -filter-response-time string filter response with specified response time in seconds (-frt '> 1')
135136
136137RATE-LIMIT:
@@ -180,6 +181,7 @@ CONFIGURATIONS:
180181 -ldp, -leave-default-ports leave default http/https ports in host header (eg. http://host:80 - https//host:443
181182
182183DEBUG:
184+ -health-check, -hc run diagnostic check up
183185 -debug display request/response content in cli
184186 -debug-req display request content in cli
185187 -debug-resp display response content in cli
@@ -395,7 +397,7 @@ https://api.hackerone.com [AS13335, CLOUDFLARENET, US, 104.16.96.0/20]
395397```
396398
397399
398- ### Path Probe
400+ ### File/ Path Bruteforce
399401
400402
401403``` console
@@ -451,8 +453,47 @@ https://docs.hackerone.com
451453https://support.hackerone.com
452454```
453455
456+ ### Using httpx as a library
457+ ` httpx ` can be used as a library by creating an instance of the ` Option ` struct and populating it with the same options that would be specified via CLI. Once validated, the struct should be passed to a runner instance (to close at the end of the program) and the ` RunEnumeration ` method should be called. Here follows a minimal example of how to do it:
458+
459+ ``` go
460+ package main
461+
462+ import (
463+ " log"
464+ " os"
465+
466+ " github.com/projectdiscovery/httpx/runner"
467+ )
468+
469+ func main () {
470+ inputFile := " test.txt"
471+ err := os.WriteFile (inputFile, []byte (" scanme.sh" ), 0644 )
472+ if err != nil {
473+ log.Fatal (err)
474+ }
475+ defer os.RemoveAll (inputFile)
476+
477+ options := runner.Options {
478+ Methods: " GET" ,
479+ InputFile: inputFile,
480+ }
481+ if err := options.ValidateOptions (); err != nil {
482+ log.Fatal (err)
483+ }
484+
485+ httpxRunner , err := runner.New (&options)
486+ if err != nil {
487+ log.Fatal ()
488+ }
489+ defer httpxRunner.Close ()
490+
491+ httpxRunner.RunEnumeration ()
492+ }
493+ ```
494+
454495
455- # 📋 Notes
496+ # Notes
456497
457498- As default, ** httpx** checks for ` HTTPS ` probe and fall-back to ` HTTP ` only if ` HTTPS ` is not reachable.
458499- For printing both HTTP/HTTPS results, ` no-fallback ` flag can be used.
0 commit comments