Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
deathsec
GitHub Repository: deathsec/instagram-py
Path: blob/master/InstagramPy/InstagramPyDumper.py
197 views
1
# The MIT License.
2
# Copyright (C) 2017 The Future Shell , DeathSec.
3
#
4
# @filename : InstagramPyDumper.py
5
# @description : Dumps succession logs for the given username
6
#
7
import json
8
import os
9
10
11
class InstagramPyDumper:
12
dump_data = "{}/.instagram-py/dump.json".format(os.path.expanduser('~'))
13
required_info = None
14
15
def __init__(self, username):
16
if not os.path.isfile(self.dump_data):
17
return None
18
json_dump = json.load(open(self.dump_data, 'r'))
19
self.required_info = None
20
try:
21
self.required_info = json_dump[username]
22
except KeyError:
23
pass
24
25
def Dump(self):
26
if self.required_info is None:
27
print("No Log Found!")
28
else:
29
print(
30
"Username : {}\nPassword : {}\nAttacked On : {}"
31
.format(self.required_info['id'],
32
self.required_info['password'],
33
self.required_info['started']
34
)
35
)
36
return True
37
38