-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
37 lines (31 loc) · 724 Bytes
/
Copy pathmain.go
File metadata and controls
37 lines (31 loc) · 724 Bytes
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
package main
import (
"fmt"
"github.com/SUmidcyber/PortPatrol/device"
"github.com/SUmidcyber/PortPatrol/firewall"
"github.com/SUmidcyber/PortPatrol/packets"
)
func main() {
fmt.Println("To monitor and analyze network traffic. [1] \n To close open ports [2]")
fmt.Print("Your choice: ")
var choice string
fmt.Scanln(&choice)
switch choice {
case "1":
device.Interface()
case "2":
packets.Server_ip()
}
fmt.Print("Do you want to close ports from log file [1] or manually [2]?: ")
var closeChoice string
fmt.Scanln(&closeChoice)
switch closeChoice {
case "1":
firewall.OpenFile()
case "2":
fmt.Print("Enter port to close: ")
var port string
fmt.Scanln(&port)
firewall.ClosePort(port)
}
}