├── API_example.py ├── README.md └── SkypeOsintAPI.py /API_example.py: -------------------------------------------------------------------------------- 1 | from SkypeOsintAPI import * 2 | 3 | api = SkypeOSINTAPI(True) 4 | res = api.email_to_skype_id('username@gmail.com') 5 | 6 | if res: 7 | print "Username(s) found: {0}".format(res) 8 | for username in res: 9 | print api.skype_id_to_lan_ip(username) 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Python Skype OSINT util 2 | ======= 3 | 4 | This tool allows you to retrieve the Skype ID from an e-mail address but also the LAN IP from the Skype ID. 5 | More to come in the next few days. Feel free if you also want to contribute 6 | 7 | 8 | Installation 9 | ======= 10 | 11 | Install [Spider Monkey](https://github.com/davisp/python-spidermonkey.git), then: 12 | 13 | Clone the repo: 14 | 15 | ``` 16 | git clone git@github.com:PaulSec/skype-osint.git 17 | ``` 18 | 19 | Then checkout the ```API_example.py``` file: 20 | 21 | ```python 22 | from SkypeOsintAPI import * 23 | 24 | api = SkypeOSINTAPI(True) 25 | res = api.email_to_skype_id('username@gmail.com') 26 | 27 | if res: 28 | print "Username(s) found: {0}".format(res) 29 | for username in res: 30 | print api.skype_id_to_lan_ip(username) 31 | ``` 32 | 33 | Contributing 34 | ======= 35 | 36 | Feel free if you find any bug or want to add any other feature. Glad if you want to contribute to this project. 37 | You can also ping me on Twitter [@PaulWebSec](https://twitter.com/PaulWebSec) -------------------------------------------------------------------------------- /SkypeOsintAPI.py: -------------------------------------------------------------------------------- 1 | """ 2 | Quick OSINT util to retrieve Skype info based on email address/Skype ID 3 | """ 4 | import requests 5 | import re 6 | import base64 7 | 8 | from spidermonkey import Runtime 9 | from bs4 import BeautifulSoup 10 | 11 | 12 | class SkypeOSINTAPI(object): 13 | 14 | """SkypeOSINTAPI Main Handler""" 15 | 16 | def __init__(self, verbose=False): 17 | self.verbose = verbose 18 | 19 | def display_message(self, s): 20 | if self.verbose: 21 | print('[verbose] %s' % s) 22 | 23 | def email_to_skype_id(self, email): 24 | url = "http://www.skresolver.com/email-to-skype.php" 25 | self.display_message("Trying to retrieve Skype id for mail address: %s" % email) 26 | return self.process(url, email) 27 | 28 | def skype_id_to_lan_ip(self, skype_id): 29 | url = "http://www.skresolver.com/skype-to-lan.php" 30 | self.display_message("Trying to retrieve LAN IP for skype id %s" % skype_id) 31 | return self.process(url, skype_id) 32 | 33 | def process(self, url, value): 34 | s = requests.Session() 35 | req = s.get(url) 36 | self.display_message("Server answered: %s status code" % req.status_code) 37 | 38 | pattern = r'S=\'([a-zA-Z0-9\=]+)\'' 39 | cookie_sucuri = base64.b64decode(re.findall(pattern, req.content)[0]) 40 | cookie_sucuri = cookie_sucuri.replace('document.cookie', 'res') 41 | cookie_sucuri = cookie_sucuri.replace('location.reload();', '') 42 | # executing the javascript 43 | rt = Runtime() 44 | cx = rt.new_context() 45 | result = cx.execute(cookie_sucuri) 46 | self.display_message("Sucuri cookie: %s" % result) 47 | cookie_sucuri = result.split('=') 48 | 49 | cookies = {cookie_sucuri[0]: cookie_sucuri[1]} 50 | data = {'domainName': value, 'domainResolved': '', 'resolveDomain': ''} 51 | req = s.post(url, cookies=cookies, data=data) 52 | self.display_message("Server answered: %s status code" % req.status_code) 53 | 54 | soup = BeautifulSoup(req.content, 'html.parser') 55 | res = soup.find('input', attrs={'name': 'domainResolved'})['value'] 56 | if res: 57 | return filter(None, res.split(', ')) 58 | else: 59 | return None 60 | --------------------------------------------------------------------------------