Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TrshPuppy/netpuppy
/ functions
Functions
59 in github.com/TrshPuppy/netpuppy
⨍
Functions
59
◇
Types & classes
14
↓ 11 callers
Method
Close
()
cmd/conn/connection.go:53
↓ 5 callers
Method
Read
Used to check real (RealSocket) & test (TestSocket) structs
cmd/conn/connection.go:51
↓ 4 callers
Method
WriteShit
([]byte)
cmd/conn/connection.go:52
↓ 3 callers
Function
CreatePeer
Create the peer struct which will guide the rest of the logic for NetPuppy:
cmd/conn/peer.go:13
↓ 3 callers
Method
Start
(context.Context)
cmd/hosts/host.go:19
↓ 2 callers
Function
Banner
Build and return main banner:
utils/banner.go:6
↓ 2 callers
Function
UserSelectionBanner
Build a banner and return based on the type of peer the user started:
utils/banner.go:35
↓ 2 callers
Function
tcSetAttr
Using Linux tcsetattr() to set specific attributes to the termios struct:
pkg/ioctl/rawmode.go:57
↓ 1 callers
Method
Close
()
cmd/conn/connection.go:179
↓ 1 callers
Function
DisableRawMode
Used to set the terminal back to its OG state:
pkg/ioctl/rawmode.go:35
↓ 1 callers
Function
EnableRawMode
Entrance function (from main.go), returns the original terminal attributes or error:
pkg/ioctl/rawmode.go:9
↓ 1 callers
Method
GetConnectBackInitiatedShell
*....... TO DO ....... // Get shell for Offense-initiated peer: // func (g RealShellGetter) GetOffenseInitiatedShell() ShellInterface { // // } ......
cmd/shell/shell.go:36
↓ 1 callers
Method
GetConnectionFromClient
(int, string, bool)
cmd/conn/connection.go:61
↓ 1 callers
Method
GetConnectionFromClient
(rPort int, address string, shell bool)
cmd/conn/connection.go:194
↓ 1 callers
Method
GetConnectionFromListener
Used to check the real (RealConnectionGetter) & test (TestConnectionGetter) structs:
cmd/conn/connection.go:60
↓ 1 callers
Method
GetConnectionFromListener
(rPort int, address string, shell bool)
cmd/conn/connection.go:199
↓ 1 callers
Function
GetFlags
Get flags from user at execution and attach to struct:
utils/flags.go:13
↓ 1 callers
Function
GetPTSName
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 callers
Function
GetPseudoterminalDevices
()
pkg/pty/pty.go:8
↓ 1 callers
Method
GetReader
()
cmd/conn/connection.go:184
↓ 1 callers
Method
GetWriter
()
cmd/conn/connection.go:189
↓ 1 callers
Function
GrantPT
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 callers
Function
NewHost
(peer *conn.Peer, c conn.ConnectionGetter)
cmd/hosts/host.go:44
↓ 1 callers
Method
Read
()
cmd/conn/connection.go:166
↓ 1 callers
Function
Run
Start the madness:
cmd/exe.go:16
↓ 1 callers
Function
Start
()
pkg/pty/pty.go:14
↓ 1 callers
Function
UnlockPt
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 callers
Method
WriteShit
([]byte)
cmd/conn/connection.go:173
↓ 1 callers
Function
getConnectBack
The Connect-back peer is the client & will connect to the given IP address & port:
cmd/conn/peer.go:36
↓ 1 callers
Function
getOffense
The Offense-type peer is the server and will listen on the any address:
cmd/conn/peer.go:28
↓ 1 callers
Function
tcGetAttr
Using Linux tcgetattr() to get the terminal attributes:
pkg/ioctl/rawmode.go:44
Method
Close
Close the ACTUAL socket:
cmd/conn/connection.go:93
Method
GetConnectionFromClient
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
Method
GetConnectionFromListener
Creat listener-type socket & attach to RealSocket:
cmd/conn/connection.go:131
Method
GetReader
()
cmd/conn/connection.go:54
Method
GetReader
()
cmd/conn/connection.go:98
Method
GetStderrReader
()
cmd/shell/shell.go:65
Method
GetStdinWriter
()
cmd/shell/shell.go:70
Method
GetStdoutReader
()
cmd/shell/shell.go:60
Method
GetWriter
()
cmd/conn/connection.go:55
Method
GetWriter
()
cmd/conn/connection.go:103
Method
Read
Read from the ACTUAL socket on RealSocket struct:
cmd/conn/connection.go:74
Method
Start
(pCtx context.Context)
cmd/hosts/host.go:76
Method
Start
(pCtx context.Context)
cmd/hosts/host.go:220
Method
Start
(pCtx context.Context)
cmd/hosts/host.go:392
Method
StartShell
This essentially wraps the actual exec.Cmd.Start() method:
cmd/shell/shell.go:76
Function
TestBanner
(t *testing.T)
utils/banner_test.go:8
Function
TestCreateConnectBackPeer
(t *testing.T)
cmd/conn/peer_test.go:7
Function
TestCreateOffensePeer
(t *testing.T)
cmd/conn/peer_test.go:36
Function
TestGetConnectionFromClient
(t *testing.T)
cmd/conn/connection_test.go:10
Function
TestGetConnectionFromListener
(t *testing.T)
cmd/conn/connection_test.go:36
Function
TestGetReader
(t *testing.T)
cmd/conn/connection_test.go:99
Function
TestGetWriter
(t *testing.T)
cmd/conn/connection_test.go:110
Function
TestSocketClose
(t *testing.T)
cmd/conn/connection_test.go:73
Function
TestSocketRead
(t *testing.T)
cmd/conn/connection_test.go:57
Function
TestSocketWrite
(t *testing.T)
cmd/conn/connection_test.go:84
Function
TestUserSelectionBanner
(t *testing.T)
utils/banner_test.go:17
Method
WriteShit
Write to the ACTUAL socket on RealSocket struct:
cmd/conn/connection.go:84
Function
main
()
main.go:10