Mesa duket nuk jeni i regjistruar, kliko ne butonin Regjisrohu nqs dëshironi të bëheni pjesë e forumit tonë, per t'u regjistruar ju hargjoni maksimumi 1 min kohë. Me respekt Staffi.
Mesa duket nuk jeni i regjistruar, kliko ne butonin Regjisrohu nqs dëshironi të bëheni pjesë e forumit tonë, per t'u regjistruar ju hargjoni maksimumi 1 min kohë. Me respekt Staffi.
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
ForumPortaliKërkoLatest imagesRegjistrohuidentifikimiChatBilardo

 

 Port scanner ne C++

Shko poshtë 
AutoriMesazh
NoIsY
Super moderator
Super moderator
avatar


Postimet : 454
Vendodhja : n'Kamenic
Puna / Hobi : Hacker

Port scanner ne C++ Empty
MesazhTitulli: Port scanner ne C++   Port scanner ne C++ Icon_minitimeSat Dec 05, 2009 1:13 am

Kodi:

#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>

int main(int argc,char *argv[])
{
int sock, port;
struct sockaddr_in host;
struct hostent *server;
if(argc != 2){
printf("Keni 0c\'s port scanner\nUsage: %s [host address]\n",argv[0]);
return 1;
}
if((sock = socket(AF_INET,SOCK_STREAM,0)) == -1){
perror("Gabim ne krijimin e socket-it");
return 1;
}
if((server=gethostbyname(argv[1])) == NULL){
perror("Gabin ne host");
return 1;
}
for(port = 0; port <= 65535; port++){
host.sin_family = AF_INET;
host.sin_port = htons(port);
host.sin_addr = *((struct in_addr *)server->h_addr);
if(connect(sock,(struct sockaddr *)&host,sizeof(host)) != -1){
printf("Porti %d eshte i hapur ",port);
continue;
}
}
return 0;
}

aLbpiXeL nuk është në linjë Përgjigju duke Cituar
Mbrapsht në krye Shko poshtë
http://www.deshira-juaj.tk/
 
Port scanner ne C++
Mbrapsht në krye 
Faqja 1 e 1
 Similar topics
-
» SoftPrefect network scanner
» SQL Helper + Exploit Scanner + Dorks

Drejtat e ktij Forumit:Ju nuk mund ti përgjigjeni temave të këtij forumi
 :: Paneli i Kontrollit :: Gjuhe Programuese-
Kërce tek: