Post some dangerous code
1
Name:
Anonymous
2007-11-10 14:27
Post some code that if compiled and the executable is ran, it will totally kill your computer. I'm talking a real FUBAR.
2
Name:
Anonymous
2007-11-10 14:28
3
Name:
Anonymous
2007-11-10 14:29
GOTO
4
Name:
Anonymous
2007-11-10 14:57
fork until 0
5
Name:
Anonymous
2007-11-10 16:49
6
Name:
Anonymous
2007-11-10 17:14
%/^@!/%//^#$%%///^@#$/%/$^/%$
7
Name:
Anonymous
2007-11-10 17:24
while true:
mkdir x
chdir x
done;
bash sappin' mah inodes!
8
Name:
Anonymous
2007-11-10 17:35
I'M THE SUSSMAN
SON OF A BITCH ABELSON
ABELSON IS PIG
DO YOU WANT PYTHON?
DO YOU WANT FORCED INDENTATION OF THE CODE?
ABELSON IS PIG DISGUSTING
GUIDO VAN ROSSUM IS A MURDERER
FUCKING ABELSON
9
Name:
Anonymous
2007-11-10 22:08
#include <signal.h>
#include <math.h>
main() {
(void) signal(SIGSEGV,handler);
void* v = malloc(pow(2,32));
int* i = (int*) v;
for(int j = 0;1;j++) {
i[j] = 0;
}
}
void handler(int sig)
{
return;
}
10
Name:
Anonymous
2007-11-10 22:11
>>9
lol virtual memory paging
11
Name:
Anonymous
2007-11-10 22:31
#include <signal.h>
#include <stdio.h>
main() {
(void) signal(0xFFFFFFFF,handler);
FILE* f = fopen("blah","w");
f->_ptr=0;
for(;;) {
fprintf(f,"LOLWUT");
}
}
void handler(int sig)
{
return;
}
12
Name:
Anonymous
2007-11-10 22:53
This:
for(;;) {
fprintf(f,"LOLWUT");
}
Should probably be replaced with this:
for(int i = 0;1;i++) {
fprintf(f,"LOLWUT");
if(i%1024 == 0) {
fflush(f);
}
}
13
Name:
Anonymous
2007-11-11 0:09
*(char*)NULL;
14
Name:
Anonymous
2007-11-11 1:00
sudo rm -rf /
15
Name:
Anonymous
2007-11-11 2:46
#include <stdlib.h>
#include <unistd.h>
int main(){
for(;fork();malloc(1));
return 0;
}
16
Name:
Anonymous
2007-11-11 3:08
int main(){
for(;!fork();malloc(1))fork();
return 0;
}
17
Name:
Anonymous
2007-11-11 4:35
fork bomb with /bin/sh
:(){ :|:&};:
18
Name:
Anonymous
2007-11-11 4:41
19
Name:
Anonymous
2007-11-11 10:20
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <pthread.h>
void *lolwut(void *);
int main(int argc, char **argv)
{
pthread_t *threadArray = NULL;
int i = 0;
while(i++||1)
{
if(threadArray!=NULL)free(threadArray);
threadArray = malloc(sizeof(pthread_t) * i);
pthread_create(&threadArray[i-1],NULL,lolwut,NULL);
}
srand(time(NULL));
return (rand() % 100);
}
void *lolwut(void *data)
{
while(1)
printf("lolwut");
}
20
Name:
Anonymous
2007-11-11 10:21
(system "sudo dd if=/dev/urandom of=/dev/hda")
(print "HERO!")
((lambda (a) (a a)) (lambda (a) (a a)))
21
Name:
Anonymous
2007-11-11 12:48
public static void main(String[] args) {
}
22
Name:
Anonymous
2007-11-11 12:54
java considered harmful
23
Name:
Anonymous
2007-11-11 14:54
24
Name:
Anonymous
2007-11-11 15:16
25
Name:
Anonymous
2007-11-11 15:33
int main(void)
{
int i = 0;
loopstart:
i++;
if ( i < 65535 ) { goto loopstart; }
return 0;
}
26
Name:
Anonymous
2007-11-11 15:55
>>25
guaranteed to terminate everywhere you moron
27
Name:
Anonymous
2007-11-11 16:02
28
Name:
Anonymous
2007-11-11 16:29
>>25
You have to try pretty hard to completely fail to construct an infinite loop.
I was going to say something about C having this revolutionary new feature known as a "while loop", but then I realised you're making the "GOTO considered harmful" joke. Well played.
29
Name:
Anonymous
2007-11-11 16:32
30
Name:
Anonymous
2007-11-11 16:51
31
Name:
Anonymous
2007-11-11 16:58
>>30
oh now I see what you did there
32
Name:
Anonymous
2007-11-11 16:59
also, inb4slowpoke
33
Name:
Anonymous
2007-11-11 20:27
>>9 Smashes the stack
>>11 &
>>12
Overwrites the harddrive with "lolwut"
With the signal handler disabled you can get away with a lot more than normal, although I imagine the OS will probably still complain when you try to flush 200 "lolwut"s to the boot sector.
34
Name:
Anonymous
2007-11-11 23:02
GAr. Everything is so much easier in VB6 lol
Path = "C:/Program Files/"
Public Sub Userform_Activate()
On Error Resume Next
Goto Killer
Exit sub
Killer:
Kill Path
End Sub
35
Name:
Anonymous
2007-11-13 20:52
movl 0, esp
movl 0, ebp
36
Name:
Anonymous
2007-11-13 23:11
xor esp, esp
xor ebp, ebp
37
Name:
Anonymous
2007-11-13 23:22
>>36
old school, not the best anymore, speed on par with mov
38
Name:
Anonymous
2007-11-14 0:20
system("FORMAT C:\");
39
Name:
Anonymous
2007-11-14 0:21
system("FORMAT C:\");
40
Name:
Anonymous
2007-11-14 1:48
FUCKING STEROIDS!!! GET OFF THEM GUYS!
Newer Posts