Skip to content

Commit

Permalink
Merge pull request #23 from Datalux/development
Browse files Browse the repository at this point in the history
version 0.6
  • Loading branch information
Datalux committed Aug 7, 2020
2 parents a0dad71 + 1e17e88 commit 3c931ac
Show file tree
Hide file tree
Showing 5 changed files with 625 additions and 1,890 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![](https://img.shields.io/badge/version-0.5-green)](https://github.com/Datalux/Osintgram/releases/tag/0.5)
[![](https://img.shields.io/badge/version-0.6-green)](https://github.com/Datalux/Osintgram/releases/tag/0.6)
[![](https://img.shields.io/badge/license-GPLv3-blue)](https://img.shields.io/badge/license-GPLv3-blue)


Expand All @@ -10,20 +10,22 @@ Osintgram is a fork of https://github.com/LevPasha/Instagram-API-python and http

Osintgram offers an interactive shell to perform analysis on Instagram account of any users by its nickname. You can get:
```
- info Get target info
- 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
- hashtags Get hashtags used by target
- info Get target info
- likes Get total likes of target's posts
- comments Get total comments of target's posts
- tagged Get list of users tagged by target
- mediatype Get user's posts type (photo or video)
- photodes Get description of target's photos
- photos Download user's photos in output folder
- captions Get user's photos captions
- mediatype Get user's posts type (photo or video)
- propic Download user's profile picture
- stories Download user's stories
- tagged Get list of users tagged by target
- target Set new target
- wcommented Get a list of user who commented target's photos
```
You can find detailed commands usage [here](commands.md).

Expand All @@ -36,6 +38,7 @@ The tools use Python3.
- v0.3 added features: photos, captions, mediatype, propic
- v0.4 [changelog](https://github.com/Datalux/Osintgram/releases/tag/0.4)
- v0.5 [changelog](https://github.com/Datalux/Osintgram/releases/tag/0.5)
- v0.6 [changelog](https://github.com/Datalux/Osintgram/releases/tag/0.6)

## Tools
<p align="center">
Expand Down
70 changes: 39 additions & 31 deletions commands.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
# Commands list and usage
```
- info Get target info
- 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
- hashtags Get hashtags used by target
- info Get target info
- likes Get total likes of target's posts
- comments Get total comments of target's posts
- tagged Get list of users tagged by target
- mediatype Get user's posts type (photo or video)
- photodes Get description of target's photos
- photos Download user's photos in output folder
- captions Get user's photos captions
- mediatype Get user's posts type (photo or video)
- 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
```

### list (or help)
Show all commands avaible.
### addrs
Return a list with address (GPS) tagged by target in his photos.
The list has post, address and date fields.

### captions
Return a list of all captions used by target in his photos.

### comments
Return the total number of comments in target's posts

### exit
Exit from Osintgram
Expand All @@ -29,12 +37,14 @@ With `FILE=y` you can enable saving in file.

With `FILE=n` you can disable saving in file.

### JSON
Can set preference to export commands output as JSON in output folder. It save output in `<target username>_<command>.JSON` file.
### followers
Return a list with target followers with id, nickname and full name

With `JSON=y` you can enable JSON exporting.
### followings
Return a list with users followed by target with id, nickname and full name

With `JSON=n` you can disable JSON exporting.
### hashtags
Return a list with all hashtag used by target in his photos

### info
Show target info like:
Expand All @@ -47,24 +57,21 @@ Show target info like:
- business catagory (if target has business account)
- is verified?

### addrs
Return a list with address (GPS) tagged by target in his photos.
The list has post, address and date fields.

### followers
Return a list with target followers with id, nickname and full name
### JSON
Can set preference to export commands output as JSON in output folder. It save output in `<target username>_<command>.JSON` file.

### followings
Return a list with users followed by target with id, nickname and full name
With `JSON=y` you can enable JSON exporting.

### hashtags
Return a list with all hashtag used by target in his photos
With `JSON=n` you can disable JSON exporting.

### likes
Return the total number of likes in target's posts

### comments
Return the total number of comments in target's posts
### list (or help)
Show all commands avaible.

### mediatype
Return the number of photos and video shared by target

### photodes
Return a list with the description of the content of target's photos
Expand All @@ -78,16 +85,17 @@ Run a command: photos
How many photos you want to download (default all):
```

### captions
Return a list of all captions used by target in his photos.

### mediatype
Return the number of photos and video shared by target

### propic
Download target profile picture (HD if is avaible)
Download target profile picture (HD if is available)

### stories
Download all target's stories in output folder.

## tagged
Return a list of users tagged by target with ID, username and full name

## wcommented
Return a list of users who commented target's photos sorted by number of comments



93 changes: 51 additions & 42 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def printlogo():
pc.printout("\_______ /____ >__|___| /__| \___ /|__| (____ /__|_| /\n", pc.YELLOW)
pc.printout(" \/ \/ \/ /_____/ \/ \/ \n", pc.YELLOW)
print('\n')
pc.printout("Version 0.5 - Developed by Giuseppe Criscione - 2019\n\n", pc.YELLOW)
pc.printout("Version 0.6 - Developed by Giuseppe Criscione - 2019\n\n", pc.YELLOW)
pc.printout("Type 'list' to show all allowed commands\n")
pc.printout("Type 'FILE=y' to save results to files like '<target username>_<command>.txt (deafult is disabled)'\n")
pc.printout("Type 'FILE=n' to disable saving to files'\n")
Expand All @@ -29,44 +29,52 @@ def cmdlist():
print("Enable/disable output in a '<target username>_<command>.txt' file'")
pc.printout("JSON=y/n\t")
print("Enable/disable export in a '<target username>_<command>.json' file'")
pc.printout("info\t\t")
print("Get target info")
pc.printout("addrs\t\t")
print("Get all registered addressed by target photos")
pc.printout("captions\t")
print("Get target's photos captions")
pc.printout("comments\t")
print("Get total comments of target's posts")
pc.printout("followers\t")
print("Get target followers")
pc.printout("followings\t")
print("Get users followed by target")
pc.printout("hashtags\t")
print("Get hashtags used by target")
pc.printout("info\t\t")
print("Get target info")
pc.printout("likes\t\t")
print("Get total likes of target's posts")
pc.printout("comments\t")
print("Get total comments of target's posts")
pc.printout("tagged\t\t")
print("Get list of users tagged by target")
pc.printout("mediatype\t")
print("Get target's posts type (photo or video)")
pc.printout("photodes\t")
print("Get description of target's photos")
pc.printout("photos\t\t")
print("Download target's photos in output folder")
pc.printout("captions\t")
print("Get target's photos captions")
pc.printout("mediatype\t")
print("Get target's posts type (photo or video)")
pc.printout("propic\t\t")
print("Download target's profile picture")
pc.printout("stories\t\t")
print("Download target's sories")
pc.printout("tagged\t\t")
print("Get list of users tagged by target")
pc.printout("target\t\t")
print("Set new target")
pc.printout("wcommented\t")
print("Get a list of user who commented target's photos")


printlogo()

parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(description='Osintgram is a OSINT tool on Instagram. It offers an interactive shell '
'to perform analysis on Instagram account of any users by its nickname ')
parser.add_argument('id', type=str, # var = id
help='username')
parser.add_argument('-j', '--json', help='save commands output as JSON file', action='store_true')
parser.add_argument('-f', '--file', help='save output in a file', action='store_true')

args = parser.parse_args()

api = Osintgram(args.id)
api = Osintgram(args.id, args.file, args.json)

while True:
pc.printout("Run a command: ", pc.YELLOW)
Expand All @@ -77,43 +85,44 @@ def cmdlist():
elif cmd == "list" or cmd == "help":
cmdlist()
elif cmd == "addrs":
api.getAddrs()
api.get_addrs()
elif cmd == "captions":
api.get_captions()
elif cmd == "comments":
api.get_total_comments()
elif cmd == "followers":
api.getFollowers()
api.get_followers()
elif cmd == "followings":
api.getFollowings()
api.get_followings()
elif cmd == "hashtags":
api.getHashtags()
elif cmd == "likes":
api.getTotalLikes()
elif cmd == "comments":
api.getTotalComments()
api.get_hashtags()
elif cmd == "info":
api.getUserInfo()
elif cmd == "tagged":
api.getPeopleTaggedByUser()
api.get_user_info()
elif cmd == "likes":
api.get_total_likes()
elif cmd == "mediatype":
api.get_media_type()
elif cmd == "photodes":
api.getPhotoDescription()
elif cmd == "FILE=y":
api.setWriteFile(True)
elif cmd == "FILE=n":
api.setWriteFile(False)
elif cmd == "JSON=y":
api.setJsonDump(True)
elif cmd == "JSON=n":
api.setJsonDump(False)
api.get_photo_description()
elif cmd == "photos":
api.getUserPhoto()
elif cmd == "captions":
api.getCaptions()
elif cmd == "mediatype":
api.getMediaType()
api.get_user_photo()
elif cmd == "propic":
api.getUserPropic()
api.get_user_propic()
elif cmd == "stories":
api.getUserStories()
api.get_user_stories()
elif cmd == "tagged":
api.get_people_tagged_by_user()
elif cmd == "target":
api.changeTarget()

api.change_target()
elif cmd == "wcommented":
api.get_people_who_commented()
elif cmd == "FILE=y":
api.set_write_file(True)
elif cmd == "FILE=n":
api.set_write_file(False)
elif cmd == "JSON=y":
api.set_json_dump(True)
elif cmd == "JSON=n":
api.set_json_dump(False)
else:
pc.printout("Unknown command\n", pc.RED)
Loading

0 comments on commit 3c931ac

Please sign in to comment.