I use a bruteforcer (ncrack + visual c++) and someone told me to use this code to open more threads,this is the code,i don't know how to use it can someone show me the steps,please?where do i Paste this code?many many thanksssss
code:
#include "stdafx.h"
#define _MT
#include <windows.h>
#include <process.h> /* _beginthread, _endthread */
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "libcmt.lib")
#pragma comment(linker, "/NODEFAULTLIB:libcd.lib")
void ThreadFunction1(void *ch);
void ThreadFunction2(void *dummy);
BOOL repeat = TRUE; /* Global repeat flag */
int main(){
printf("\nMultithreading with two threads.\n\n");
printf("Thread Function 2 listens for key strokes. \n");
printf("Thread Function 1 does all the other work \n");
printf(" \n");
CHAR ch = 'A';
/* Launch ThreadFunction2 thread to check for terminating keystroke. */
_beginthread(ThreadFunction2, 0, NULL);
/* Loop until ThreadFunction2 terminates program. */
while (repeat){
/* On first loops, launch character threads. */
_beginthread(ThreadFunction1, 0, (void *)(ch++));
/* Wait one second between loops. */
Sleep(1000L);
}
printf(" \n");
return 0;
}
/* ThreadFunction2 - Thread to wait for a keystroke, then end program. */
void ThreadFunction2(void *dummy){
_getch();
repeat = 0; /* _endthread implied */
}
/* ThreadFunction2 - Thread to do work */
void ThreadFunction1(void *ch){
while (repeat){
/* Pause between loops. */
Sleep(100L);
}
/* _endthread given to terminate */
_endthread();
}