To contrast with the Useful scripts thread, this is for sharing your most pointless stuff.
I'll start:
This C program literally just allocates exactly 128 bytes of memory to write a random value to it. It then proceeds to only print where the number is located, but not the number itself, and it also frees said space right after, so you can't even have a chance at retrieving it.
I guess you could mess with the size parameter here to do some testing or make it write at a specific memory address, but other than that, it's really pointless.
As for a script, here I have a Bash one that insults you or makes a joke according to the kind of signal you send to it, meaning it can "only" really be killed by
So, what else would you guys add to this list? The more elegantly/complicatedly pointless the better! : )
I'll start:
This C program literally just allocates exactly 128 bytes of memory to write a random value to it. It then proceeds to only print where the number is located, but not the number itself, and it also frees said space right after, so you can't even have a chance at retrieving it.
I guess you could mess with the size parameter here to do some testing or make it write at a specific memory address, but other than that, it's really pointless.
C:
#include <stdio.h>
#include <stdlib.h>
int main() {
long int *rand = malloc(128);
*rand = random();
printf("0x%x\n", rand);
free(rand);
return 0;
}
As for a script, here I have a Bash one that insults you or makes a joke according to the kind of signal you send to it, meaning it can "only" really be killed by
SIGINT, which Bash itself reserves for getting killed when needed (there're more signals that i got too lazy to implement here, but you get the gist):
Bash:
#!/bin/bash
trap "echo Fuck you" SIGHUP
trap "echo No I won\'t!" SIGINT
trap "echo Nuh uh!" SIGQUIT
trap "echo Illegal my ass!" SIGILL
trap "echo More like SIGCRAP!" SIGTRAP
trap "echo You\'re the abortion here" SIGABRT
trap "echo Go to Hell with that bus!" SIGBUS
trap "echo How can this be floating-point if it\'s pointless?" SIGFPE
trap "echo Fuck User 1" SIGUSR1
trap "echo SEGMENTATION fault, not mine!" SIGSEGV
trap "echo Fuck User 2" SIGUSR2
trap "echo Go PIPE your ass instead!" SIGPIPE
trap "echo Wake the fuck up!" SIGALRM
trap "echo Terminal illness" SIGTERM
trap "echo STACK fault, not mine!" SIGSTKFLT
trap "echo What CHILD?" SIGCHLD
trap "echo More like SIGCUNT!" SIGCONT
trap "echo Make me!" SIGSTOP
trap "echo Deal with this." SIGTSTP
trap "echo Titty in" SIGTTIN
trap "echo Titty out" SIGTTOU
trap "echo I don\'t care about your data!" SIGURG
trap "echo You gave your CPU to me, now deal with it." SIGXCPU
trap "echo I don\'t care about limits!" SIGXFSZ
trap "echo Just 5 more minutes!" SIGVTALRM
trap "echo Eek! Don\'t \"profile\" me!" SIGPROF
trap "echo I don\'t care about your window···" SIGWINCH
trap "echo Cool, I don\'t care" SIGIO
trap "echo YOU are the failure here" SIGPWR
trap "echo System call? Never heard of her" SIGSYS
while true; do
printf ""
done
So, what else would you guys add to this list? The more elegantly/complicatedly pointless the better! : )