Skip to content

Commit 23049bc

Browse files
authored
Merge pull request #20 from Datalux/development
version 0.5
2 parents ac77be0 + ff8c893 commit 23049bc

File tree

4 files changed

+234
-56
lines changed

4 files changed

+234
-56
lines changed

main.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
from Osintgram import Osintgram
4+
from src.Osintgram import Osintgram
55
import argparse
6-
import printcolors as pc
6+
from src import printcolors as pc
77
import sys
88

99

@@ -15,15 +15,20 @@ def printlogo():
1515
pc.printout("\_______ /____ >__|___| /__| \___ /|__| (____ /__|_| /\n", pc.YELLOW)
1616
pc.printout(" \/ \/ \/ /_____/ \/ \/ \n", pc.YELLOW)
1717
print('\n')
18-
pc.printout("Version 0.3 - Developed by Giuseppe Criscione - 2019\n\n", pc.YELLOW)
18+
pc.printout("Version 0.5 - Developed by Giuseppe Criscione - 2019\n\n", pc.YELLOW)
1919
pc.printout("Type 'list' to show all allowed commands\n")
2020
pc.printout("Type 'FILE=y' to save results to files like '<target username>_<command>.txt (deafult is disabled)'\n")
2121
pc.printout("Type 'FILE=n' to disable saving to files'\n")
22+
pc.printout("Type 'JSON=y' to export results to a JSON files like '<target username>_<command>.json (deafult is "
23+
"disabled)'\n")
24+
pc.printout("Type 'JSON=n' to disable exporting to files'\n")
2225

2326

2427
def cmdlist():
2528
pc.printout("FILE=y/n\t")
2629
print("Enable/disable output in a '<target username>_<command>.txt' file'")
30+
pc.printout("JSON=y/n\t")
31+
print("Enable/disable export in a '<target username>_<command>.json' file'")
2732
pc.printout("info\t\t")
2833
print("Get target info")
2934
pc.printout("addrs\t\t")
@@ -66,7 +71,7 @@ def cmdlist():
6671
while True:
6772
pc.printout("Run a command: ", pc.YELLOW)
6873
cmd = input()
69-
if (cmd == "quit" or cmd == "exit"):
74+
if cmd == "quit" or cmd == "exit":
7075
pc.printout("Goodbye!\n", pc.RED)
7176
sys.exit(0)
7277
elif cmd == "list" or cmd == "help":
@@ -93,6 +98,10 @@ def cmdlist():
9398
api.setWriteFile(True)
9499
elif cmd == "FILE=n":
95100
api.setWriteFile(False)
101+
elif cmd == "JSON=y":
102+
api.setJsonDump(True)
103+
elif cmd == "JSON=n":
104+
api.setJsonDump(False)
96105
elif cmd == "photos":
97106
api.getUserPhoto()
98107
elif cmd == "captions":

InstagramAPI.py renamed to src/InstagramAPI.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,17 @@ class InstagramAPI:
216216
# IGDataPath # Data storage path
217217

218218
def __init__(self, username, password, debug=False, IGDataPath=None):
219+
self.uuid = self.generateUUID(True)
220+
self.password = password
221+
self.username = username
222+
self.username_id = ""
219223
m = hashlib.md5()
220224
m.update(username.encode('utf-8') + password.encode('utf-8'))
221225
self.device_id = self.generateDeviceId(m.hexdigest())
222-
self.setUser(username, password)
223226
self.isLoggedIn = False
224227
self.LastResponse = None
225228
self.s = requests.Session()
226229

227-
def setUser(self, username, password):
228-
self.username = username
229-
self.password = password
230-
self.uuid = self.generateUUID(True)
231230

232231
def setProxy(self, proxy=None):
233232
"""

0 commit comments

Comments
 (0)