PBA changes: Windows
This commit is contained in:
parent
15ac77056a
commit
49350aa303
|
@ -5,11 +5,13 @@ HIDDEN_FOLDER = 'C:\\monkey-hidden-folder'
|
||||||
|
|
||||||
def get_windows_commands_to_hide_files():
|
def get_windows_commands_to_hide_files():
|
||||||
return [
|
return [
|
||||||
'echo Successfully created hidden file >', # create text file
|
'type NUL >', # create empty file
|
||||||
HIDDEN_FILE,
|
HIDDEN_FILE,
|
||||||
'&& attrib', # change file attributes
|
'&& attrib', # change file attributes
|
||||||
'+h', # make hidden
|
'+h', # make hidden
|
||||||
HIDDEN_FILE
|
HIDDEN_FILE,
|
||||||
|
'echo Successfully created hidden file: {0} > {0}'.format(HIDDEN_FILE),
|
||||||
|
'&& type {}'.format(HIDDEN_FILE)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,8 +22,9 @@ def get_windows_commands_to_hide_folders():
|
||||||
'&& attrib', # change file attributes
|
'&& attrib', # change file attributes
|
||||||
'+h', # make hidden
|
'+h', # make hidden
|
||||||
HIDDEN_FOLDER,
|
HIDDEN_FOLDER,
|
||||||
'&& echo Successfully created hidden folder >'
|
'&& echo Successfully created hidden folder: {} >'.format(HIDDEN_FOLDER),
|
||||||
'{}\{}'.format(HIDDEN_FOLDER, 'some-file')
|
'{}\\{}'.format(HIDDEN_FOLDER, 'some-file'),
|
||||||
|
'&& type {}'.format(HIDDEN_FOLDER, 'some-file')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +43,7 @@ def get_winAPI_to_hide_files():
|
||||||
fileFlags,
|
fileFlags,
|
||||||
0)
|
0)
|
||||||
|
|
||||||
return "Created hidden file: {}".format(HIDDEN_FILE_WINAPI), True
|
return "Succesfully created hidden file: {}".format(HIDDEN_FILE_WINAPI), True
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
return str(err), False
|
return str(err), False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue