mirror of
https://github.com/edoardottt/cariddi.git
synced 2026-09-06 01:37:45 +02:00
Add ua flag
This commit is contained in:
@@ -58,6 +58,7 @@ type Input struct {
|
||||
Errors bool
|
||||
Info bool
|
||||
Debug bool
|
||||
UserAgent string
|
||||
}
|
||||
|
||||
//ScanFlag defines all the options taken
|
||||
@@ -98,6 +99,8 @@ func ScanFlag() Input {
|
||||
|
||||
debugPtr := flag.Bool("debug", false, "Print debug information while crawling.")
|
||||
|
||||
userAgentPtr := flag.String("ua", "", "Use a custom User Agent.")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
result := Input{
|
||||
@@ -126,6 +129,7 @@ func ScanFlag() Input {
|
||||
*errorsPtr,
|
||||
*infoPtr,
|
||||
*debugPtr,
|
||||
*userAgentPtr,
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user