Skip to content

Commit fffba65

Browse files
committed
Update help message
1 parent 2a4c3de commit fffba65

1 file changed

Lines changed: 46 additions & 22 deletions

File tree

src/fosslight_binary/_help.py

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,53 @@
66
from fosslight_util.output_format import SUPPORT_FORMAT
77

88
_HELP_MESSAGE_BINARY = f"""
9-
Usage: fosslight_bin [option1] <arg1> [option2] <arg2>...
10-
11-
After extracting the binaries, the open source and license information of the saved binaries are retrieved by comparing the similarity
12-
with the binaries stored in the Binary DB (FOSSLight > Binary DB) with the Binary's TLSH (Trend micro Locality Sensitive Hash).
13-
14-
Options:
15-
-p <binary_path>\t\t Path to analyze binaries (Default: current directory)
16-
-h\t\t\t\t Print help message
17-
-v\t\t\t\t Print FOSSLight Binary Scanner version
18-
-s\t\t\t\t Extract only the binary list in simple mode
19-
-e <path>\t\t\t Path to exclude from analysis (files and directories)
20-
* IMPORTANT: Always wrap patterns in double quotes ("") to avoid shell expansion.
21-
Example) fosslight_bin -e "test/abc.py" "*.jar"
22-
-o <output_path>\t\t Output path
23-
\t\t\t\t (If you want to generate the specific file name, add the output path with file name.)
24-
-f <format> [<format> ...]\t Output file formats
25-
\t\t\t\t ({', '.join(SUPPORT_FORMAT)})
26-
\t\t\t\t Multiple formats can be specified separated by space.
27-
-d <db_url>\t\t\t DB Connection(format :'postgresql://username:password@host:port/database_name')
28-
--notice\t\t\t Print the open source license notice text.
29-
--no_correction\t\t\t Enter if you don't want to correct OSS information with sbom-info.yaml
30-
--correct_fpath <path>\t\t Path to the sbom-info.yaml file"""
9+
📖 Usage
10+
────────────────────────────────────────────────────────────────────
11+
fosslight_bin [options] <arguments>
3112
13+
📝 Description
14+
────────────────────────────────────────────────────────────────────
15+
FOSSLight Binary Scanner extracts binaries and retrieves open source
16+
and license information by comparing similarity with binaries stored
17+
in the Binary DB using TLSH (Trend Micro Locality Sensitive Hash).
18+
19+
⚙️ General Options
20+
────────────────────────────────────────────────────────────────────
21+
-p <path> Binary path to analyze (default: current directory)
22+
-o <path> Output file path or directory
23+
-f <format> Output formats: {', '.join(SUPPORT_FORMAT)}
24+
(multiple formats can be specified, separated by space)
25+
-e <pattern> Exclude paths from analysis (files and directories)
26+
⚠️ IMPORTANT: Always wrap in quotes to avoid shell expansion
27+
Example: fosslight_bin -e "test/" "*.jar"
28+
-h Show this help message
29+
-v Show version information
30+
31+
🔍 Scanner-Specific Options
32+
────────────────────────────────────────────────────────────────────
33+
-s Extract only the binary list in simple mode
34+
-d <db_url> DB Connection (format: 'postgresql://user:pass@host:port/db')
35+
--notice Print the open source license notice text
36+
--no_correction Skip OSS information correction with sbom-info.yaml
37+
--correct_fpath <path> Path to custom sbom-info.yaml file
38+
39+
💡 Examples
40+
────────────────────────────────────────────────────────────────────
41+
# Scan current directory
42+
fosslight_bin
43+
44+
# Scan specific path with exclusions
45+
fosslight_bin -p /path/to/binaries -e "test/" "*.so"
46+
47+
# Generate output in specific format
48+
fosslight_bin -f excel -o results/
49+
50+
# Simple mode (extract binary list only)
51+
fosslight_bin -s -o binary_list.txt
52+
53+
# Connect to Binary DB for OSS information
54+
fosslight_bin -d "postgresql://user:pass@localhost:5432/exampledb"
55+
"""
3256

3357
def print_help_msg():
3458
helpMsg = PrintHelpMsg(_HELP_MESSAGE_BINARY)

0 commit comments

Comments
 (0)