From 163f845728f406ebe68b70122a9f37f28f613e14 Mon Sep 17 00:00:00 2001 From: bandrel Date: Fri, 4 May 2018 16:02:15 -0400 Subject: [PATCH] automated check for OSX vs Linux --- wordlist_optimizer.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wordlist_optimizer.py b/wordlist_optimizer.py index 768e0e0..b10f9a4 100755 --- a/wordlist_optimizer.py +++ b/wordlist_optimizer.py @@ -5,9 +5,6 @@ import os import subprocess import shutil -splitlen_bin = "hashcat-utils/bin/splitlen.app" -rli_bin = "hashcat-utils/bin/rli.app" - # Help def usage(): print("usage: python %s " % sys.argv[0]) @@ -32,8 +29,15 @@ def main(): except IndexError: usage() sys.exit() - - # Get list of wordlists from argument + + if sys.platform == 'darwin': + splitlen_bin = "hashcat-utils/bin/splitlen.app" + rli_bin = "hashcat-utils/bin/rli.app" + else: + splitlen_bin = "hashcat-utils/bin/splitlen.bin" + rli_bin = "hashcat-utils/bin/rli.bin" + + # Get list of wordlists from argument for wordlist in input_list: print(wordlist.strip())