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,
|
&maxRepoSize,
|
||||||
"max-size",
|
"max-size",
|
||||||
150,
|
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(
|
flag.StringVar(
|
||||||
&excludeRepos,
|
&excludeRepos,
|
||||||
"exclude-repo",
|
"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(
|
flag.BoolVarP(
|
||||||
&onlyCommitsLeak,
|
&onlyCommitsLeak,
|
||||||
@@ -53,13 +60,6 @@ func main() {
|
|||||||
false,
|
false,
|
||||||
"Display only commits with author info",
|
"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.BoolVarP(&silent, "silent", "s", false, "Suppress all non-essential output")
|
||||||
flag.StringVarP(&jsonFile, "json", "j", "", "Write results to specified JSON file")
|
flag.StringVarP(&jsonFile, "json", "j", "", "Write results to specified JSON file")
|
||||||
|
|
||||||
@@ -69,6 +69,8 @@ func main() {
|
|||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
// INITIALIZE RECON OBJECT
|
||||||
|
|
||||||
r := &ghrecon.Recon{
|
r := &ghrecon.Recon{
|
||||||
Client: github.NewClient(nil),
|
Client: github.NewClient(nil),
|
||||||
Logger: log.NewWithOptions(os.Stderr, log.Options{
|
Logger: log.NewWithOptions(os.Stderr, log.Options{
|
||||||
@@ -81,6 +83,8 @@ func main() {
|
|||||||
MaxRepoSize: maxRepoSize,
|
MaxRepoSize: maxRepoSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHECK FLAGS
|
||||||
|
|
||||||
if username == "" && fromEmail == "" {
|
if username == "" && fromEmail == "" {
|
||||||
r.Logger.Fatal(
|
r.Logger.Fatal(
|
||||||
"Please provide a username with the --username (-u) flag or an email with the --email (-e) flag",
|
"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)
|
r.Client = r.Client.WithAuthToken(token)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// START
|
||||||
|
|
||||||
r.Header()
|
r.Header()
|
||||||
|
|
||||||
if fromEmail != "" {
|
if fromEmail != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user