commit 65147ad552817d1972305202052ef04cc1d79040
parent f1b6f1031c41c8948347bd4aebc21d41b3df7441
Author: finwo <finwo@pm.me>
Date: Sat, 9 May 2026 01:55:27 +0200
Add basic usage with --help
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -11,6 +11,19 @@ int main(int argc, char **argv) {
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbose") == 0) {
g_cve_ctx.verbose = 1;
+ } else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) {
+ fprintf(stdout,
+ "Usage: cve-toolkit [OPTIONS]\n"
+ "\n"
+ "Options:\n"
+ " (no arguments) Run vulnerability detection\n"
+ " -v, --verbose Run detection with verbose logging\n"
+ " -h, --help Show this help message\n"
+ " --license Print license and exit\n"
+ "\n"
+ "Copyright (c) 2026 finwo\n"
+ "https://git.finwo.net/app/cve-toolkit/file/README.md.html\n");
+ return 0;
} else if (strcmp(argv[i], "--license") == 0) {
fwrite(LICENSE_md, 1, LICENSE_md_len, stdout);
return 0;