Package: rarCracker
Simple Compressed File CrackerA python based compressed file crackergenerate password from ASCII charset or custom charset usingcharsetparammulti-threadInstallFrom gitgit clone https://github.com/hanerx/rarCracker.gitrunpip install -r requriements.txtmake sure you have installedwinrarorunarorbsdstarrunpython -m rarCrackerFrom releasedownload file fromreleaserunpip install rarCracker-0.0.1.tar.gzrunpython -m rarCrackerFrom piprunpip install rarCrackerUsageBasicfromrarCrackerimportRarCrackerif__name__=='__main__':cracker=RarCracker('file_path',3,3,workers=2,charset='1234567890')cracker.crack()Use Local DictionaryfromrarCrackerimportRarCracker,LocalProviderif__name__=='__main__':cracker=RarCracker('./test.rar',provider=LocalProvider('./dict.txt'),unrar_tool='unrar')print(cracker.crack())Use Network DictionaryfromrarCrackerimportRarCracker,NetworkProviderif__name__=='__main__':cracker=RarCracker('./test.rar',provider=NetworkProvider('https://hanerx.top/rarCracker/dict.json',method=NetworkProvider.GET))print(cracker.crack())Use BreakpointfromrarCrackerimportRarCracker,LocalProvider,LocalBreakPointif__name__=='__main__':cracker=RarCracker('./test.rar',provider=LocalProvider('./dict.txt'),unrar_tool='unrar',break_point=LocalBreakPoint(breakpoint_count=1))print(cracker.crack())APIRarCrackerThe main class for moduleparamsnametypedescdefaultrequiredfile_pathstrthe compressed file path, if file does not exist raiseFileNotFoundError, if file is not.raror.zipraiseTypeErrorNoneTruestartintthe minimum password length1Falsestopintthe maximum password length10Falsecharsetstrthe password charsetdigits + ascii_letters + punctuationFalseoutputstrthe output folder'./output'Falseworkersintthe number of multi thread8Falselevelintthe logging display levellogging.INFOFalseunrar_toolstrthe decompressing tool, supportunrar\unar\bsdtar'unrar'FalseproviderProviderthe password provider, if provider is notNoneit will replace original password generator andstart\stop\charsetwill not workNoneFalseMethodscrack()The method which start cracking, will block until all threads done or password found, if crack failed it will returnNonereturnNoneorstrgenerate_password()The method which will return an iterator for passwordreturniterProviderThe abstract class for provider paramMethodsgenerate(file)The method which will return an iterator for passwordreturniterDefaultProviderThe default password providerParamnametypedescdefaultrequiredstartintthe minimum password length1Falsestopintthe maximum password length10Falsecharsetstrthe password charsetdigits + ascii_letters + punctuationFalseMethodsgenerate(file)The method which will return an iterator for passwordreturniterLocalProviderThe class allows to get password from local dictionaryParamnametypedescdefaultrequiredpathstrthe dictionary file path, if file does not exist raiseFileNotFoundErrorNoneTrueMethodsgenerate(file)The method which will return an iterator for passwordreturniterNetworkProviderThe class allows to get password from network dictionaryParamnametypedescdefaultrequiredurlstrthe url of the dictionaryNoneTruemethodmethodthe method of request, supportGET\POST\PUT\DELETE\OPTION\HEADNetworkProvider.GETFalseon_decodemethodthe decode method for responseself.default_decode(result)False**kwargssupport params forrequestsmoduleNoneFalseMethodsdefault_decode(result)The method which will decode the response by defaultaccept json format array, for example["123","124","125"]returnlistgenerate(file)The method which will return an iterator for passwordreturniterBreakPointThe abstract class for break_point paramMethodsgenerate(provider,file)The method which will return a iterator for password with breakpoint supportedreturniterDefaultBreakPointThe default breakpoint when break_point param is NoneMethodsgenerate(provider,file)The method which will return a iterator for password with breakpoint supportedreturniterLocalBreakPointThe breakpoint will save cracking count number into local file and recover the progress from local fileParamnametypedescdefaultrequiredbreakpoint_pathstrthe breakpoint file path, if file does not exist counter will start at 0'./breakpoint.txt'Falsebreakpoint_countintthe interval between two breakpoint1000False