Ethical Experts


The Ultimate Place to start Discussing your Problems .. :) Join us and Stay Updated ..
 
HomeCalendarFAQSearchUsergroupsRegisterLog in
If you are Applying as a moderator, please complete your profile. Make sure that allt he details in your account is completed, and that you follow the rules of the forum. Thank You
Search
 
 

Display results as :
 
Rechercher Advanced Search
Most Viewed Topics
Hack Your BroadBand !! RISK FREE !!
How to Hack the Windows Admin Password Using OphCrack in Backtrack tutorial
Backtrack and Facebook
How to Get Unlimited time in an Internet Cafe ... :D
Credit Card Generating Sequence
Hacking With Keyloggers Prorat
How to Hack Websites & Servers - Tutorial
Top 10 Password Crackers
Making a SImple Port Scanner In Different languages
Basic LAB Setup For a Hacker
Keywords
crack ATTACKS tutorial Windows credit boot card prorat Dish hide proxy hack page phishing internet hacking account nmap netcat Desktop facebook napping free tools backtrack password
Latest topics
» Wildlife Intarsia A Step By Step Guide To Making 3 Dimensional Wooden Portraits
Today at 3:17 am by gollang

» DETAIL PROJECT REPORT FOR ESTABLISHMENT OF A
Today at 2:52 am by gollang

» Merlin 4x02 The Darkest Hour Hdtv Xvid Fov Avi Rar.rar
Today at 2:16 am by gollang

» Talib Hussain Dard Audio Song
Today at 1:44 am by gollang

» Sample Of Duty Roster For Office Cleaner Zip
Today at 1:29 am by gollang

» Interviu 11-17 Junio 2012.rar
Today at 12:34 am by gollang

» [FULL] Kyai+kanjeng
Today at 12:16 am by gollang

» Sex And The City Original Soundtrack.(pixie09).(IARG)
Today at 12:11 am by gollang

» Zoo Tube Zophillia Torrent
Today at 12:07 am by gollang

Facebook
Similar topics
  • » TCP/IP Port Assinments (Commonly used ports listed)
  • » Simple Rtorrent Guides
  • » Making Guilds
  • » RULES~! Must Read before making topics
  • » CFPRO, X-FIRE, NEWGAMERZONE SIMPLE HACK! PROCESS REVEALER (MAY TUTORIAL DITO PARA TANGGALIN ANG MGA KEYLOGGER NG MGA HACKER NA NAGPOPOST DITO!)
  • » Why Do Hemorrhoids Itch - Tips For Making Worrisome Hemorrhoids Less Uncomfortable
  • » Making Music in SAS:Did you know you could have SAS play music?
  • » area.autodesk.com - Making a simple 3x DMM Cube in Maya 2012 AND Maya 2012 DMM
  • » simple numerical calculation with variables -need help-
  • » mpkappert.weebly.com - Cinema 4D - Making a Simple Window Tutorial by Marco Kappert
  • Social bookmarking
    Social bookmarking Digg  Social bookmarking Delicious  Social bookmarking Reddit  Social bookmarking Stumbleupon  Social bookmarking Slashdot  Social bookmarking Furl  Social bookmarking Yahoo  Social bookmarking Google  Social bookmarking Blinklist  Social bookmarking Blogmarks  Social bookmarking Technorati  

    Bookmark and share the address of Ethical Experts on your social bookmarking website
    Share | .
     

     Making a SImple Port Scanner In Different languages

    View previous topic View next topic Go down 
    AuthorMessage
    r00t_3xpl01t
    Admin
    Admin


    Posts: 141
    Join date: 2012-06-11
    Age: 18

    PostSubject: Making a SImple Port Scanner In Different languages    Wed Aug 15, 2012 3:39 am

    Lets make a simple port scanner with opens a full TCP connection to detect if a port is open or not.
    This is not the best way to scan because it makes a lot of noise, some other ways are Half TCP (TCP SYN) and TCP FIN.
    Code in python::

    import socket
    i = “127.0.0.1″
    for p in range(19, 26):
    spy = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
    spy.connect((i, p)
    )
    print p,” Open”
    except :
    print p,”closed”
    It searches 127.0.0.1 from port 19 to 25. The data is hard coded but sys.argv[] can be used to take arguments from command line.. Python is indent sensitive and here I can’t find any [code] tag so if you copy paste the above code it will give errors the indentation should be corrected to work properly.
    Code in Perl::

    use IO::Socket;
    $port = 19;
    while ($port < 26){
    $spy = new IO::Socket::INET (PeerAddr => '127.0.0.1',
    PeerPort => $port,
    Proto => 'tcp');
    if ($spy){
    close $spy;
    print "$port -open\n";
    $port = $port + 1;
    }
    else{
    print "$port -closed\n";
    $port = $port + 1;
    }
    }

    Code in Ruby::

    require 'socket'
    require 'timeout'
    ports = 19..26
    ports.each do |spy|
    begin
    Timeout::timeout(10){TCPSocket.new("127.0.0.1", spy)}
    rescue
    puts "closed : #{spy}"
    else
    puts "open : #{spy}"
    end
    end
    Code in Java::

    import java.net.*;
    import java.io.IOException;
    public class javaps {
    public static void main(String[] args)
    {
    String remote = "172.16.0.1";
    for (int port = 19; port <= 26; port++) {
    try {
    Socket s = new Socket(remote, port);
    System.out.println("The port " + port + " of " + remote + " is open");
    s.close();
    }
    catch (IOException ex) {
    System.out.println("The port " + port + " of " + remote + " is closed");
    }}}}



    These are just one way of coding port scanners
    Back to top Go down
    View user profile http://shehab3451-hacking.tumblr.com
     

    Making a SImple Port Scanner In Different languages

    View previous topic View next topic Back to top 
    Page 1 of 1

     Similar topics

    -
    » Auto Friend Scanner
    » Need TX-NR809 A/V Receiver network (TCP/IP or UDP) port numbers
    » The advantage of a simple logo design process
    » CF_ShArKs Simple Hack v1.0 for CrossFire NA/PH updated"10/6/2012"
    » Good News For you Guests: Start Making MOre Money

    Permissions in this forum:You cannot reply to topics in this forum
    Ethical Experts :: Noob Level Stuffs (Windows , Hacking, linux, unix Everything All in one )-