MCPcopy Create free account
hub / github.com/adeljck/MS17-010 / SetShellcodeFile

Method SetShellcodeFile

metadatas/metadata.go:128–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 utils.CreateLog(MetaData.TargetIp, MetaData.LogDir, MetaData.ProjectName)
127}
128func (M *Meta) SetShellcodeFile() {
129 ShellcodeFile := ""
130 for {
131 fmt.Printf(utils.ColorPrint(1, "Set DOUP ShellcodeFile:"))
132 fmt.Scanf("%s\n", &ShellcodeFile)
133 if ShellcodeFile == "" || !utils.CheckPathLegal(ShellcodeFile) {
134 fmt.Println(utils.ColorPrint(-1, "Wrong Shellcode File Path "))
135 continue
136 } else {
137 _, err := os.Stat(ShellcodeFile)
138 if os.IsNotExist(err) {
139 fmt.Println(utils.ColorPrint(-1, "Shellcode File Not Exists."))
140 continue
141 }
142 M.ShellcodeFile = ShellcodeFile
143 M.ShellcodeBuffer = utils.BinToHex(ShellcodeFile)
144 break
145 }
146 }
147 fmt.Println(utils.ColorPrint(0, "ShellcodeFile ==> "+M.ShellcodeFile))
148 fmt.Println(utils.ColorPrint(0, "ShellcodeBuffer ==> "+M.ShellcodeFile))
149
150}
151func (M *Meta) SetTargetPort() {
152 TargetPort := ""
153 for {

Callers 1

EternalSynergyFunction · 0.80

Calls 3

ColorPrintFunction · 0.92
CheckPathLegalFunction · 0.92
BinToHexFunction · 0.92

Tested by

no test coverage detected