Skip to content

Commit a3d5ad1

Browse files
authored
Merge pull request #150 from Datalux/development
Development version (1.3)
2 parents 12af340 + d233803 commit a3d5ad1

File tree

8 files changed

+247
-81
lines changed

8 files changed

+247
-81
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Osintgram 🔎📸
22

3-
[![version-1.2](https://img.shields.io/badge/version-1.2-green)](https://github.com/Datalux/Osintgram/releases/tag/1.2)
3+
[![version-1.3](https://img.shields.io/badge/version-1.3-green)](https://github.com/Datalux/Osintgram/releases/tag/1.3)
44
[![GPLv3](https://img.shields.io/badge/license-GPLv3-blue)](https://img.shields.io/badge/license-GPLv3-blue)
55
[![Python3](https://img.shields.io/badge/language-Python3-red)](https://img.shields.io/badge/language-Python3-red)
66
[![Telegram](https://img.shields.io/badge/Telegram-Channel-blue.svg)](https://t.me/osintgram)
@@ -9,10 +9,10 @@
99
Osintgram is a **OSINT** tool on Instagram to collect, analyze, and run reconnaissance.
1010

1111
<p align="center">
12-
<img align="center" src=".img/carbon.svg" width="900">
12+
<img align="center" src=".img/carbon.png" width="900">
1313
</p>
1414

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

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

@@ -45,7 +45,7 @@ Osintgram offers an interactive shell to perform analysis on Instagram account o
4545

4646
You can find detailed commands usage [here](doc/COMMANDS.md).
4747

48-
[**Latest version**](https://github.com/Datalux/Osintgram/releases/tag/1.2) |
48+
[**Latest version**](https://github.com/Datalux/Osintgram/releases/tag/1.3) |
4949
[Commands](doc/COMMANDS.md) |
5050
[CHANGELOG](doc/CHANGELOG.md)
5151

@@ -73,9 +73,10 @@ You can find detailed commands usage [here](doc/COMMANDS.md).
7373

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

76-
7. Run the main.py script
76+
7. Run the main.py script in one of two ways
7777

78-
`python3 main.py <target username>`
78+
* As an interactive prompt `python3 main.py <target username>`
79+
* Or execute your command straight away `python3 main.py <target username> --command <command>`
7980

8081
## Docker Quick Start 🐳
8182

config/credentials.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[Credentials]
2-
username =
3-
password =
2+
username =
3+
password =

config/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{"uuid": "49ed550a-b30f-11eb-ab45-00155d9a47a8", "device_id": "android-49ed5762b30f11eb", "ad_id": "00ea607f-90b5-01af-95ac-c6f37ac93fbd", "session_id": "49ed5848-b30f-11eb-ab45-00155d9a47a8", "cookie": {"__class__": "bytes", "__value__": "gASVRwMAAAAAAAB9lIwOLmluc3RhZ3JhbS5jb22UfZSMAS+UfZQojAljc3JmdG9rZW6UjA5odHRw\nLmNvb2tpZWphcpSMBkNvb2tpZZSTlCmBlH2UKIwHdmVyc2lvbpRLAIwEbmFtZZSMCWNzcmZ0b2tl\nbpSMBXZhbHVllIwgemxlTm5zWjBJeUFPa0NPTzkwVG5rOUc0RHJDbFIzcHCUjARwb3J0lE6MDnBv\ncnRfc3BlY2lmaWVklImMBmRvbWFpbpSMDi5pbnN0YWdyYW0uY29tlIwQZG9tYWluX3NwZWNpZmll\nZJSIjBJkb21haW5faW5pdGlhbF9kb3SUiIwEcGF0aJRoA4wOcGF0aF9zcGVjaWZpZWSUiIwGc2Vj\ndXJllIiMB2V4cGlyZXOUSgCUe2KMB2Rpc2NhcmSUiYwHY29tbWVudJROjAtjb21tZW50X3VybJRO\njAdyZmMyMTA5lImMBV9yZXN0lH2UdWKMA21pZJRoCCmBlH2UKGgLSwBoDGggaA6MHFlKdXhfUUFC\nQUFHUmtGeFRzblNuek5DakpCdXCUaBBOaBGJaBKMDi5pbnN0YWdyYW0uY29tlGgUiGgViGgWaANo\nF4hoGIhoGUr9GF5kaBqJaBtOaBxOaB2JaB59lHVijANydXKUaAgpgZR9lChoC0sAaAxoJmgOjANO\nQU+UaBBOaBGJaBKMDi5pbnN0YWdyYW0uY29tlGgUiGgViGgWaANoF4hoGIhoGU5oGohoG05oHE5o\nHYloHn2UjAhIdHRwT25seZROc3VijApkc191c2VyX2lklGgIKYGUfZQoaAtLAGgMaC1oDowLNDc2\nNTU2NjY1MjeUaBBOaBGJaBKMDi5pbnN0YWdyYW0uY29tlGgUiGgViGgWaANoF4hoGIhoGUoAWRJh\naBqJaBtOaBxOaB2JaB59lHVijAlzZXNzaW9uaWSUaAgpgZR9lChoC0sAaAxoM2gOjCA0NzY1NTY2\nNjUyNyUzQUFkSjZxZkhDZGt2SHdpJTNBM5RoEE5oEYloEowOLmluc3RhZ3JhbS5jb22UaBSIaBWI\naBZoA2gXiGgYiGgZSoDlfGJoGoloG05oHE5oHYloHn2UjAhIdHRwT25seZROc3VidXNzLg==\n"}, "created_ts": 1620816384}

doc/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [1.3](https://github.com/Datalux/Osintgram/releases/tag/1.3)
4+
**Enhancements**
5+
- Artwork refactoring (#149)
6+
- Added command line mode (#155)
7+
- Added output limiter (#201)
8+
9+
**Bug fixes**
10+
- Losing collected data (#156)
11+
- JSON user info (#202)
12+
- Issue #198 (#200)
13+
- Issue #204 (12e730e)
14+
15+
316
## [1.2](https://github.com/Datalux/Osintgram/releases/tag/1.2)
417
**Enhancements**
518
- Added virtual environment (#126)

main.py

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from src.Osintgram import Osintgram
44
import argparse
55
from src import printcolors as pc
6+
from src import artwork
67
import sys
78
import signal
89

@@ -16,14 +17,8 @@
1617

1718

1819
def printlogo():
19-
pc.printout("________ .__ __ \n", pc.YELLOW)
20-
pc.printout("\_____ \ _____|__| _____/ |_ ________________ _____ \n", pc.YELLOW)
21-
pc.printout(" / | \ / ___/ |/ \ __\/ ___\_ __ \__ \ / \ \n", pc.YELLOW)
22-
pc.printout("/ | \\\___ \| | | \ | / /_/ > | \// __ \| Y Y \\\n", pc.YELLOW)
23-
pc.printout("\_______ /____ >__|___| /__| \___ /|__| (____ /__|_| /\n", pc.YELLOW)
24-
pc.printout(" \/ \/ \/ /_____/ \/ \/ \n", pc.YELLOW)
25-
print('\n')
26-
pc.printout("Version 1.2 - Developed by Giuseppe Criscione\n\n", pc.YELLOW)
20+
pc.printout(artwork.ascii_art, pc.YELLOW)
21+
pc.printout("\nVersion 1.1 - Developed by Giuseppe Criscione\n\n", pc.YELLOW)
2722
pc.printout("Type 'list' to show all allowed commands\n")
2823
pc.printout("Type 'FILE=y' to save results to files like '<target username>_<command>.txt (default is disabled)'\n")
2924
pc.printout("Type 'FILE=n' to disable saving to files'\n")
@@ -39,6 +34,8 @@ def cmdlist():
3934
print("Enable/disable export in a '<target username>_<command>.json' file'")
4035
pc.printout("addrs\t\t")
4136
print("Get all registered addressed by target photos")
37+
pc.printout("cache\t\t")
38+
print("Clear cache of the tool")
4239
pc.printout("captions\t")
4340
print("Get target's photos captions")
4441
pc.printout("commentdata\t")
@@ -108,18 +105,21 @@ def _quit():
108105
gnureadline.parse_and_bind("tab: complete")
109106
gnureadline.set_completer(completer)
110107

111-
printlogo()
112-
113108
parser = argparse.ArgumentParser(description='Osintgram is a OSINT tool on Instagram. It offers an interactive shell '
114109
'to perform analysis on Instagram account of any users by its nickname ')
115110
parser.add_argument('id', type=str, # var = id
116111
help='username')
112+
parser.add_argument('-C','--cookies', help='clear\'s previous cookies', action="store_true")
117113
parser.add_argument('-j', '--json', help='save commands output as JSON file', action='store_true')
118114
parser.add_argument('-f', '--file', help='save output in a file', action='store_true')
115+
parser.add_argument('-c', '--command', help='run in single command mode & execute provided command', action='store')
116+
parser.add_argument('-o', '--output', help='where to store photos', action='store')
119117

120118
args = parser.parse_args()
121119

122-
api = Osintgram(args.id, args.file, args.json)
120+
121+
api = Osintgram(args.id, args.file, args.json, args.command, args.output, args.cookies)
122+
123123

124124

125125
commands = {
@@ -128,6 +128,7 @@ def _quit():
128128
'quit': _quit,
129129
'exit': _quit,
130130
'addrs': api.get_addrs,
131+
'cache': api.clear_cache,
131132
'captions': api.get_captions,
132133
"commentdata": api.get_comment_data,
133134
'comments': api.get_total_comments,
@@ -151,6 +152,7 @@ def _quit():
151152
'wtagged': api.get_people_who_tagged
152153
}
153154

155+
154156
signal.signal(signal.SIGINT, signal_handler)
155157
if is_windows:
156158
pyreadline.Readline().parse_and_bind("tab: complete")
@@ -159,14 +161,25 @@ def _quit():
159161
gnureadline.parse_and_bind("tab: complete")
160162
gnureadline.set_completer(completer)
161163

164+
if not args.command:
165+
printlogo()
166+
167+
162168
while True:
163-
pc.printout("Run a command: ", pc.YELLOW)
164-
cmd = input()
169+
if args.command:
170+
cmd = args.command
171+
_cmd = commands.get(args.command)
172+
else:
173+
signal.signal(signal.SIGINT, signal_handler)
174+
gnureadline.parse_and_bind("tab: complete")
175+
gnureadline.set_completer(completer)
176+
pc.printout("Run a command: ", pc.YELLOW)
177+
cmd = input()
178+
179+
_cmd = commands.get(cmd)
165180

166-
_cmd = commands.get(cmd)
167-
168181
if _cmd:
169-
_cmd()
182+
_cmd()
170183
elif cmd == "FILE=y":
171184
api.set_write_file(True)
172185
elif cmd == "FILE=n":
@@ -179,3 +192,6 @@ def _quit():
179192
print("")
180193
else:
181194
pc.printout("Unknown command\n", pc.RED)
195+
196+
if args.command:
197+
break

output/dont_delete_this_folder.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Please don't deleate this folder.
1+
Please don't delete this folder.

0 commit comments

Comments
 (0)