-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_target.py
More file actions
43 lines (22 loc) · 845 Bytes
/
create_target.py
File metadata and controls
43 lines (22 loc) · 845 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
42
43
import os
import subprocess
# ----- GATHERING PATH INFO -----
output = subprocess.getoutput( 'cd' )
full_path = '' + output
# ----- GETTING USERNAME -----
LHS_start = output.find('Users') + len('Users') + 1
user = output[LHS_start:]
RHS_end = user.find('\\')
user = user[:RHS_end]
# ----- GETTING PRE-USERNAME ------
n = full_path.find(user + '\\')
pre_user = full_path[:n]
target = pre_user + user + '\Desktop'
# ----------- CREATING OS PATHS FOR run_me -----------
i = 'LockedContent'
to_locked_dir = 'VAULT'
sys_lock = 'sys_lock.txt'
end_name = 'Lock & Unlock Vault.bat'
final_path = os.path.join(target,to_locked_dir)
# ----------- User input -----------
pw = input('Choose password\n...no spaces allowed\n...only letters and numbers please\n ---->input your password here: ')