Created
October 12, 2012 07:12
-
-
Save anonymous/3877741 to your computer and use it in GitHub Desktop.
SynSpam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#include <time.h> | |
using namespace std; | |
//LE SLEEP FUNCTIONZOR | |
void sleep(int time) { | |
clock_t start=clock(); | |
while(clock() - start < (time)); | |
} | |
// | |
void TypeStr(char *leString) | |
{ | |
char cChar; | |
while((cChar=*leString++))//Loop through the chars | |
{ | |
short vk=VkKeyScan(cChar); //Turn the char into a virtual key code | |
if((vk>>8)&1){keybd_event(VK_LSHIFT,0,0,0);} //Caps? HOLD SHIFT :O | |
keybd_event((unsigned char)vk,0,0,0); //Press le key | |
keybd_event((unsigned char)vk,0,KEYEVENTF_KEYUP,0); //And release it | |
if((vk>>8)&1){keybd_event(VK_LSHIFT,0,KEYEVENTF_KEYUP,0);} //release shift if its down | |
} | |
} | |
//Heres the big boss :D | |
void Spam(char *msg, bool addRet, int delay) { | |
bool spam = true; | |
while(spam) { //Main loop | |
if(GetAsyncKeyState(VK_BACK)){ //Exit if backspace is down | |
cout << endl << "Exiting..." << endl; | |
spam = false; | |
break; | |
} | |
TypeStr(msg); //Print it | |
if(addRet) { //press enter | |
keybd_event(VK_RETURN,0,0,0); | |
keybd_event(VK_RETURN,0,KEYEVENTF_KEYUP,0); | |
} | |
sleep(delay); //delay | |
} | |
} | |
int main() | |
{ | |
cout << "--------Syn's Shitstorm v1---------" << endl; | |
//Get user options | |
cout << "Line break after each msg?(y/n): "; | |
bool enter = false; | |
char strEnter = '?'; | |
while(strEnter != 'n' && strEnter != 'y') | |
cin >> strEnter; | |
if(strEnter == 'y') { | |
enter = true; | |
} | |
int del; | |
cout << "Enter the delay between msg's(MS):"; | |
cin >> del; | |
cout << "MSG:"; | |
char msg[100]; | |
cin >> msg; | |
cout << "Shitstorm incoming in 3 seconds..."; | |
sleep(3000); | |
Spam(msg, enter, del); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment