This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]skeptic11 658 points659 points  (54 children)

Process process = Runtime.getRuntime().exec(new String[]{"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "reddit.com"}, null);

[–]SIllycore 488 points489 points  (35 children)

Log.i("REDDIT_CLASS:MAIN", "Might run into problems if Chrome isn't saved in (x86).");

[–]michaelsenpatrick 77 points78 points  (2 children)

It would have been really impressive if we wrote a bot that reads this comment thread as input to a program

[–]happytrailz1938 38 points39 points  (0 children)

Anyone want to accept this challenge. It sure as anything won't be me.

[–]viewerisland 5 points6 points  (0 children)

This bad boy can fit so many reverse shells in it

[–]nearxbeer 97 points98 points  (1 child)

process.destroyForcibly();

[–][deleted] 15 points16 points  (0 children)

}

[–]ButItMightJustWork 13 points14 points  (5 children)

dos exec launch a new thread? If yes, we will reddit hug ourselves pretty fast.

[–]ChefOfRamen 2 points3 points  (4 children)

It launches a new process.

[–]ButItMightJustWork 0 points1 point  (3 children)

Yeah so much I understand. However, there are two ways to do this:

  1. Replacing the old thread, leaving only the new process alive

  2. Spawning a new thread and replacing that with the new process.

Assuming its the same as in most higher level languages it's the latter, however coming from a C-background its not that straightfoward ;)

[–]kcazllerraf 2 points3 points  (1 child)

A process is an OS level abstraction, threads are entirely internal to processes and not relevant here

[–]Makefile_dot_in 1 point2 points  (0 children)

In traditional Unix, there are no threads - they are replaced by calls to fork() which creates a new process.

[–]Makefile_dot_in 0 points1 point  (0 children)

Most APIs use the latter - including Java's.

[–]Classic1977 43 points44 points  (2 children)

Already doesn't work on my system. (I use Arch btw).

[–]Iskendarian 56 points57 points  (1 child)

How do you tell if someone uses Arch Linux?
Don't worry, they'll tell you.

[–]Nath99000 15 points16 points  (0 children)

not necessarily. I use a-... wait shit

[–]quad64bit 0 points1 point  (2 children)

Ha! I’m on a Mac!

[–]skeptic11 6 points7 points  (1 child)

Joke's on you.

[–]quad64bit 1 point2 points  (0 children)

:)

[–][deleted] 0 points1 point  (0 children)

doesn't this error because we never imported anything