You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|| --enable-private-tlds | Set this flag to enable the use of company scope domains with private TLDs. This essentially disables the bug-bounty-program misconfiguration detection. |
107
107
| -ch | --chain-mode<br>--raw<br>--plain | In "chain-mode" we only output the important information. No decorations. |
108
108
|| --database /path/to/database | Custom path to the cached firebounty database |
109
+
|| --update-db | Set this flag to update the database and then exit immediately. |
110
+
|| --no-update | Set this flag to avoid checking for updates during this run. |
109
111
| -iu | --include-unsure | Include "unsure" assets in the output. An unsure asset is an asset that's not in scope, but is also not out of scope. Very probably unrelated to the bug bounty program. |
110
112
| -o | --output /path/to/outputfile | Save the inscope assets to a file |
Copy file name to clipboardExpand all lines: src/hacker-scoper/main.go
+86-45Lines changed: 86 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,8 @@ func main() {
113
113
114
114
varquietModebool
115
115
varshowVersionbool
116
+
varupdateAndQuitbool
117
+
varskipUpdateCheckbool
116
118
varcompanystring
117
119
varinscopeExplicitLevelint//should only be [0], 1, or 2
118
120
varnoscopeExplicitLevelint//should only be [0], 1, or 2
@@ -168,14 +170,19 @@ func main() {
168
170
169
171
-ch, --chain-mode, --plain, --raw, --no-ansi
170
172
In "chain-mode" we only output the important information. No decorations.
171
-
Default: false
172
173
173
174
--database /path/to/database
174
175
Custom path to the cached firebounty database.
175
176
Default:
176
177
- Windows: %APPDATA%\hacker-scoper\
177
178
- Linux: /etc/hacker-scoper/
178
179
180
+
--update-db
181
+
Set this flag to update the database and then exit immediately.
182
+
183
+
--no-update
184
+
Set this flag to avoid checking for updates during this run.
185
+
179
186
-iu, --include-unsure
180
187
Include "unsure" assets in the output. An unsure asset is an asset that's not in scope, but is also not out of scope. Very probably unrelated to the bug bounty program.
181
188
@@ -223,6 +230,11 @@ func main() {
223
230
flag.BoolVar(&chainMode, "raw", false, "Output only the important information. No decorations.")
224
231
flag.BoolVar(&chainMode, "no-ansi", false, "Output only the important information. No decorations.")
225
232
flag.StringVar(&firebountyJSONPath, "database", "", "Custom path to the cached firebounty database")
233
+
flag.BoolVar(&updateAndQuit, "update-db", false, "Set this flag to update the database and then exit immediately.")
234
+
flag.BoolVar(&updateAndQuit, "db-update", false, "Set this flag to update the database and then exit immediately.")
235
+
flag.BoolVar(&updateAndQuit, "update", false, "Set this flag to update the database and then exit immediately.")
236
+
flag.BoolVar(&skipUpdateCheck, "no-update", false, "Set this flag to avoid checking for updates during this run.")
237
+
flag.BoolVar(&skipUpdateCheck, "skip-update", false, "Set this flag to avoid checking for updates during this run.")
226
238
flag.StringVar(&inscopeOutputFile, "o", "", "Save the inscope urls to a file")
227
239
flag.StringVar(&inscopeOutputFile, "output", "", "Save the inscope urls to a file")
228
240
flag.BoolVar(&outputCSVFormat, "csv", false, "Output in CSV format")
@@ -247,7 +259,7 @@ func main() {
247
259
`
248
260
249
261
ifshowVersion {
250
-
fmt.Print("hacker-scoper: v6.2.0\n")
262
+
fmt.Print("hacker-scoper: v6.2.1\n")
251
263
os.Exit(0)
252
264
}
253
265
@@ -284,28 +296,31 @@ func main() {
284
296
iffirebountyJSONPath==""&&!chainMode {
285
297
warning("This OS isn't officially supported. The firebounty JSON will be downloaded in the current working directory. To override this behavior, use the \"--database\" flag.")
286
298
}
287
-
} else {
288
-
//If the folder exists...
289
-
_, err:=os.Stat(firebountyJSONPath)
290
-
iferrors.Is(err, os.ErrNotExist) {
291
-
//Create the folder
292
-
err:=os.Mkdir(firebountyJSONPath, 0700)
293
-
iferr!=nil {
294
-
crash("Unable to create the folder \""+firebountyJSONPath+"\"", err)
295
-
}
296
-
} elseiferr!=nil {
297
-
// Schrodinger: file may or may not exist. See err for details.
298
-
crash("Could not verify existence of the folder \""+firebountyJSONPath+"\"!", err)
crash("Unable to get information about the database file at \""+firebountyJSONPath+"\". Probably a permissions error with the directory the database is saved at. Try using the database argument like '--database /custom/path/to/store/the/firebounty.json'", err)
crash("Unable to get information about the database file at \""+firebountyJSONPath+"\". Probably a permissions error with the directory the database is saved at. Try using the database argument like '--database /custom/path/to/store/the/firebounty.json'", err)
806
+
}
807
+
808
+
// This last return is unreachable but it must be added to appease the compiler.
0 commit comments