-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdbQueue.py
More file actions
41 lines (32 loc) · 987 Bytes
/
dbQueue.py
File metadata and controls
41 lines (32 loc) · 987 Bytes
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
41
#!/usr/bin/python
import os
import random
import multiprocessing
from multiprocessing import Manager
from ctypes import c_bool, c_wchar_p
# Root Check
if os.geteuid() != 0:
exit("You need to have root privileges to run this script.\nPlease try again using 'sudo'.")
dirPath = os.path.dirname(os.path.realpath(__file__))
# Master key
############################
master = str(int(random.randint(9999, 999999)))
# Work Queue
#################################
work = multiprocessing.Queue()
workDB = multiprocessing.Queue()
manager = Manager()
pidLIST = manager.list()
#debug = multiprocessing.Value(c_bool,True)
debug = multiprocessing.Value(c_wchar_p,"info")
# Set up the Dump
##############################
dumpDir = dirPath + "/dump/" + master + "/"
serviceDir = dumpDir + "scriptOut/"
screenDir = dumpDir + "screenShots/"
# Set up the Database
#############################
dataDIR = dirPath + "/data/" + master + "/"
DB = "reconda.db"
DBFILE = dataDIR + DB
conn = True