writing a port scanner in go language

Sunday, March 8, 2020

##CODE##Written_By_Anish#################################################
package main

import (
    "fmt"
    "net"
)

func main() {

for i:= 0; i < 1024; i++ {
    go func(int) {
        address := fmt.Sprintf("IPADDRESS:%d",j)
        fmt.Println("Scanning\n", address)
        conn,err:=net.Dial("tcp",address)
        if err != nil {
            return
        }
            conn.Close()
            fmt.Printf("%d open\n",j)
        
    }(i)
    
    }
}
 
#######################chaos@sheikhchillip:/mnt/e/builds/assembly$ go run ./portavl.go
Scanning
8.8.8.8:2
Scanning
8.8.8.8:28
Scanning
8.8.8.8:48
Scanning
8.8.8.8:81
Scanning
8.8.8.8:101
Scanning
8.8.8.8:325
chaos@sheikhchillip:/mnt/e/builds/assembly$ go run ./portavl.go
Scanning
google.com:20
Scanning
google.com:23
Scanning
google.com:50
Scanning
google.com:5
Scanning
google.com:4
Scanning
google.com:94
chaos@sheikhchillip:/mnt/e/builds/assembly$ go run ./portavl.go
Scanning
accounts.apple.com:0
Scanning
accounts.apple.com:36
Scanning
accounts.apple.com:5
Scanning
accounts.apple.com:90
Scanning
accounts.apple.com:3
Scanning
accounts.apple.com:230
Scanning
accounts.apple.com:301
Scanning
accounts.apple.com:240
chaos@sheikhchillip:/mnt/e/builds/assembly$####################################################


When they said, like you become a real hacker you can hack with windows 98,
only depends what are you trying to achieve.
never think kali linux or some pentest distro gonna help.





0 comments :

Post a Comment