Image
 
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 17 guests and 1 member online
EH-Net Donations

Enter Amount:
$

Google Ads
EH-Net News Feeds
Latest Additions
Book Recommendations





 
Advertisement

You are here: Home arrow Forum
Ethical Hacker Community Forums
December 02, 2008, 10:57:21 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: ChicagoCon 2-Day Ethical Hacking Conference with MS Blue Hats Oct 31 - Nov 1. Tickets Only $100! www.chicagocon.com/content/view/103/51/
 
  Home Help Calendar Login Register  
  Show Posts
Pages: [1]
1  Features / /root / Re: [Article]-EH-Net Exclusive: BackTrack 3 Teaser Video on: June 29, 2008, 08:54:30 AM
Backtrack 3 beta is excellent it has more driver support. So if anyone is looking for a new pentesting enviroment even though backtrack 2 is in its beta stage i would recommend it as it runs smoothly and ive had no problems with it so far.

Any help needed just pm me Wink
2  Ethical Hacking Discussions and Related Certifications / Hardware / Re: IronKey a joke ! Lets put it to the test! on: June 28, 2008, 04:25:16 PM
It looks like a decent piece of kit but forking out $150 for it is abit too much Wink

 Grin
3  Ethical Hacking Discussions and Related Certifications / Programming / [C ] Simple TCP Port Scanner Coded by Me on: June 17, 2008, 08:24:23 PM
This is a simple port scanner coded in c. It uses a simple socket and a for loop. The port scanner uses TCP Connect  to check whether the port is opened or closed.

This is for beginners who are trying to grasp simple sockets in C.

By the way this is for linux platform you can easily compile this on win32 using cygwin.

/* A TCP port scanner created by billy www.softhardware.co.uk*/

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


/* Main programs starts*/
int main(int argc, char **argv)
{
   int   sd;         //socket descriptor
   int    port;         //port number
   int   start;         //start port
   int    end;         //end port
   int    rval;         //socket descriptor for connect   
   char    responce[1024];      //to receive data
   char   *message="shell";       //data to send
   struct hostent *hostaddr;   //To be used for IPaddress
   struct sockaddr_in servaddr;   //socket structure
   
   if (argc < 4 )
   {
      printf("------Created By www.Softhardware.co.uk-----------\n");
      printf("--------------------------------------------------\n");
      printf("Usage: ./tscan <IPaddress> <Start Port> <End Port>\n");
      printf("--------------------------------------------------\n");
      return (EINVAL);
   }
   start = atoi(argv[2]);
   end   = atoi(argv[3]);
   for (port=start; port<=end; port++)
   {

         //portno is ascii to int second argument     

   sd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); //created the tcp socket
   if (sd == -1)
   {
     perror("Socket()\n");
     return (errno);
   }   

   memset( &servaddr, 0, sizeof(servaddr));

   servaddr.sin_family = AF_INET;
   servaddr.sin_port = htons(port); //set the portno
   
   hostaddr = gethostbyname( argv[1] ); //get the ip 1st argument
   
   memcpy(&servaddr.sin_addr, hostaddr->h_addr, hostaddr->h_length);
     
   //below connects to the specified ip in hostaddr
   
 

   rval = connect(sd, (struct sockaddr *) &servaddr, sizeof(servaddr));
   if (rval == -1)
   {
   printf("Port %d is closed\n", port);
   close(sd);
   }
   else
   printf("Port %d is open\n",port);
   
   close(sd);         //socket descriptor
   }
   
}
 
thanks
 Grin
4  Resources / Links to cool sites. / www.softhardware.co.uk on: June 17, 2008, 08:18:39 PM
Website on programming, hardware, software and networks
5  Features / Book Reviews / Re: [Article]-LAN Switch Security: What Hackers Know About Your Switches on: June 17, 2008, 08:16:56 PM
Nice thanks for that  Grin
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.092 seconds with 22 queries.
 
Sponsors

cwnp_moto__120x90.gif

Polls
During the most recent election, I:
 
Support EH-Net


Support EH-Net by
Buying all of your
Amazon items using
the search bar above.

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!
Recent Forum Topics
Vote For EH-Net

progenic.com
Click here to Vote!

Sadikhov.com
Top IT Cert Sites

binarica.com
Binarica Logo

Add to Technorati Favorites
technorati fave

 
         
Advertisement

© 2008 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.