-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
56 lines (46 loc) · 1.77 KB
/
Copy pathmain.go
File metadata and controls
56 lines (46 loc) · 1.77 KB
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
package main
import (
"fmt"
"orfinder/engine/loader"
"orfinder/engine/scanner"
"orfinder/parser"
"sync"
)
// Function Welcome()
// Display ascii art
func welcome() {
fmt.Println(`
██████╗ ██████╗ ███████╗██╗███╗ ██╗██████╗ ███████╗██████╗
██╔═══██╗██╔══██╗██╔════╝██║████╗ ██║██╔══██╗██╔════╝██╔══██╗
██║ ██║██████╔╝█████╗ ██║██╔██╗ ██║██║ ██║█████╗ ██████╔╝
██║ ██║██╔══██╗██╔══╝ ██║██║╚██╗██║██║ ██║██╔══╝ ██╔══██╗
╚██████╔╝██║ ██║██║ ██║██║ ╚████║██████╔╝███████╗██║ ██║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚══════╝╚═╝ ╚═╝
ORFinder allows scanning the internet to find SMTP services
vulnerable to open relay attack.
Maintained by Nitrax <[email protected]>
`)
}
// Function main()
// ORFinder entry point
func main() {
var wg sync.WaitGroup
welcome()
country := parser.Parse()
IPs := loader.Load(country)
tasks := make(chan string)
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
for task := range tasks {
scanner.Scan(task)
}
wg.Done()
}()
}
for i := len(IPs) - 1; i >= 0; i-- {
tasks <- IPs[i]
}
close(tasks)
wg.Wait()
}