-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathargus.go
497 lines (465 loc) · 11.9 KB
/
argus.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
package main
import (
"fmt"
"os"
"strconv"
"time"
"babywolf.io/utils"
"github.com/fatih/color"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/jedib0t/go-pretty/v6/text"
"golang.org/x/exp/rand"
"golang.org/x/term"
)
const (
VERSION string = "1.0"
AUTHOR string = "Babywolf(original by Jason13)"
)
var tools = [1][52]map[string]utils.Any{
{
{
"number": 1,
"name": "associated hosts",
"script": "associated_hosts.go",
"section": "Network & Infrastructure",
},
{
"number": 2,
"name": "DNS Over HTTPS",
"script": "dns_over_https.go",
"section": "Network & Infrastructure",
},
{
"number": 3,
"name": "DNS Records",
"script": "dns_records.go",
"section": "Network & Infrastructure",
},
{
"number": 4,
"name": "DNSSEC Check",
"script": "dnssec.go",
"section": "Network & Infrastructure",
},
{
"number": 5,
"name": "Domain Info",
"script": "domain_info.go",
"section": "Network & Infrastructure",
},
{
"number": 6,
"name": "Domain Reputation Check",
"script": "domain_reputation_check.go",
"section": "Network & Infrastructure",
},
{
"number": 7,
"name": "IP Info",
"script": "ip_info.go",
"section": "Network & Infrastructure",
},
{
"number": 8,
"name": "Open Ports Scan",
"script": "open_ports.go",
"section": "Network & Infrastructure",
},
{
"number": 9,
"name": "Server Info",
"script": "server_info.go",
"section": "Network & Infrastructure",
},
{
"number": 10,
"name": "Server Location",
"script": "server_location.go",
"section": "Network & Infrastructure",
},
{
"number": 11,
"name": "SSL Chain Analysis",
"script": "ssl_chain.go",
"section": "Network & Infrastructure",
},
{
"number": 12,
"name": "SSL Expiry Alert",
"script": "ssl_expiry.go",
"section": "Network & Infrastructure",
},
{
"number": 13,
"name": "TLS Cipher Suites",
"script": "tls_cipher_suites.go",
"section": "Network & Infrastructure",
},
{
"number": 14,
"name": "TLS Handshake Simulation",
"script": "tls_handshake.go",
"section": "Network & Infrastructure",
},
{
"number": 15,
"name": "Traceroute",
"script": "traceroute.go",
"section": "Network & Infrastructure",
},
{
"number": 16,
"name": "TXT Records",
"script": "txt_records.go",
"section": "Network & Infrastructure",
},
{
"number": 17,
"name": "WHOIS Lookup",
"script": "whois_lookup.go",
"section": "Network & Infrastructure",
},
{
"number": 18,
"name": "Zone Transfer",
"script": "zonetransfer.go",
"section": "Network & Infrastructure",
},
{
"number": 19,
"name": "Archive History",
"script": "archive_history.go",
"section": "Web Application Analysis",
},
{
"number": 20,
"name": "Broken Links Detection",
"script": "broken_links.go",
"section": "Web Application Analysis",
},
{
"number": 21,
"name": "Carbon Footprint",
"script": "carbon_footprint.go",
"section": "Web Application Analysis",
},
{
"number": 22,
"name": "CMS Detection",
"script": "cms_detection.go",
"section": "Web Application Analysis",
},
{
"number": 23,
"name": "Cookies Analyzer",
"script": "cookies.go",
"section": "Web Application Analysis",
},
{
"number": 24,
"name": "Content Discovery",
"script": "content_discovery.go",
"section": "Web Application Analysis",
},
{
"number": 25,
"name": "Crawler",
"script": "crawler.go",
"section": "Web Application Analysis",
},
{
"number": 26,
"name": "Robots.txt Analyzer",
"script": "crawl_rules.go",
"section": "Web Application Analysis",
},
{
"number": 27,
"name": "Directory Finder",
"script": "directory_finder.go",
"section": "Web Application Analysis",
},
{
"number": 28,
"name": "Performance Monitoring",
"script": "performance_monitoring.go",
"section": "Web Application Analysis",
},
{
"number": 29,
"name": "Quality Metrics",
"script": "quality_metrics.go",
"section": "Web Application Analysis",
},
{
"number": 30,
"name": "Redirect Chain",
"script": "redirect_chain.go",
"section": "Web Application Analysis",
},
{
"number": 31,
"name": "Sitemap Parsing",
"script": "sitemap.go",
"section": "Web Application Analysis",
},
{
"number": 32,
"name": "Social Media Presence Scan",
"script": "social_media.go",
"section": "Web Application Analysis",
},
{
"number": 33,
"name": "Technology Stack Detection",
"script": "technology_stack.go",
"section": "Web Application Analysis",
},
{
"number": 34,
"name": "Third-Party Integrations",
"script": "third_party_integrations.go",
"section": "Web Application Analysis",
},
{
"number": 35,
"name": "Censys Reconnaissance",
"script": "censys.go",
"section": "Security & Threat Intelligence",
},
{
"number": 36,
"name": "Certificate Authority Recon",
"script": "certificate_authority_recon.go",
"section": "Security & Threat Intelligence",
},
{
"number": 37,
"name": "Data Leak Detection",
"script": "data_leak.go",
"section": "Security & Threat Intelligence",
},
{
"number": 38,
"name": "Firewall Detection",
"script": "firewall_detection.go",
"section": "Security & Threat Intelligence",
},
{
"number": 39,
"name": "Global Ranking",
"script": "global_ranking.go",
"section": "Security & Threat Intelligence",
},
{
"number": 40,
"name": "HTTP Headers",
"script": "http_headers.go",
"section": "Security & Threat Intelligence",
},
{
"number": 41,
"name": "HTTP Security Features",
"script": "http_security.go",
"section": "Security & Threat Intelligence",
},
{
"number": 42,
"name": "Malware & Phishing Check",
"script": "malware_phishing.go",
"section": "Security & Threat Intelligence",
},
{
"number": 43,
"name": "Pastebin Monitoring",
"script": "pastebin_monitoring.go",
"section": "Security & Threat Intelligence",
},
{
"number": 44,
"name": "Privacy & GDPR Compliance",
"script": "privacy_gdpr.go",
"section": "Security & Threat Intelligence",
},
{
"number": 45,
"name": "Security.txt Check",
"script": "security_txt.go",
"section": "Security & Threat Intelligence",
},
{
"number": 46,
"name": "Shodan Reconnaissance",
"script": "shodan.go",
"section": "Security & Threat Intelligence",
},
{
"number": 47,
"name": "SSL Labs Report",
"script": "ssl_labs_report.go",
"section": "Security & Threat Intelligence",
},
{
"number": 48,
"name": "SSL Pinning Check",
"script": "ssl_pinning_check.go",
"section": "Security & Threat Intelligence",
},
{
"number": 49,
"name": "Subdomain Enumeration",
"script": "subdomain_enum.go",
"section": "Security & Threat Intelligence",
},
{
"number": 50,
"name": "Subdomain Takeover",
"script": "subdomain_takeover.go",
"section": "Security & Threat Intelligence",
},
{
"number": 51,
"name": "VirusTotal Scan",
"script": "virustotal_scan.go",
"section": "Security & Threat Intelligence",
},
{
"number": 00,
"name": "BEAST MODE",
"script": "",
"section": "Special Mode",
},
},
}
//var toolsMapping = make(map[utils.Any]map[string]utils.Any)
var count int = 0
var excludedSections = map[string]struct{}{
"Run All Scripts": {},
"Special Mode": {},
}
var sectionOrder = []string{
"Network & Infrastructure",
"Web Application Analysis",
"Security & Threat Intelligence",
}
func main() {
Banner()
sectionMap := make(map[string][]map[string]utils.Any)
for _, tool := range tools[0] {
section := tool["section"].(string)
if _, excluded := excludedSections[section]; !excluded {
sectionMap[section] = append(sectionMap[section], tool)
}
}
var sections []string
for _, section := range sectionOrder {
if _, exists := sectionMap[section]; exists {
sections = append(sections, section)
}
}
maxRows := 0
for _, toolsInSection := range sectionMap {
if len(toolsInSection) > maxRows {
maxRows = len(toolsInSection)
}
}
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
headers := make([]interface{}, len(sections))
for i, section := range sections {
headers[i] = section
}
t.AppendHeader(headers)
colorize := func(section string, tool map[string]utils.Any) string {
var numColor, nameColor text.Colors
switch section {
case "Network & Infrastructure":
numColor = text.Colors{text.FgHiBlue}
nameColor = text.Colors{text.FgBlue}
case "Web Application Analysis":
numColor = text.Colors{text.FgHiGreen}
nameColor = text.Colors{text.FgGreen}
case "Security & Threat Intelligence":
numColor = text.Colors{text.FgHiMagenta}
nameColor = text.Colors{text.FgMagenta}
default:
numColor = text.Colors{text.FgWhite}
nameColor = text.Colors{text.FgWhite}
}
numberStr := numColor.Sprint(tool["number"], ")")
nameStr := nameColor.Sprintf("%s", tool["name"])
return fmt.Sprintf("%s %s", numberStr, nameStr)
}
for row := 0; row < maxRows; row++ {
toolRow := make([]interface{}, len(sections))
for col, section := range sections {
if row < len(sectionMap[section]) {
tool := sectionMap[section][row]
toolRow[col] = colorize(section, tool)
} else {
toolRow[col] = ""
}
}
t.AppendRow(toolRow)
}
t.Render()
}
func CountModules() {
for _, toolRow := range tools {
for _, tool := range toolRow {
if script, hasScript := tool["script"]; hasScript && script != nil {
if section, hasSection := tool["section"]; hasSection {
if _, excluded := excludedSections[section.(string)]; !excluded {
count++
}
}
}
}
}
}
func Banner() {
rand.Seed(uint64(time.Now().UnixNano()))
colors := []func(a ...interface{}) string{
color.New(color.FgRed, color.Bold).SprintFunc(),
color.New(color.FgGreen, color.Bold).SprintFunc(),
color.New(color.FgYellow, color.Bold).SprintFunc(),
color.New(color.FgBlue, color.Bold).SprintFunc(),
color.New(color.FgMagenta, color.Bold).SprintFunc(),
color.New(color.FgCyan, color.Bold).SprintFunc(),
color.New(color.FgWhite, color.Bold).SprintFunc(),
}
cyan := colors[5]
green := colors[1]
//blue := colors[3]
//magenta := colors[4]
white := colors[6]
asciiArt := `
█████╗ ██████╗ ██████╗ ██╗ ██╗███████╗
██╔══██╗██╔══██╗██╔════╝ ██║ ██║██╔════╝
███████║██████╔╝██║ ███╗██║ ██║███████╗
██╔══██║██╔══██╗██║ ██║██║ ██║╚════██║
██║ ██║██║ ██║╚██████╔╝╚██████╔╝███████║
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
`
lines := utils.SplitLines(asciiArt)
CountModules()
width, _, err := term.GetSize(int(os.Stdout.Fd()))
if err != nil {
fmt.Println("Error getting terminal size:", err)
return
}
for _, line := range lines {
randomColor := colors[rand.Intn(len(colors))]
coloredLine := randomColor(line)
centeredLine := utils.CenterString(coloredLine, width)
fmt.Println(centeredLine)
time.Sleep(50 * time.Millisecond)
}
formatted := fmt.Sprintf(
"%s%s",
cyan("The Ultimate Information Gathering Tool\n\n"),
white("\t\t\t\tVersion: "+green(VERSION))+white("\tModules: "+green(strconv.Itoa(count)))+white("\tCoded by: "+green(AUTHOR)),
)
centeredFormatted := utils.CenterString(formatted, width)
fmt.Println(centeredFormatted)
}