(stage, sleeptime, jitter, useragent, datajitter string, tasks_max_size string, tasks_proxy_max_size string, tasks_dns_proxy_max_size string, httplib string)
| 119 | } |
| 120 | |
| 121 | func GenerateComunication(stage, sleeptime, jitter, useragent, datajitter string, tasks_max_size string, tasks_proxy_max_size string, tasks_dns_proxy_max_size string, httplib string) (string, map[string]string) { |
| 122 | Beacon_Com := &Beacon_Com{} |
| 123 | Beacon_Com.Variables = make(map[string]string) |
| 124 | var HostStageMessage string |
| 125 | if stage == "False" || stage == "false" { |
| 126 | Beacon_Com.Variables["stage"] = "false" |
| 127 | HostStageMessage = "[!] Host Staging Is Disabled - Staged Payloads Are Not Available But Your Beacon Payload Is Not Available To Anyone That Connects" |
| 128 | } else { |
| 129 | Beacon_Com.Variables["stage"] = "true" |
| 130 | HostStageMessage = "[!] Host Staging Is Enabled - Staged Payloads Are Available But Your Beacon Payload Is Available To Anyone That Connects To Your Server To Request It" |
| 131 | } |
| 132 | if sleeptime != "" { |
| 133 | Beacon_Com.Variables["sleep"] = sleeptime + "000" |
| 134 | } else if sleeptime == "" { |
| 135 | Beacon_Com.Variables["sleep"] = Utils.GenerateNumer(30, 75) + "000" |
| 136 | } |
| 137 | if jitter != "" { |
| 138 | Beacon_Com.Variables["jitter"] = jitter |
| 139 | } |
| 140 | if jitter == "" { |
| 141 | Beacon_Com.Variables["jitter"] = Utils.GenerateNumer(10, 40) |
| 142 | } |
| 143 | if datajitter != "" { |
| 144 | Beacon_Com.Variables["datajitter"] = datajitter |
| 145 | } |
| 146 | if datajitter == "" { |
| 147 | Beacon_Com.Variables["datajitter"] = Utils.GenerateNumer(10, 60) |
| 148 | } |
| 149 | |
| 150 | if tasks_max_size != "" { |
| 151 | Beacon_Com.Variables["tasks_max_size"] = tasks_max_size |
| 152 | } else { |
| 153 | Beacon_Com.Variables["tasks_max_size"] = "1048576" |
| 154 | } |
| 155 | if tasks_proxy_max_size != "" { |
| 156 | Beacon_Com.Variables["tasks_proxy_max_size"] = tasks_proxy_max_size |
| 157 | } else { |
| 158 | Beacon_Com.Variables["tasks_proxy_max_size"] = "921600" |
| 159 | } |
| 160 | if tasks_dns_proxy_max_size != "" { |
| 161 | Beacon_Com.Variables["tasks_dns_proxy_max_size"] = tasks_dns_proxy_max_size |
| 162 | } else { |
| 163 | Beacon_Com.Variables["tasks_dns_proxy_max_size"] = "71680" |
| 164 | } |
| 165 | SSH_Numb, _ := strconv.Atoi(Utils.GenerateNumer(0, 4)) |
| 166 | Beacon_Com.Variables["SSH_Banner"] = Struct.SSH_Banner[SSH_Numb] |
| 167 | |
| 168 | pipe_number, _ := strconv.Atoi(Utils.GenerateNumer(0, 7)) |
| 169 | Beacon_Com.Variables["pipename"] = Struct.Pipename_list[pipe_number] + Utils.GenerateNumer(3000, 9000) |
| 170 | Beacon_Com.Variables["pipename_stager"] = Struct.Pipename_list[pipe_number] + Utils.GenerateNumer(1000, 9000) |
| 171 | Beacon_Com.Variables["SSH_pipename"] = Struct.Pipename_list[pipe_number] |
| 172 | if useragent != "" { |
| 173 | if useragent == "Win10Chrome" { |
| 174 | num_agent, _ := strconv.Atoi(Utils.GenerateNumer(0, 9)) |
| 175 | Beacon_Com.Variables["useragent"] = Struct.Useragent_list[num_agent] |
| 176 | } else if useragent == "Win10Edge" { |
| 177 | num_agent, _ := strconv.Atoi(Utils.GenerateNumer(9, 16)) |
| 178 | Beacon_Com.Variables["useragent"] = Struct.Useragent_list[num_agent] |
no test coverage detected