malnet

package module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 8 Imported by: 0

README

malnet

net wrapper library with interesting functions for creating malicious code

GoDoc codebeat Go Report Card

Installation

go get github.com/41337/malnet

examples

go to /examples to see all examples

Documentation

Overview

net wrapper library with interesting functions for creating malicious code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReceiveShell added in v0.1.3

func ReceiveShell(connection net.Conn, callback ReverseShellCallback) bool

this function receives a shell from the connection then calls the callback with output arguments are: connection:as the name says, the connection handler, callback is a function that you can pass it receives the output you can embed a prompt in it.

func ReciveFile

func ReciveFile(connection net.Conn) error

function to receive file from a connection arguments are: connection:as the name says, the connection handler standard error handling, will come nil if it works

func ReciveInformation added in v0.1.4

func ReciveInformation(connection net.Conn) (string, string)

this function receives information with the title and content of the connection arguments are: connection:as the name says, the connection handler, callback is a function that you can pass it receives the output you can embed a prompt in it. error handling is: if you get an empty string like: "" then no information arrived

func SendFile

func SendFile(path string, connection net.Conn) error

function to send files over a connection arguments are: path:path to the file to be send, connection:as the name says, the connection handler standard error handling, will come nil if it works

func SendFileList

func SendFileList(path string, connection net.Conn) error

function to list local files and send this list over connection arguments are: path:path where the files will be listed, connection:as the name says, the connection handler standard error handling, will come nil if it works

func SendIdentifyingSignal added in v0.1.2

func SendIdentifyingSignal(identification string, connection net.Conn) error

function to send an identification notice to avoid unexpected errors between integrations. think of it as an alert to your code to know what is an id call to receive files or a reverse shell call the argument and the identification flag, and the connection standard error handling, will come nil if it works

func SendInformation added in v0.1.4

func SendInformation(title, content string, connection net.Conn) error

this function sends a title with a content for connection the arguments are: title: information title, content: information content, connection: connection handler standard error handling, will come nil if it works

func SendShell added in v0.1.3

func SendShell(shellCommand string, connection net.Conn) error

this function send reverse shell for connection arguments are: shellCommand:command responsible for starting a shell session (on linux: bash) in windows powershell.exe, connection:as the name says, the connection handler standard error handling, will come nil if it works

func ValidateIdentificationSign added in v0.1.2

func ValidateIdentificationSign(identificationExpected string, connection net.Conn) bool

this function validates a received id then returns if it is valid or not it serves to validate data that is yet to be received, without this data going to a function that does not expect this data the argument and the identification flag, and the connection

Types

type FileList

type FileList struct {
	Filename string
	IsDir    bool
}

typing to a list with file/directory name and confirming if this item is indeed a directory or not

func ReceiveFileList

func ReceiveFileList(connection net.Conn) ([]FileList, error)

function to which receives a list of files from the connection then returns it in the file|isDir format arguments are: connection:as the name says, the connection handler standard error handling, will come nil if it works

type ReverseShellCallback added in v0.1.3

type ReverseShellCallback func(Reader *io.PipeReader) (string, bool)

struct for a reverse shell callback and response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL