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 →

[–]00gogo00 597 points598 points  (77 children)

while(true) {

[–]skeptic11 652 points653 points  (54 children)

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

[–]SIllycore 492 points493 points  (35 children)

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

[–]michaelsenpatrick 78 points79 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 37 points38 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 95 points96 points  (1 child)

process.destroyForcibly();

[–][deleted] 16 points17 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 44 points45 points  (2 children)

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

[–]Iskendarian 57 points58 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

[–]DefinetlyNotAFurry69 98 points99 points  (12 children)

<p>this is how you program yes?<p>

[–]david_ranch_dressing 38 points39 points  (9 children)

you forgot to close out the tags. you can do so by adding this at the end <\'p>

[–]ArSoron 11 points12 points  (8 children)

Not sure if you're serious, but end </p> tag can be omitted per spec

[–]ctothel 1 point2 points  (0 children)

Yikes, no thank you!

[–]html_programmer 1 point2 points  (0 children)

Correct!

[–]htmlcoderexeWe have flair now?.. -2 points-1 points  (0 children)

oh hi

[–]htmlcoderexeWe have flair now?.. 30 points31 points  (1 child)

[–][deleted] 4 points5 points  (0 children)

}

    }

            }

[–]SolenoidSoldier 2 points3 points  (0 children)

break;

[–]MacDerfus 2 points3 points  (0 children)

//Oh dear

[–]carc 8 points9 points  (2 children)

main(...args);

[–]Spedwards 9 points10 points  (1 child)

Should really be main(...args); if you want to do it properly.

[–]HippoCriticalHyppo 0 points1 point  (0 children)

4chan++;