Skip to content

Commit

Permalink
Merge pull request #20 from Datalux/development
Browse files Browse the repository at this point in the history
version 0.5
  • Loading branch information
Datalux authored Jul 24, 2020
2 parents ac77be0 + ff8c893 commit 23049bc
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 56 deletions.
17 changes: 13 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from Osintgram import Osintgram
from src.Osintgram import Osintgram
import argparse
import printcolors as pc
from src import printcolors as pc
import sys


Expand All @@ -15,15 +15,20 @@ def printlogo():
pc.printout("\_______ /____ >__|___| /__| \___ /|__| (____ /__|_| /\n", pc.YELLOW)
pc.printout(" \/ \/ \/ /_____/ \/ \/ \n", pc.YELLOW)
print('\n')
pc.printout("Version 0.3 - Developed by Giuseppe Criscione - 2019\n\n", pc.YELLOW)
pc.printout("Version 0.5 - 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")
pc.printout("Type 'JSON=y' to export results to a JSON files like '<target username>_<command>.json (deafult is "
"disabled)'\n")
pc.printout("Type 'JSON=n' to disable exporting to files'\n")


def cmdlist():
pc.printout("FILE=y/n\t")
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")
Expand Down Expand Up @@ -66,7 +71,7 @@ def cmdlist():
while True:
pc.printout("Run a command: ", pc.YELLOW)
cmd = input()
if (cmd == "quit" or cmd == "exit"):
if cmd == "quit" or cmd == "exit":
pc.printout("Goodbye!\n", pc.RED)
sys.exit(0)
elif cmd == "list" or cmd == "help":
Expand All @@ -93,6 +98,10 @@ def cmdlist():
api.setWriteFile(True)
elif cmd == "FILE=n":
api.setWriteFile(False)
elif cmd == "JSON=y":
api.setJsonDump(True)
elif cmd == "JSON=n":
api.setJsonDump(False)
elif cmd == "photos":
api.getUserPhoto()
elif cmd == "captions":
Expand Down
9 changes: 4 additions & 5 deletions InstagramAPI.py → src/InstagramAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,17 @@ class InstagramAPI:
# IGDataPath # Data storage path

def __init__(self, username, password, debug=False, IGDataPath=None):
self.uuid = self.generateUUID(True)
self.password = password
self.username = username
self.username_id = ""
m = hashlib.md5()
m.update(username.encode('utf-8') + password.encode('utf-8'))
self.device_id = self.generateDeviceId(m.hexdigest())
self.setUser(username, password)
self.isLoggedIn = False
self.LastResponse = None
self.s = requests.Session()

def setUser(self, username, password):
self.username = username
self.password = password
self.uuid = self.generateUUID(True)

def setProxy(self, proxy=None):
"""
Expand Down
Loading

0 comments on commit 23049bc

Please sign in to comment.