mirror of
https://github.com/anotherhadi/github-recon.git
synced 2026-10-05 10:58:25 +02:00
@@ -38,13 +38,20 @@ func main() {
|
||||
&maxRepoSize,
|
||||
"max-size",
|
||||
150,
|
||||
"Limit the size of repositories to scan (in MB) (Only for deep scan)",
|
||||
"Limit the size of repositories to scan (in MB) (only for deep scan)",
|
||||
)
|
||||
flag.StringVar(
|
||||
&excludeRepos,
|
||||
"exclude-repo",
|
||||
"",
|
||||
"Exclude repos from deep scan (comma-separated list)",
|
||||
"Exclude repos from deep scan (comma-separated list, only for deep scan)",
|
||||
)
|
||||
flag.BoolVarP(
|
||||
&refresh,
|
||||
"refresh",
|
||||
"r",
|
||||
false,
|
||||
"Refresh the cache (only for deep scan)",
|
||||
)
|
||||
flag.BoolVarP(
|
||||
&onlyCommitsLeak,
|
||||
@@ -53,13 +60,6 @@ func main() {
|
||||
false,
|
||||
"Display only commits with author info",
|
||||
)
|
||||
flag.BoolVarP(
|
||||
&refresh,
|
||||
"refresh",
|
||||
"r",
|
||||
false,
|
||||
"Refresh the cache (deep scan only)",
|
||||
)
|
||||
flag.BoolVarP(&silent, "silent", "s", false, "Suppress all non-essential output")
|
||||
flag.StringVarP(&jsonFile, "json", "j", "", "Write results to specified JSON file")
|
||||
|
||||
@@ -69,6 +69,8 @@ func main() {
|
||||
|
||||
flag.Parse()
|
||||
|
||||
// INITIALIZE RECON OBJECT
|
||||
|
||||
r := &ghrecon.Recon{
|
||||
Client: github.NewClient(nil),
|
||||
Logger: log.NewWithOptions(os.Stderr, log.Options{
|
||||
@@ -81,6 +83,8 @@ func main() {
|
||||
MaxRepoSize: maxRepoSize,
|
||||
}
|
||||
|
||||
// CHECK FLAGS
|
||||
|
||||
if username == "" && fromEmail == "" {
|
||||
r.Logger.Fatal(
|
||||
"Please provide a username with the --username (-u) flag or an email with the --email (-e) flag",
|
||||
@@ -101,6 +105,8 @@ func main() {
|
||||
r.Client = r.Client.WithAuthToken(token)
|
||||
}
|
||||
|
||||
// START
|
||||
|
||||
r.Header()
|
||||
|
||||
if fromEmail != "" {
|
||||
|
||||
Reference in New Issue
Block a user