From 8658cb73cac8febfccf8dfd64344fe1817af6cd1 Mon Sep 17 00:00:00 2001 From: e-ago Date: Fri, 4 Aug 2017 13:52:35 -0700 Subject: [PATCH] Usage & options --- CUDA_version/main.cu | 16 ++++++++-------- README.md | 10 +++++----- run.sh | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CUDA_version/main.cu b/CUDA_version/main.cu index b307560..b6f8a86 100755 --- a/CUDA_version/main.cu +++ b/CUDA_version/main.cu @@ -36,11 +36,11 @@ void usage(char *name){ "\t\tPath to your disk image\n" " -d, --dictionary file" "\t\tPath to dictionary or alphabet file\n" - " -g, --cuda.gpu" + " -g, --gpu" "\t\tGPU device number\n" - " -t, --cuda.passthread" + " -t, --passthread" "\t\tSet the number of password per thread threads\n" - " -b, --cuda.blocks" + " -b, --blocks" "\t\tSet the number of blocks\n\n", name); } @@ -124,13 +124,13 @@ int main (int argc, char **argv) {"dictionary", required_argument, 0, 'd'}, //{"info", required_argument, 0, 'o'}, //{"cuda.threads", required_argument, 0, 't'}, - {"cuda.passthread", required_argument, 0, 't'}, - {"cuda.blocks", required_argument, 0, 'k'}, - {"cuda.gpu", required_argument, 0, 'g'}, + {"passthread", required_argument, 0, 't'}, + {"blocks", required_argument, 0, 'b'}, + {"gpu", required_argument, 0, 'g'}, {0, 0, 0, 0} }; - opt = getopt_long (argc, argv, "hi:d:t:k:g:o:", long_options, &option_index); + opt = getopt_long (argc, argv, "hi:d:t:b:g:", long_options, &option_index); if (opt == -1) break; switch (opt) { @@ -162,7 +162,7 @@ int main (int argc, char **argv) exit(EXIT_FAILURE); } break; - case 'k': + case 'b': gridBlocks = atoi(optarg); break; case 'g': diff --git a/README.md b/README.md index d3d6d48..d332fc8 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,12 @@ Usage: ./bitcracker_cuda -i -d Options: - -h, --help Show this help - -i, --diskimage Path to your disk image + -h, --help Show this help + -i, --diskimage Path to your disk image -d, --dictionary file Path to dictionary or alphabet file - -g, --cuda.gpu GPU device number - -t, --cuda.passthread Set the number of password per thread threads - -b, --cuda.blocks Set the number of blocks + -g, --gpu GPU device number + -t, --passthread Set the number of password per thread threads + -b, --blocks Set the number of blocks ``` You can use the run.sh script to execute two simple runs using the encrypted images we provide in this repo: diff --git a/run.sh b/run.sh index 4958999..28cea6d 100755 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ ./CUDA_version/bitcracker_cuda -h -./CUDA_version/bitcracker_cuda -i ./Images/imgWin8 -d ./Dictionary/dummy.txt -t 1 -k 1 -g 0 +./CUDA_version/bitcracker_cuda -i ./Images/imgWin8 -d ./Dictionary/dummy.txt -t 1 -b 1 -g 0 -./CUDA_version/bitcracker_cuda -i ./Images/imgWin7 -d ./Dictionary/dummy.txt -t 1 -k 1 -g 0 +./CUDA_version/bitcracker_cuda -i ./Images/imgWin7 -d ./Dictionary/dummy.txt -t 1 -b 1 -g 0