fosslight-binary 5.1.1__tar.gz → 5.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/PKG-INFO +1 -1
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/requirements.txt +2 -2
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/setup.py +1 -1
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/binary_analysis.py +10 -8
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/cli.py +22 -2
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/PKG-INFO +1 -1
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/requires.txt +2 -2
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/LICENSE +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/LICENSES/Apache-2.0.txt +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/LICENSES/LicenseRef-3rd_party_licenses.txt +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/MANIFEST.in +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/README.md +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/setup.cfg +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/__init__.py +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/_binary.py +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/_binary_dao.py +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/_help.py +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/_jar_analysis.py +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary/_simple_mode.py +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/SOURCES.txt +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/dependency_links.txt +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/entry_points.txt +0 -0
- {fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/top_level.txt +0 -0
|
@@ -90,12 +90,15 @@ def init(path_to_find_bin, output_file_name, formats, path_to_exclude=[]):
|
|
|
90
90
|
for i, output_extension in enumerate(output_extensions):
|
|
91
91
|
if output_files[i] is None or output_files[i] == "":
|
|
92
92
|
if formats:
|
|
93
|
-
if formats[i].startswith('spdx'):
|
|
94
|
-
if platform.system()
|
|
95
|
-
|
|
96
|
-
else:
|
|
97
|
-
logger.warning('spdx format is not supported on Windows. Please remove spdx from format.')
|
|
93
|
+
if formats[i].startswith('spdx') or formats[i].startswith('cyclonedx'):
|
|
94
|
+
if platform.system() == 'Windows':
|
|
95
|
+
logger.warning(f'{formats[i]} is not supported on Windows. Please remove {formats[i]} from format.')
|
|
98
96
|
to_remove.append(i)
|
|
97
|
+
else:
|
|
98
|
+
if formats[i].startswith('spdx'):
|
|
99
|
+
output_files[i] = f"fosslight_spdx_bin_{start_time}"
|
|
100
|
+
elif formats[i].startswith('cyclonedx'):
|
|
101
|
+
output_files[i] = f'fosslight_cyclonedx_bin_{start_time}'
|
|
99
102
|
else:
|
|
100
103
|
if output_extension == _json_ext:
|
|
101
104
|
output_files[i] = f"fosslight_opossum_bin_{start_time}"
|
|
@@ -200,12 +203,11 @@ def find_binaries(path_to_find_bin, output_dir, formats, dburl="", simple_mode=F
|
|
|
200
203
|
writing_msg = ""
|
|
201
204
|
results = []
|
|
202
205
|
bin_list = []
|
|
203
|
-
base_dir_name = os.path.basename(path_to_find_bin)
|
|
204
206
|
scan_item = ScannerItem(PKG_NAME, "")
|
|
205
|
-
abs_path_to_exclude = [os.path.abspath(
|
|
207
|
+
abs_path_to_exclude = [os.path.abspath(path) for path in path_to_exclude if path.strip() != ""]
|
|
206
208
|
|
|
207
209
|
if not os.path.isdir(path_to_find_bin):
|
|
208
|
-
error_occured(error_msg=f"Can't find the directory
|
|
210
|
+
error_occured(error_msg=f"(-p option) Can't find the directory: {path_to_find_bin}",
|
|
209
211
|
result_log=_result_log,
|
|
210
212
|
exit=True,
|
|
211
213
|
mode=mode)
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import argparse
|
|
6
6
|
import sys
|
|
7
7
|
import os
|
|
8
|
+
import shutil
|
|
8
9
|
from fosslight_util.help import print_package_version
|
|
9
10
|
from fosslight_binary._help import print_help_msg
|
|
10
11
|
from fosslight_binary.binary_analysis import find_binaries
|
|
@@ -13,6 +14,23 @@ from fosslight_util.timer_thread import TimerThread
|
|
|
13
14
|
_PKG_NAME = "fosslight_binary"
|
|
14
15
|
|
|
15
16
|
|
|
17
|
+
def get_terminal_size():
|
|
18
|
+
size = shutil.get_terminal_size()
|
|
19
|
+
return size.lines
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def paginate_file(file_path):
|
|
23
|
+
lines_per_page = get_terminal_size() - 1
|
|
24
|
+
with open(file_path, 'r', encoding='utf8') as file:
|
|
25
|
+
lines = file.readlines()
|
|
26
|
+
|
|
27
|
+
for i in range(0, len(lines), lines_per_page):
|
|
28
|
+
os.system('clear' if os.name == 'posix' else 'cls')
|
|
29
|
+
print(''.join(lines[i: i + lines_per_page]))
|
|
30
|
+
if i + lines_per_page < len(lines):
|
|
31
|
+
input("Press Enter to see the next page...")
|
|
32
|
+
|
|
33
|
+
|
|
16
34
|
def main():
|
|
17
35
|
global windows
|
|
18
36
|
path_to_find_bin = ""
|
|
@@ -85,8 +103,10 @@ def main():
|
|
|
85
103
|
data_path = os.path.join(base_path, 'LICENSES')
|
|
86
104
|
print(f"*** {_PKG_NAME} open source license notice ***")
|
|
87
105
|
for ff in os.listdir(data_path):
|
|
88
|
-
|
|
89
|
-
|
|
106
|
+
source_file = os.path.join(data_path, ff)
|
|
107
|
+
destination_file = os.path.join(base_path, ff)
|
|
108
|
+
paginate_file(source_file)
|
|
109
|
+
shutil.copyfile(source_file, destination_file)
|
|
90
110
|
sys.exit(0)
|
|
91
111
|
|
|
92
112
|
timer = TimerThread()
|
|
File without changes
|
|
File without changes
|
{fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/LICENSES/LicenseRef-3rd_party_licenses.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.1 → fosslight_binary-5.1.2}/src/fosslight_binary.egg-info/top_level.txt
RENAMED
|
File without changes
|