MCPcopy Create free account

hub / github.com/TrshPuppy/netpuppy / functions

Functions59 in github.com/TrshPuppy/netpuppy

↓ 11 callersMethodClose
()
cmd/conn/connection.go:53
↓ 5 callersMethodRead
Used to check real (RealSocket) & test (TestSocket) structs
cmd/conn/connection.go:51
↓ 4 callersMethodWriteShit
([]byte)
cmd/conn/connection.go:52
↓ 3 callersFunctionCreatePeer
Create the peer struct which will guide the rest of the logic for NetPuppy:
cmd/conn/peer.go:13
↓ 3 callersMethodStart
(context.Context)
cmd/hosts/host.go:19
↓ 2 callersFunctionBanner
Build and return main banner:
utils/banner.go:6
↓ 2 callersFunctionUserSelectionBanner
Build a banner and return based on the type of peer the user started:
utils/banner.go:35
↓ 2 callersFunctiontcSetAttr
Using Linux tcsetattr() to set specific attributes to the termios struct:
pkg/ioctl/rawmode.go:57
↓ 1 callersMethodClose
()
cmd/conn/connection.go:179
↓ 1 callersFunctionDisableRawMode
Used to set the terminal back to its OG state:
pkg/ioctl/rawmode.go:35
↓ 1 callersFunctionEnableRawMode
Entrance function (from main.go), returns the original terminal attributes or error:
pkg/ioctl/rawmode.go:9
↓ 1 callersMethodGetConnectBackInitiatedShell
*....... TO DO ....... // Get shell for Offense-initiated peer: // func (g RealShellGetter) GetOffenseInitiatedShell() ShellInterface { // // } ......
cmd/shell/shell.go:36
↓ 1 callersMethodGetConnectionFromClient
(int, string, bool)
cmd/conn/connection.go:61
↓ 1 callersMethodGetConnectionFromClient
(rPort int, address string, shell bool)
cmd/conn/connection.go:194
↓ 1 callersMethodGetConnectionFromListener
Used to check the real (RealConnectionGetter) & test (TestConnectionGetter) structs:
cmd/conn/connection.go:60
↓ 1 callersMethodGetConnectionFromListener
(rPort int, address string, shell bool)
cmd/conn/connection.go:199
↓ 1 callersFunctionGetFlags
Get flags from user at execution and attach to struct:
utils/flags.go:13
↓ 1 callersFunctionGetPTSName
Using CGo to call ptsname_r() which is part of stdlib.h. We need this to get the slave device file name: ....... https://linux.die.net/man/3/ptsname
pkg/pty/ptsname.go:50
↓ 1 callersFunctionGetPseudoterminalDevices
()
pkg/pty/pty.go:8
↓ 1 callersMethodGetReader
()
cmd/conn/connection.go:184
↓ 1 callersMethodGetWriter
()
cmd/conn/connection.go:189
↓ 1 callersFunctionGrantPT
Use cgo to call grantpt() which grants our master device access to the slave device: ....... https://linux.die.net/man/3/grantpt
pkg/pty/grantpt.go:21
↓ 1 callersFunctionNewHost
(peer *conn.Peer, c conn.ConnectionGetter)
cmd/hosts/host.go:44
↓ 1 callersMethodRead
()
cmd/conn/connection.go:166
↓ 1 callersFunctionRun
Start the madness:
cmd/exe.go:16
↓ 1 callersFunctionStart
()
pkg/pty/pty.go:14
↓ 1 callersFunctionUnlockPt
Use cgo to call unlockpt() which unlocks our pseudoterminal master/ slave pair: ....... https://linux.die.net/man/3/unlockpt
pkg/pty/unlockpt.go:19
↓ 1 callersMethodWriteShit
([]byte)
cmd/conn/connection.go:173
↓ 1 callersFunctiongetConnectBack
The Connect-back peer is the client & will connect to the given IP address & port:
cmd/conn/peer.go:36
↓ 1 callersFunctiongetOffense
The Offense-type peer is the server and will listen on the any address:
cmd/conn/peer.go:28
↓ 1 callersFunctiontcGetAttr
Using Linux tcgetattr() to get the terminal attributes:
pkg/ioctl/rawmode.go:44
MethodClose
Close the ACTUAL socket:
cmd/conn/connection.go:93
MethodGetConnectionFromClient
These next 2 function create the ACTUAL socket and attach the connection to RealSocket ..... Create client-type socket & attach to RealSocket:
cmd/conn/connection.go:110
MethodGetConnectionFromListener
Creat listener-type socket & attach to RealSocket:
cmd/conn/connection.go:131
MethodGetReader
()
cmd/conn/connection.go:54
MethodGetReader
()
cmd/conn/connection.go:98
MethodGetStderrReader
()
cmd/shell/shell.go:65
MethodGetStdinWriter
()
cmd/shell/shell.go:70
MethodGetStdoutReader
()
cmd/shell/shell.go:60
MethodGetWriter
()
cmd/conn/connection.go:55
MethodGetWriter
()
cmd/conn/connection.go:103
MethodRead
Read from the ACTUAL socket on RealSocket struct:
cmd/conn/connection.go:74
MethodStart
(pCtx context.Context)
cmd/hosts/host.go:76
MethodStart
(pCtx context.Context)
cmd/hosts/host.go:220
MethodStart
(pCtx context.Context)
cmd/hosts/host.go:392
MethodStartShell
This essentially wraps the actual exec.Cmd.Start() method:
cmd/shell/shell.go:76
FunctionTestBanner
(t *testing.T)
utils/banner_test.go:8
FunctionTestCreateConnectBackPeer
(t *testing.T)
cmd/conn/peer_test.go:7
FunctionTestCreateOffensePeer
(t *testing.T)
cmd/conn/peer_test.go:36
FunctionTestGetConnectionFromClient
(t *testing.T)
cmd/conn/connection_test.go:10
FunctionTestGetConnectionFromListener
(t *testing.T)
cmd/conn/connection_test.go:36
FunctionTestGetReader
(t *testing.T)
cmd/conn/connection_test.go:99
FunctionTestGetWriter
(t *testing.T)
cmd/conn/connection_test.go:110
FunctionTestSocketClose
(t *testing.T)
cmd/conn/connection_test.go:73
FunctionTestSocketRead
(t *testing.T)
cmd/conn/connection_test.go:57
FunctionTestSocketWrite
(t *testing.T)
cmd/conn/connection_test.go:84
FunctionTestUserSelectionBanner
(t *testing.T)
utils/banner_test.go:17
MethodWriteShit
Write to the ACTUAL socket on RealSocket struct:
cmd/conn/connection.go:84
Functionmain
()
main.go:10