Ethical Experts
Ethical Experts

A Community Dedicated to Helping and Learning . Here You Will Get Hacking Tutorials and Monetizing Methods . We Hope You Have a Pleasant Stay
 
HomeHome  SearchSearch  FAQFAQ  RegisterRegister  Log in  
Still Currently working on the forum design, until I find a perfect design that can sit there for the whole life :p .. Please Bare with us if you see the design change while / after you refresh a page or return ! Sorry for the Inconvenience ~!
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Backtrack and Facebook
Thu Apr 03, 2014 5:39 am by Hafiz Hamid

» Bypass Any Windows Password Using ISO Tools
Sat Mar 22, 2014 5:31 pm by namannaman724

» Hacking Email ID's
Sat Mar 22, 2014 5:23 pm by namannaman724

» am jennifer young....can someone help me?
Sun Mar 16, 2014 5:57 pm by CODE10

» Make Phishing Program Using Basic Language
Tue Mar 11, 2014 9:51 pm by djmco1212

» Hack Pack : Largest Hacking Tools Collection
Mon Mar 10, 2014 1:39 am by xPhr34Kz

» How do hackers Hack Your Credit Card Information
Wed Mar 05, 2014 10:43 am by babygirl702

» Hacking With Keyloggers Prorat
Fri Jan 24, 2014 10:06 am by Prince Thanu

» Hello to all
Tue Dec 31, 2013 5:41 pm by hondaxx

Most Viewed Topics
Hack Your BroadBand !! RISK FREE !!
HACK WIFI PASSWORD USING CMD WHEN YOU ARE CONNECTED WITH WIFI
Hack Pack : Largest Hacking Tools Collection
How to Hack the Windows Admin Password Using OphCrack in Backtrack tutorial
Hacking With Keyloggers Prorat
How to Get Unlimited time in an Internet Cafe ... :D
Cracking a WPA/WPA-2 Password.. ;)
Backtrack and Facebook
How to Hack Websites & Servers - Tutorial
Credit Card Generating Sequence
Keywords
email internet free proxy wifi hack page tools password crack hacker napping facebook netcat backtrack gmail hacking download prorat Windows pack ddos card credit account phishing
Facebook Like
Similar topics
  • » Publishers Clearing House in Port Washington
  • » The advantage of a simple logo design process
  • » Why Do Hemorrhoids Itch - Tips For Making Worrisome Hemorrhoids Less Uncomfortable
  • » area.autodesk.com - Making a simple 3x DMM Cube in Maya 2012 AND Maya 2012 DMM
  • » 3DS Max Tutorial - How to Build a Simple Dining Table by Crystal Russell
  • » blenderguru.com - Blender Tutorial - How to Make a Simple Lounge Room in Blender by Andrew Price
  • » Model for storing dimension attributes in multiple languages
  • » Simple suggestion - New theme
  • » Simple Calculations
  • » [Photoshop] Simple Smudge Settings Tutorial-Beginners!
  • Share | 
     

     Making a SImple Port Scanner In Different languages

    View previous topic View next topic Go down 
    AuthorMessage
    The Joker
    Admin
    Admin


    Posts: 181
    Join date: 2012-06-11
    Age: 23

    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://teamiha.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

    -
    » Wimax Mac Tools Scanner [RELEASED]
    » Good News For you Guests: Start Making MOre Money
    » CF_ShArKs Simple Hack v1.0 for CrossFire NA/PH updated"10/6/2012"
    » CFPRO, X-FIRE, NEWGAMERZONE SIMPLE HACK! PROCESS REVEALER (MAY TUTORIAL DITO PARA TANGGALIN ANG MGA KEYLOGGER NG MGA HACKER NA NAGPOPOST DITO!)
    » simple numerical calculation with variables -need help-

    Permissions in this forum:You cannot reply to topics in this forum
    Ethical Experts :: Hacking Section :: Hacking Tutorials-