how to create thread on windows?
-
i use ncrack and in installed all this(visual studio 2005,2008,2010,2013) so ncrack working with visual c++. im wondering how can i create more threads?i foudn this but i don't know how to apply!I must open visual c++?create project? Creating Threads (Windows)[^]
-
i use ncrack and in installed all this(visual studio 2005,2008,2010,2013) so ncrack working with visual c++. im wondering how can i create more threads?i foudn this but i don't know how to apply!I must open visual c++?create project? Creating Threads (Windows)[^]
-
i use ncrack and in installed all this(visual studio 2005,2008,2010,2013) so ncrack working with visual c++. im wondering how can i create more threads?i foudn this but i don't know how to apply!I must open visual c++?create project? Creating Threads (Windows)[^]
Try this:
#include "stdafx.h"
#define _MT
#include
#include /* _beginthread, _endthread */
#include
#include
#include
#include#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();
}
-
Try this:
#include "stdafx.h"
#define _MT
#include
#include /* _beginthread, _endthread */
#include
#include
#include
#include#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();
}
For windows right?so this source will work for ncrack force bruter right?I don't know how to sue this code?must open visual c++ ?
-
For windows right?so this source will work for ncrack force bruter right?I don't know how to sue this code?must open visual c++ ?
-
yes i use 20-30 threads if i use more i receive errors,nsock timeouts! nsock errors! etc...so i need to put that code somewhere but i don't know how?
-
yes i use 20-30 threads if i use more i receive errors,nsock timeouts! nsock errors! etc...so i need to put that code somewhere but i don't know how?
-
Member 11189357 wrote:
i need to put that code somewhere but i don't know how?
And you think maybe we can guess? We have no idea what your code is supposed to be doing, or what you are trying to achieve with these threads.
ncrack -vv -d7 --user admin -P list1.txt 81.196.251.12:3389,CL=20,cd=320ms -oN good.txt -f CL=means maximum threads 20 , becouse if i use more...i receive nsock errors tools i use are ( ncrack +visual c++)
-
ncrack -vv -d7 --user admin -P list1.txt 81.196.251.12:3389,CL=20,cd=320ms -oN good.txt -f CL=means maximum threads 20 , becouse if i use more...i receive nsock errors tools i use are ( ncrack +visual c++)
So you are trying a brute force attack on a site via the remote desktop access (port 3389) as user admin with a set dictionary of passwords, and you want us to help you?????? There is no good or legal reason you would need to do such a thing, so that leaves only illegal. Not going to happen :-) Interesting target: RIPE Network Coordination Centre descr: RCS & RDS Residential descr: City: Bucuresti
In vino veritas
-
So you are trying a brute force attack on a site via the remote desktop access (port 3389) as user admin with a set dictionary of passwords, and you want us to help you?????? There is no good or legal reason you would need to do such a thing, so that leaves only illegal. Not going to happen :-) Interesting target: RIPE Network Coordination Centre descr: RCS & RDS Residential descr: City: Bucuresti
In vino veritas
i use a sock 5 to connect so that's not my real IP, what ur tryng to proove?that ur superman?
-
i use a sock 5 to connect so that's not my real IP, what ur tryng to proove?that ur superman?
Good to see you aren't stupid enough to be trying to develop something illegal and give up your own IP ... gratz you get a +1 for IQ in my books and the the authorities may not kick in your door one evening.
In vino veritas
-
Good to see you aren't stupid enough to be trying to develop something illegal and give up your own IP ... gratz you get a +1 for IQ in my books and the the authorities may not kick in your door one evening.
In vino veritas
ok man
-
So you are trying a brute force attack on a site via the remote desktop access (port 3389) as user admin with a set dictionary of passwords, and you want us to help you?????? There is no good or legal reason you would need to do such a thing, so that leaves only illegal. Not going to happen :-) Interesting target: RIPE Network Coordination Centre descr: RCS & RDS Residential descr: City: Bucuresti
In vino veritas
-
ncrack -vv -d7 --user admin -P list1.txt 81.196.251.12:3389,CL=20,cd=320ms -oN good.txt -f CL=means maximum threads 20 , becouse if i use more...i receive nsock errors tools i use are ( ncrack +visual c++)
It sounds like you are wanting to know how to use a network authentication cracker. :rolleyes: How exactly is this a C / C++ / MFC question? :confused:
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Try this:
#include "stdafx.h"
#define _MT
#include
#include /* _beginthread, _endthread */
#include
#include
#include
#include#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();
}
Note: prefer _beginthreadex over _beginthread. If using C++11, you could use the std::thread class.