Skip to content

Commit

Permalink
remove output directory options
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdhrumilmistry committed Jun 15, 2022
1 parent bbb478a commit aa19705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions examples/EvilFiles/generatorScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from os import getcwd

exe = ExecutableGenerator(
file_path = r'D:\GithubRepos\pyhtools\examples\EvilFiles\generatorScript.py', # evil program file path
output_filename = 'evil_file', # output filename without extension, adding extension might raise error
output_dir = getcwd(), # output directory
file_path = r'D:\GithubRepos\pyhtools\examples\EvilFiles\Malwares\key_logger.py', # evil program file path
output_dir = '.', # output directory
compiler = Compilers.DEFAULT, # compile using DEFAULT, CLANG, MINGW
onefile = True, # creates single exe file
remove_output = True, # deletes all compiled files and retains only exe
Expand Down
3 changes: 1 addition & 2 deletions pyhtools/evil_files/exec_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __generate_command(self):
if value_type is bool and value:
cmd = f'--{key} '
elif value_type is str:
cmd = f'--{key} "{value}" '
cmd = f'--{key}={value} '

# add option to command
command += cmd
Expand All @@ -65,5 +65,4 @@ def __generate_command(self):

def generate_executable(self):
command = self.__generate_command()
print(command)
return call(command.split(), shell=True)

0 comments on commit aa19705

Please sign in to comment.