Add insulting program

This commit is contained in:
Gerard Wagener 2010-01-08 18:08:10 +01:00
parent 6b61d01bb4
commit efcbc9b988

26
aha/insult.c Normal file
View file

@ -0,0 +1,26 @@
/*
* Insulting program that should be installed on the honeypot.
* The kernel then swaps the filename for do_execve with this one
*
* (c) 2010 Gerard Wagener
* LICENSE GPL
*/
#include <stdio.h>
#include <stdlib.h>
#define N 4
char* list[] = {"Fuck you",
"Is that all? I want to do more ...",
"Go away",
"I love you"};
int main(int argc, char* argv[]){
int idx;
if (argc==2){
idx=atoi(argv[1]);
if ((idx>=0) && (idx<N))
printf("%s\n",list[idx]);
return 0;
}
return 1;
}