Jedi Scanner v.1.0

Sep 20, 2012 at 7:11pm
closed account (ozUkoG1T)
Hey c++ forums,
I have made an scanner called Jedi Scanner v.1.0 .

Features:
__________________________________________________________________________________
1. The program is created using win32 application in Microsoft visual studio ultimate 2010.
2. Program is very simple to use just enter host. The Scan is very fast the IP address are very fast to be shown.
3.The name is cool
__________________________________________________________________________________

Enjoy.
Last edited on Sep 20, 2012 at 8:43pm
Sep 20, 2012 at 10:23pm
1) What does the program do? I assume it scans, but what does it scan? What purpose does it have / why is it useful?

2) How can we 'enjoy' it when you don't provide any way for us to try it out?

3) With a name like "cyberwarfare", even if it were available for download, it seems very sketchy and I would not want to blindly run it without seeing the source.
Sep 21, 2012 at 12:41am
i wouldnt even run it with source. whose to say that its the right source. and it scans jedis duh.... :)
Sep 21, 2012 at 4:16pm
closed account (ozUkoG1T)
Disch i do not get why on earth i would gain by destroying computers i put my user like that so i just like the name so i did any way the source code:
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
#include <winsock.h>
#include <windows.h>
#include <iostream>
#include<stdio.h>
#include<conio.h>
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "wsock32.lib")
#define NO_FLAGS_SET 0
#define PORT 80
#define MAXBUFLEN 20480 
using namespace std;
int main(void)
{
    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(EMPIRERAIDER)...\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;
}



I have put some other difines and varibles because i need to add more things to make it is better
what it does ?
The scan tell the client about the ip address
Last edited on Oct 9, 2012 at 8:23pm
Sep 21, 2012 at 4:22pm
So... It's an nslookup? This could have been done with a single system call.
Sep 21, 2012 at 4:35pm
whose to say that its the right source
you, because you build it...

@ResidentBiscuit: ¿your point? think of it as an alternative, besides in this way you could modify it to your needs.
Edit: or you mean system call as in `function provided by the kernel'
Last edited on Sep 21, 2012 at 4:42pm
Sep 21, 2012 at 5:11pm
 
host_name = (char*) malloc(sizeof(char*)*128);

 
host_name[strlen(host_name)] = '\0';

Awesome.
Last edited on Sep 21, 2012 at 5:12pm
Sep 21, 2012 at 5:26pm
helios wrote:
Awesome.


Very good practice, actually. Find the null terminator, and set it to null a second time to make absolutely certain it *stays* null, dammit!

And malloc'ing an array of char*'s is much better than just an array of chars...on most modern systems, you'll get 8 times as much space, a very welcome bonus!
Last edited on Sep 21, 2012 at 5:27pm
Sep 21, 2012 at 5:50pm
closed account (ozUkoG1T)
thanks
Sep 21, 2012 at 5:52pm
closed account (ozUkoG1T)
yes but nslookup type commands are very good but sometimes dangerous anyway i like programming so i done it the challeging way.
Sep 21, 2012 at 6:18pm
or you mean system call as in `function provided by the kerne

That's what I meant by system call. I didn't mean actually calling system() from the program.

yes but nslookup type commands are very good but sometimes dangerous anyway i like programming so i done it the challeging way


I'm not aware of a situation where nslookup would be dangerous unless your system is compromised. But yea if this for practice then it's great. Couple small things I noticed, but looks good. I just thought this was something you were trying to get people to use widely.
Sep 21, 2012 at 8:21pm
closed account (1yR4jE8b)
host_name = (char*) malloc(sizeof(char*)*128);
host_name[strlen(host_name)] = '\0';

Awesome.


I agree. /s

So many problems in only 2 lines of code :S
Topic archived. No new replies allowed.