exploit the possibilities

hextodec.java

hextodec.java
Posted Feb 27, 2003
Authored by soGNo

Hextodec.java is a simple hex ip to dec ip converter which can be useful for many things, among them is finding the ips of users on java chats similar to the one on www.ircnet.com.

tags | java
SHA-256 | b5b882ab25a1150a4d183e519a87dd5f9c1b71feb6698daacae9fed65245966b

hextodec.java

Change Mirror Download
/*
* hextodec.java
*
* Created 23 Feb 2003 17:00
*/

/*
* Copyright (C) s0gno
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

/**
* Title: HEX IP to DEC IP Converter
* Description: This simple proggy helps you figure out the
* DEC correspondant of an IP represented in
* HEX format. This is useful when trying to
* figure out the ip of a user connected to a
* Java IRC Chat such as the one on www.ircnet.com.
* Code is OpenSource under the terms of the GNU
* General Public Licence. I will not be held
* responsable for any appropriate use you make
* with this code (ie: you get an ip and then start
* a DDoS attack towards it etc.)
* Copyright: Copyright (c) 2003 s0gno
* @author s0gno
* @version 0.1
*/
public class hextodec{

public final static void usage(){
System.out.println("HEX IP to DEC IP (hextodec.java) by s0gno");
System.out.println("Usage:");
System.out.println("java hextodec <hexip>");
System.out.println("Ex:");
System.out.println("java hextodec aabbccdd\n");
System.out.println("|--------------------------GNU----------------------------|");
System.out.println("|HexToDec version 0.1, Copyright (C) 2003 s0gno |");
System.out.println("|HexToDec comes with ABSOLUTELY NO WARRANTY |");
System.out.println("|This is free software, and you are welcome to |");
System.out.println("|redistribute it under certain conditions; |");
System.out.println("|for details go to http://www.gnu.org/copyleft/gpl.html |");
System.out.println("|---------------------------------------------------------|");
}//usage

public static void main(String args[]){

String ip = "";

try{
if(args[0].length() == 8){

for(int i = 0;i < args[0].length();i+=2){
ip += Integer.parseInt(args[0].substring(i, i+2),16);
if(i!=6)
ip += ".";

}//for
System.out.println("IP : " + ip);
}//if
else
usage();

}catch(IndexOutOfBoundsException e){
usage();
}
catch(NumberFormatException e){
System.out.println("String HEX errata");
}
}//main
}//class
Login or Register to add favorites

File Archive:

May 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    0 Files
  • 2
    May 2nd
    15 Files
  • 3
    May 3rd
    19 Files
  • 4
    May 4th
    24 Files
  • 5
    May 5th
    15 Files
  • 6
    May 6th
    14 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    13 Files
  • 10
    May 10th
    7 Files
  • 11
    May 11th
    99 Files
  • 12
    May 12th
    45 Files
  • 13
    May 13th
    7 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    16 Files
  • 17
    May 17th
    26 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close