-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrefresh_db.py
40 lines (30 loc) · 938 Bytes
/
refresh_db.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 31 18:44:46 2019
@author: parashar
"""
from insta_ops import InstaOps
from random import randint, choice
import time
import multiprocessing as mp
from datetime import datetime
def update_user_meta(user):
instance = InstaOps(True, True, True, True)
try:
meta = instance._user_meta(user)
instance._update_meta(user, meta, True)
except:
instance.db_conn.execute('''UPDATE instaDB
SET acc_status=0 WHERE user_id="{usr}";
'''.format(usr=user))
print(f"Commencing HAVOC @{datetime.now().date()},\
please close other applications...")
if __name__ == '__main__':
incognito = InstaOps(True, True, True, True)
missing_users = incognito._get_missing_meta_users()
p = mp.Pool(mp.cpu_count())
p.map(update_user_meta, missing_users)
bot = InstaOps()
bot.account_init()
bot.sync_db()