From 35323ca877576e523e4de26526757f6694de9d1f Mon Sep 17 00:00:00 2001 From: madhavmehndiratta Date: Fri, 2 Oct 2020 16:53:09 +0530 Subject: [PATCH 1/2] Social Media OSINT --- .../Social_Media_OSINT/README.md | 27 +++++++++++++ .../Miscellaneous/Social_Media_OSINT/main.py | 38 +++++++++++++++++++ .../Social_Media_OSINT/requirements.txt | 3 ++ 3 files changed, 68 insertions(+) create mode 100644 Scripts/Miscellaneous/Social_Media_OSINT/README.md create mode 100644 Scripts/Miscellaneous/Social_Media_OSINT/main.py create mode 100644 Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt 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..70efddb20 --- /dev/null +++ b/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt @@ -0,0 +1,3 @@ +requests +bs4 +lxml From afaeaa2a1b6117d2990ee4b6a28405a9bb499446 Mon Sep 17 00:00:00 2001 From: Aditya Jetely Date: Sat, 3 Oct 2020 20:35:52 +0530 Subject: [PATCH 2/2] Update requirements.txt --- Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt b/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt index 70efddb20..b8ee43c79 100644 --- a/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt +++ b/Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt @@ -1,3 +1,3 @@ requests -bs4 +beautifulsoup4 lxml