My latest creation

closed account (ozUkoG1T)
Hey c++ forums,
I have been recently working on an toolkit which may or may not come in handy depending on what kind of person you are this tool kit is designed for mostly hackers. Forgive me if it is useless but any way i still have not finished it yet. I am in transition to converting it into an choose n' run type programs the IP scanner is finished but UDP stuff is still going to be developed further the code so far is not finished. Till now it is an good job for a hours worth of work though. The next thing i am going to be going is to add port option for the target and the IP or the website for the target. The toolkit is also going to include port scanner. The next version is going to be shown again.This is ideal for people with no hacking knowledge. p.s By the way the UDP flooder is still not finished it is still in development stages. The toolkit should not be used for unethical hacking (Black hat hacking)but rather for Ethical hacking (white hat hacking). By the way i am not in any way an unethical hacker.The source so far please do not take without permission. Thanks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#pragma comment(lib,"ws2_32.lib")
#include<winsock2.h>
#include<windows.h>
#include<iostream> 
#include<conio.h>
#include<stdio.h>
#define PORT 80 
using namespace std; 
int main()
{
int choice;
system("color 0a");
WSAData wsaData;
WORD Dllversion=MAKEWORD(2,2);
int startup_Retval=WSAStartup(Dllversion,&wsaData);
SOCKET sSocket=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
SOCKADDR_IN addr;
addr.sin_addr.s_addr=inet_addr("127.0.0.1");
addr.sin_family=AF_INET;
addr.sin_port=htons(2222);
char buf[64]="Mary had a little lamp";
back:
system("cls");
cout<<"*********************\n";
cout<<"Welcome to Cyberspace\n";
cout<<"*********************\n";
cout<<"1.Ip scanner\n";
cout<<"2.UDP Flooder\n";
cout<<"Choice: ";
cin>>choice;
if(choice==1);
{
	system("cls");
	 loop:
	WSADATA Data;
    SOCKADDR_IN recvSockAddr;
    SOCKET recvSocket;
	int status;
	hostent* remoteHost;
	char* ip;
	char* host_name;
	status = WSAStartup(MAKEWORD(2, 2), &Data);
	system("title Jedi Scanner");
	cout<<"_______________________________________________________________________________\n";
	cout<<"                   ~ Jedi scanner beta v.1.0 ~              \n"; 
	cout<<"_______________________________________________________________________________\n";
	cout<<"Created by Cyberwarfare...\n\n\n";
cout << "Name of website (www.google.com): \n";
	host_name = (char*) malloc(sizeof(char*)*128);
	cin >> host_name;
	host_name[strlen(host_name)] = '\0'; 
	remoteHost = gethostbyname(host_name);
	cout<<remoteHost<<"\n";
	ip = inet_ntoa(*(struct in_addr *)*remoteHost->h_addr_list);
	system("cls");
	printf("IP address is: %s \n", ip);
	getch();
	system("cls");
    memset(&recvSockAddr, 0, sizeof(recvSockAddr)); 
    recvSockAddr.sin_port=htons(PORT); 
    recvSockAddr.sin_addr.s_addr= inet_addr(ip);
	recvSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
   getch();
   goto loop;
}
if(choice==2)
{
	system("cls");
int send_RetVal=sendto(sSocket,buf,64,NULL,(SOCKADDR*)&addr,sizeof(addr));
if(send_RetVal== SOCKET_ERROR){
cout<<"An error occured in this operation"<<endl;
getchar();}
cout<<"sent: "<<buf<<endl;
cin.get();
getchar();
goto back;

}
}
Last edited on
I will not take your source. I would like only to point out that the code that contains goto statements as for example goto loop; and goto back; has little chance that it will be interesting to somebody.:)
I agree with vlad from moscow, those gotos can easily be replaced with real loops. I do not agree with who ever reported the OP, it should be in the lounge but that's hardly a report-able offense.
closed account (zb0S216C)
Cyberwarfare wrote:
"The source so far please do not take without permission."

You've posted your code in a public forum, and you're asking people not to copy your code? Chances are, hundreds of copies would've been made by now. Not everyone asks from permission; they're called pirates.

So what exactly does this program do? What are its features? How does this program distinguish itself from the other, free software out there?

Now, to attack your code:

1) You're mixing C & C++ -- why? C-style casts are nowhere near as safe as the C++ type-casting operators.
2) Why are you using "goto"? Don't get me wrong, they're OK in some places, but your use of them is questionable.

3) You're using "system( )", which is a security flaw, and no self-respecting hacker will use a program that an anti-virus detects as malicious. "system( )" is the sign of a neophyte, by the way.

4) There's no comments, so how are we supposed to know how the program works, or even know what happens in certain parts of the program's flow?

5) I see calls to "malloc( )", but not not "free( )" -- why?

I wouldn't worry too much about people stealing your program.

Wazzak

You've posted your code in a public forum, and you're asking people not to copy your code? Chances are, hundreds of copies would've been made by now. Not everyone asks from permission; they're called pirates open source zealots - yet they have the decency to refactor a couple of your variable names.


Fixed. :)

[/troll]

It would seem to me at least that the "best" way to keep black-hatters from using your software is to include a non-free license. After all, it's mostly the black-hatters that think it's "uber kool" to fight the system by using free hackware.
Last edited on
Topic archived. No new replies allowed.