Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Social Media OSINT #173

Merged
merged 2 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Scripts/Miscellaneous/Social_Media_OSINT/README.md
Original file line number Diff line number Diff line change
@@ -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
<a href="https://github.com/madhavmehndiratta">Madhav Mehndiratta</a>
38 changes: 38 additions & 0 deletions Scripts/Miscellaneous/Social_Media_OSINT/main.py
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 3 additions & 0 deletions Scripts/Miscellaneous/Social_Media_OSINT/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
requests
beautifulsoup4
lxml