Osintgram is a OSINT tool on Instagram

May 18, 2022
(16,392 views)

Disclaimer: FOR EDUCATIONAL PURPOSE ONLY! The contributors do not assume any responsibility for the use of this tool.

Warning: It is advisable to not use your own/primary account when using this tool.

Tools and Commands

Osintgram offers an interactive shell to perform analysis on Instagram account of any users by its nickname. You can get:

- addrs           Get all registered addressed by target photos
- captions        Get user's photos captions
- comments        Get total comments of target's posts
- followers       Get target followers
- followings      Get users followed by target
- fwersemail      Get email of target followers
- fwingsemail     Get email of users followed by target
- fwersnumber     Get phone number of target followers
- fwingsnumber    Get phone number of users followed by target
- hashtags        Get hashtags used by target
- info            Get target info
- likes           Get total likes of target's posts
- mediatype       Get user's posts type (photo or video)
- photodes        Get description of target's photos
- photos          Download user's photos in output folder
- propic          Download user's profile picture
- stories         Download user's stories  
- tagged          Get list of users tagged by target
- wcommented      Get a list of user who commented target's photos
- wtagged         Get a list of user who tagged target

You can find detailed commands usage here.

Latest version | Commands | CHANGELOG

Installation ⚙️

1 .Fork/Clone/Download this repo

git clone https://github.com/Datalux/Osintgram.git

2. Navigate to the directory

cd Osintgram

3. Create a virtual environment for this project

python3 -m venv venv

4. Load the virtual environment

On Windows Powershell: .\venv\Scripts\activate.ps1

On Linux and Git Bash: source venv/bin/activate

5. Run pip install -r requirements.txt

6. Open the credentials.ini file in the config folder and write your Instagram account username and password in the corresponding fields

Alternatively, you can run the make setup command to populate this file for you.

7. Run the main.py script in one of two ways

As an interactive prompt python3 main.py <target username>

Or execute your command straight away python3 main.py <target username> --command <command>

Docker Quick Start ????

This section will explain how you can quickly use this image with Docker or Docker-compose.

Prerequisites

Before you can use either Docker or Docker-compose, please ensure you do have the following prerequisites met.

  1. Docker installed - link
  2. Docker-composed installed (if using Docker-compose) - link
  3. Credentials configured - This can be done manually or by running the make setup command from the root of this repo

Important: Your container will fail if you do not do step #3 and configure your credentials

Docker

If docker is installed you can build an image and run this as a container.

Build:

docker build -t osintgram .

Run:

docker run --rm -it -v "$PWD/output:/home/osintgram/output" osintgram <target>
  • The <target> is the Instagram account you wish to use as your target for recon.
  • The required -i flag enables an interactive terminal to use commands within the container. docs
  • The required -v flag mounts a volume between your local filesystem and the container to save to the ./output/ folder. docs
  • The optional --rm flag removes the container filesystem on completion to prevent cruft build-up. docs
  • The optional -t flag allocates a pseudo-TTY which allows colored output. docs

Using docker-compose

You can use the docker-compose.yml file this single command:

docker-compose run osintgram <target>

Where target is the Instagram target for recon.

Alternatively, you may run docker-compose with the Makefile:

make run - Builds and Runs with compose. Prompts for a target before running.

Makefile (easy mode)

For ease of use with Docker-compose, a Makefile has been provided.

Here is a sample workflow to spin up a container and run osintgram with just two commands!

  1. make setup - Sets up your Instagram credentials
  2. make run - Builds and Runs a osintgram container and prompts for a target

Sample workflow for development:

  1. make setup - Sets up your Instagram credentials
  2. make build-run-testing - Builds an Runs a container without invoking the main.py script. Useful for an it Docker session for development
  3. make cleanup-testing - Cleans up the testing container created from build-run-testing

Development version

To use the development version with the latest feature and fixes just switch to development branch using Git:

git checkout development

and update to the last version using:

git pull origin development

Updating ⬇️

To update Osintgram with the stable release just pull the latest commit using Git.

  1. Make sure you are in the master branch running: git checkout master
  2. Download the latest version: git pull origin master

Contributing

You can propose a feature request opening an issue or a pull request.

 

Recommended From Hakin9
Security firm RSA Security breached
Security firm RSA Security breached

RSA Security is one of the biggest players in the enterprise security landscape, featuring advanced

Social media zombies: HBGary, USAF and the government
Social media zombies: HBGary, USAF and the government

HBGary ownage has probably been the most prominent example of complete take over carried out

Microsoft MPE privilege flaw identified
Microsoft MPE privilege flaw identified

Microsoft's Malware Protection Engine has been patched as Argeniss security expert identifies an 'elevation of

Virus hits London Stock Exchange (LSE)
Virus hits London Stock Exchange (LSE)

The London Stock Exchange website was attacked by malware hidden inside an advert on February

(16,392 views)
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

25 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
6 months ago

target account is non found showing despite for correct account what to do

x6_yx
1 year ago

