-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
53 lines (43 loc) · 822 Bytes
/
main.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
package main
import (
"fmt"
"os"
"os/exec"
"runtime"
"time"
)
func main() {
fmt.Println("Welcome to the chan crawler!")
// var x string
// fmt.Scanf("%s", &x)
var scanning [2]string
scanning[0] = "8chan"
scanning[1] = "/b/"
for {
makescreen(scanning)
time.Sleep(time.Second)
}
}
func makescreen(scanning [2]string) {
clearscreen() // Clear the screen
fmt.Println("########################Chan Crawler########################")
fmt.Println("Currently scanning:")
fmt.Printf("%s - %s", scanning[0], scanning[1])
}
func clearscreen() {
var c *exec.Cmd
var doClear = true
switch runtime.GOOS {
case "darwin":
case "linux":
c = exec.Command("clear")
case "windows":
c = exec.Command("cmd", "/c", "cls")
default:
doClear = false
}
if doClear {
c.Stdout = os.Stdout
c.Run()
}
}