SRL Archive - SRL Member Goodies

Skype IP resolver


Sirenia

2012-11-17 16:14:37

Simple Skype IP resolver written with the api from my friends IP resolver.

Download here:
http://www.skype2ip.cu.cc/Skype2IP.jar

Click the resolved IP to copy it to your clipboard

Added the source for the people who are interested :)

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;


public class Skype2IP extends JFrame{

public static final String BASE_URL = "http://www.skype2ip.cu.cc/api.php?username=";

private JLabel userLabel;
private JTextField userBox;
private JButton searchButton;

private JPanel northPanel;

private JLabel resultLabel;

public Skype2IP(){
super("Skype IP Resolver");
setLayout(new BorderLayout());

userLabel = new JLabel("Username:");
userLabel.setHorizontalAlignment(JLabel.CENTER);

userBox = new JTextField(15);
userBox.setHorizontalAlignment(JLabel.CENTER);

searchButton = new JButton("Search");
searchButton.addActionListener(
new ActionListener(){
public void actionPerformed(ActionEvent e){
final String username = userBox.getText().trim();
if(username.equals("")) return;
try{
resultLabel.setText(getIP(username, 50000));
}catch(IOException ex){
resultLabel.setText("Error Retrieving IP");
}
resultLabel.repaint();
}
}
);

northPanel = new JPanel(new GridLayout(1, 3));
northPanel.add(userLabel);
northPanel.add(userBox);
northPanel.add(searchButton);

resultLabel = new JLabel("-- Result --");
resultLabel.setHorizontalAlignment(JLabel.CENTER);
resultLabel.addMouseListener(
new MouseAdapter(){
public void mousePressed(MouseEvent e){
try{
final StringSelection selection = new StringSelection(resultLabel.getText());
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, null);
}catch(Exception ex){
JOptionPane.showMessageDialog(null, "Error copying ip", "Error", JOptionPane.ERROR_MESSAGE);
}
}
}
);

add(northPanel, BorderLayout.NORTH);
add(resultLabel, BorderLayout.SOUTH);
}

private String getIP(final String username, final int timeout) throws IOException {
final URL url = new URL(BASE_URL + username);
final HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setReadTimeout(timeout);
connection.setConnectTimeout(timeout);
connection.setRequestMethod("GET");
connection.addRequestProperty("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17");
final Scanner reader = new Scanner(connection.getInputStream(), "UTF-8");
final String line = reader.nextLine().trim();
reader.close();
return line;
}

public static void main(String args[]) throws IOException {
Skype2IP window = new Skype2IP();
window.pack();
window.setLocationRelativeTo(null);
window.setVisible(true);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

}

NKN

2012-11-17 16:48:42

Is this even allowed? LOL

Sirenia

2012-11-17 17:20:13

The IP wont tell you more about the location than what skype already does, and if it isnt allowed then ill remove it. A guy helped me write this and I wanted to share :P

Le Jingle

2012-11-17 17:23:23

This just connects to a supernode and not individuals? or?

Sirenia

2012-11-17 17:27:13

From: Le Jingle
This just connects to a supernode and not individuals? or?


No idea what thats about, ur alittle over my league x)

NKN

2012-11-17 17:27:45

Post sause(source)

Footy

2012-11-17 17:28:43

NKN, Grab my IP and PM me what info you can get from that IP. This tool could have possibilities… :)

Sirenia

2012-11-17 17:34:11

Updated OP :D

NKN

2012-11-17 17:34:43

From: Footy
NKN, Grab my IP and PM me what info you can get from that IP. This tool could have possibilities… :)

Not much.

Justin

2012-11-18 03:08:59

Yay! make it more easier for DDoSers to get IP's

Daniel

2012-11-18 03:37:29

From: [J]ustin
Yay! make it more easier for DDoSers to get IP's


  1. This is in the SRL members forum.
  2. There are easier and more readily available ways to obtain Skype IPs than via this
  3. Why are you even worried about getting DoS'ed?

Sirenia

2012-11-18 15:56:33

updated op as website got transferred to a new domain, old version wont work so grab the new jar/source from op :)

NKN

2012-11-19 06:55:02

Source and link still the same </3

Justin

2012-11-19 07:00:14

From: NKN
Source and link still the same </3


IIRC before he was using .tk now its cc.cu