Attempt to login… ClientCookieExpiredError/ClientLoginRequiredError: Cookie expired at 1628592384 Error parsing error response: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last):  File “/home/kingmo7md8/.local/lib/python3.9/site-packages/instagram_private_api/client.py”, line 523, in _call_api   response = self.opener.open(req, timeout=self.timeout)  File “/usr/lib/python3.9/urllib/request.py”, line 523, in open   response = meth(req, response)  File “/usr/lib/python3.9/urllib/request.py”, line 632, in http_response   response = self.parent.error(  File “/usr/lib/python3.9/urllib/request.py”, line 561, in error   return self._call_chain(*args)  File “/usr/lib/python3.9/urllib/request.py”, line 494, in _call_chain   result = func(*args)  File “/usr/lib/python3.9/urllib/request.py”, line 641, in http_error_default   raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found During handling of the above exception, another exception occurred: Traceback (most… Read more »

Suraj
Suraj
2 months ago
Reply to  x6_yx

Same problem bro

Mr. RObot
Mr. RObot
1 year ago

can any one solve this error Attempt to login… Error parsing error response: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last):  File “/home/devileyes1900/Osintgram/venv/lib/python3.9/site-packages/instagram_private_api/client.py”, line 523, in _call_api   response = self.opener.open(req, timeout=self.timeout)  File “/usr/lib/python3.9/urllib/request.py”, line 523, in open   response = meth(req, response)  File “/usr/lib/python3.9/urllib/request.py”, line 632, in http_response   response = self.parent.error(  File “/usr/lib/python3.9/urllib/request.py”, line 561, in error   return self._call_chain(*args)  File “/usr/lib/python3.9/urllib/request.py”, line 494, in _call_chain   result = func(*args)  File “/usr/lib/python3.9/urllib/request.py”, line 641, in http_error_default   raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found During handling of the above exception, another exception occurred: Traceback… Read more »

gary
1 year ago
Reply to  Mr. RObot

Brooooo… I have the same problem, did you find the solution?

deevine
deevine
1 year ago
Reply to  gary

guys did u find any solution regarding this error

x6_yx
1 year ago
Reply to  gary

did you find the solution?

bob
bob
1 year ago

Error parsing error response
instagram_private_api.errors.ClientError : Not found
Showing these errors.

jamal
jamal
1 year ago
Reply to  bob

did you find a solution ???

WikiMe
WikiMe
1 year ago

How come I can’t see an output for an IG target? I think it was a public account but still this program won’t return a result?

andy
andy
1 year ago

i get kicked out if i query more than 14 on fwingsemail. any help on this?

Agata Staszelis
Admin
1 year ago
Reply to  andy

Hello, I believe your question is answered in the comments below.

Mah her
Mah her
1 year ago

Attempt to login…
ClientError Not Found: user_not_found (Code: 404, Response: {“message”:”User not found”,”status”:”fail”,”error_type”:”user_not_found”})User not found ( I have problem ))

HIroDev
HIroDev
2 years ago

Good Job, next upgrade can add download and see in HD, highlights and cover highlights?

Last edited 2 years ago by HIroDev
shan
shan
2 years ago

“Traceback (most recent call last):
 File “Osintgram.py”, line 13, in <module>
   from geopy.geocoders import Nominatim
ModuleNotFoundError: No module named ‘geopy’

why this error?

Neowelt
Neowelt
2 years ago
Reply to  shan

You need to pip3 install geopy

Yugendhra venkatesh
Yugendhra venkatesh
3 years ago

where to type these commands??

armaan
armaan
3 years ago

: Bad Request: two_factor_required
what does this mean? the target account is public

kushagra
kushagra
3 years ago

ClientError Please wait a few minutes before you try again. (Code: 429, Response: {“message”: “Please wait a few minutes before you try again.”, “status”: “fail”})Please wait a few minutes before you try again.  help me

x6_yx
1 year ago
Reply to  Hakin9 TEAM

Attempt to login… ClientCookieExpiredError/ClientLoginRequiredError: Cookie expired at 1628592384 Error parsing error response: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last):  File “/home/kingmo7md8/.local/lib/python3.9/site-packages/instagram_private_api/client.py”, line 523, in _call_api   response = self.opener.open(req, timeout=self.timeout)  File “/usr/lib/python3.9/urllib/request.py”, line 523, in open   response = meth(req, response)  File “/usr/lib/python3.9/urllib/request.py”, line 632, in http_response   response = self.parent.error(  File “/usr/lib/python3.9/urllib/request.py”, line 561, in error   return self._call_chain(*args)  File “/usr/lib/python3.9/urllib/request.py”, line 494, in _call_chain   result = func(*args)  File “/usr/lib/python3.9/urllib/request.py”, line 641, in http_error_default   raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found During handling of the above exception, another exception occurred: Traceback (most… Read more »

Neowelt
Neowelt
2 years ago
Reply to  kushagra

I often had this error while implement data scrapers for websites.
If you send too many requests in a short time, the server where the page is hosted, will deny you access due to DDoS protection.

abdullah
abdullah
3 years ago

this only works on public profiles

© HAKIN9 MEDIA SP. Z O.O. SP. K. 2023
What certifications or qualifications do you hold?
Max. file size: 150 MB.

What level of experience should the ideal candidate have?
What certifications or qualifications are preferred?

Download Free eBook

Step 1 of 4

Name(Required)

We’re committed to your privacy. Hakin9 uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.