forked from Yariya/Zmap-ProxyScanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stat.go
35 lines (30 loc) · 797 Bytes
/
stat.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
/*
(c) Yariya
*/
package main
import (
"fmt"
"sync/atomic"
"time"
)
var (
imported uint64
checked uint64
success uint64
statusCodeErr uint64
proxyErr uint64
timeoutErr uint64
)
func Stater() {
for range time.Tick(time.Second) {
fmt.Printf("Imported [\u001B[34m%d\u001B[39m] IPs Checked [\u001B[34m%d\u001B[39m] IPs (Success: \033[32m%d\033[39m, StatusCodeErr: \u001B[31m%d\u001B[39m, ProxyErr: \u001B[31m%d\u001B[39m, Timeout: \u001B[31m%d\u001B[39m) with \u001B[34m%d\u001B[39m open http threads\n",
atomic.LoadUint64(&imported),
atomic.LoadUint64(&checked),
atomic.LoadUint64(&success),
atomic.LoadUint64(&statusCodeErr),
atomic.LoadUint64(&proxyErr),
atomic.LoadUint64(&timeoutErr),
atomic.LoadInt64(&Proxies.openHttpThreads),
)
}
}