Skip to content

Commit a85fe32

Browse files
committed
Delete -a option
1 parent 103fe4a commit a85fe32

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/fosslight_binary/binary_analysis.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def get_file_list(path_to_find):
120120
return file_cnt, bin_list, found_jar
121121

122122

123-
def find_binaries(path_to_find_bin, output_dir, format, _include_file_command, dburl=""):
123+
def find_binaries(path_to_find_bin, output_dir, format, dburl=""):
124124

125125
_result_log, result_report, binary_txt_file, output_extension = init(
126126
path_to_find_bin, output_dir, format)
@@ -136,7 +136,7 @@ def find_binaries(path_to_find_bin, output_dir, format, _include_file_command, d
136136
exit=True)
137137

138138
total_file_cnt, file_list, found_jar = get_file_list(path_to_find_bin)
139-
total_bin_cnt, return_list = return_bin_only(file_list, _include_file_command)
139+
total_bin_cnt, return_list = return_bin_only(file_list)
140140

141141
# Run OWASP Dependency-check
142142
if found_jar:
@@ -178,11 +178,9 @@ def find_binaries(path_to_find_bin, output_dir, format, _include_file_command, d
178178
auto_bin_cnt=str(db_loaded_cnt))
179179

180180

181-
def return_bin_only(file_list, include_file_type):
181+
def return_bin_only(file_list):
182182
bin_cnt = 0
183183
bin_list = []
184-
if include_file_type != "":
185-
include_file_type = include_file_type.lower()
186184
for file_item in file_list:
187185
file_with_path = file_item.bin_name
188186
file = file_item.binary_name_without_path
@@ -199,8 +197,6 @@ def return_bin_only(file_list, include_file_type):
199197
file_command_result.startswith(x)]
200198
if len(removed_keyword) > 0:
201199
continue
202-
if include_file_type != "" and include_file_type not in file_command_result:
203-
continue
204200

205201
error, error_msg = file_item.set_checksum_tlsh()
206202
if error:
@@ -248,7 +244,6 @@ def main():
248244
output_dir = ""
249245
path_to_find_bin = ""
250246
format = ""
251-
_include_file_command = ""
252247
db_url = ""
253248

254249
opts, args = getopt.getopt(argv, 'hvp:a:o:f:d:')
@@ -259,8 +254,6 @@ def main():
259254
print_package_version(_PKG_NAME, "FOSSLight Binary Scanner Version:")
260255
elif opt == "-p":
261256
path_to_find_bin = arg
262-
elif opt == "-a": # Target Architecture
263-
_include_file_command = arg
264257
elif opt == "-o":
265258
output_dir = arg
266259
elif opt == "-f":
@@ -275,8 +268,7 @@ def main():
275268
else:
276269
print_help_msg()
277270

278-
find_binaries(path_to_find_bin, output_dir, format,
279-
_include_file_command, db_url)
271+
find_binaries(path_to_find_bin, output_dir, format, db_url)
280272

281273

282274
if __name__ == '__main__':

0 commit comments

Comments
 (0)