diff --git a/Scripts/Miscellaneous/Social_Media_OSINT/README.md b/Scripts/Miscellaneous/Social_Media_OSINT/README.md new file mode 100644 index 000000000..9450204a5 --- /dev/null +++ b/Scripts/Miscellaneous/Social_Media_OSINT/README.md @@ -0,0 +1,27 @@ +# Social Media OSINT + +A basic python based tool which checks the presence of a individual in 3 different websites. + +## Introduction +Open-source intelligence (OSINT) is data collected from publicly available sources to be used in an intelligence context. OSINT has been used by hackers for the Information Gathering process. +The Information comes from variety of sources including social media pages, personal blogs, websites etc + + +## Requirements +``` +pip3 install -r requirements.txt +``` + +## How to run the script + +``` +python3 main.py +``` + +## PoC + +[![asciicast](https://asciinema.org/a/XsbHmJLASDTgs792Pp5B80Pni.png)](https://asciinema.org/a/XsbHmJLASDTgs792Pp5B80Pni) + + +## Author name +Madhav Mehndiratta diff --git a/Scripts/Miscellaneous/Social_Media_OSINT/main.py b/Scripts/Miscellaneous/Social_Media_OSINT/main.py new file mode 100644 index 000000000..6fc69fe87 --- /dev/null +++ b/Scripts/Miscellaneous/Social_Media_OSINT/main.py @@ -0,0 +1,38 @@ +import requests +import re +from bs4 import BeautifulSoup + +# Define Colors +class colors: + GREEN = '\033[92m' + STOP = '\033[0m' + RED='\033[31m' + +class CheckUsername: + def __init__(self, username): + self.username = username + self.check_profile() + +# search for all the links with the username provided. If it returns a 404, then the username is not available else it is available + def check_profile(self): + links = ["instagram", "facebook", "github"] + for link in links: + if link == links[1]: + temp_url = f"https://{link}.com/{self.username.rstrip('_')}" + else: + temp_url = f"https://{link}.com/{self.username}" + response = requests.get(temp_url) + soup = BeautifulSoup(response.content, "lxml") + if response.status_code == 404 or soup.findAll(text=re.compile('Sorry, this page isn\'t available.')): + print(colors.RED+u'\u2716'+f'{link.capitalize()} account not found!'+colors.STOP) + else: + print(colors.GREEN+u'\u2713'+f'{link.capitalize()} account found!'+colors.STOP) + + +def main(): + username = input('Enter the username: ') + CheckUsername(username) + + +if __name__ == "__main__": + main() diff --git a/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt b/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt new file mode 100644 index 000000000..b8ee43c79 --- /dev/null +++ b/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt @@ -0,0 +1,3 @@ +requests +beautifulsoup4 +lxml