+++ /dev/null
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2008 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-
-// Modified by Martin Westergaard for the chain check usage
-#ifdef _WIN32
-#include "boinc_win.h"
-#else
-#include "config.h"
-#include <cstdio>
-#include <cctype>
-#include <ctime>
-#include <cstring>
-#include <cstdlib>
-#include <csignal>
-#include <unistd.h>
-#endif
-
-#include <string>
-#include <fstream>
-
-#include "str_util.h"
-#include "util.h"
-#include "filesys.h"
-#include "boinc_api.h"
-#include "Public.h"
-// Rainbowcrack code
-#include "ChainWalkContext.h"
-#include "chain_checker.h"
-
-typedef unsigned int uint32;
-
-
-using std::string;
-
-int main(int argc, char **argv) {
- int retval;
- char output_path[512], chkpt_path[512];
- string sHashRoutineName, sCharsetName, sHash;
- uint32 nPlainLenMin, nPlainLenMax, nRainbowTableIndex;
- FILE* state, *infile, *outfile;
- retval = boinc_init();
- if (retval) {
- fprintf(stderr, "boinc_init returned %d\n", retval);
- exit(retval);
- }
-
- if(argc < 7)
- {
- std::cerr << "Not enough parameters";
- return -1;
- }
-
- // Initialize the args
- sHashRoutineName = argv[1];
- sCharsetName = argv[2];
- nPlainLenMin = atoi(argv[3]);
- nPlainLenMax = atoi(argv[4]);
- nRainbowTableIndex = atoi(argv[5]);
- sHash = argv[6];
-
-
- // Setup the ChainWalkContext
- if (!CChainWalkContext::SetHashRoutine(sHashRoutineName))
- {
- std::cerr << "hash routine " << sHashRoutineName << " not supported" << std::endl;
- return 1;
- }
-
- if (!CChainWalkContext::SetPlainCharset(sCharsetName, nPlainLenMin, nPlainLenMax))
- {
- std::cerr << "charset " << sCharsetName << " not supported" << std::endl;
- return 2;
- }
-
- if (!CChainWalkContext::SetRainbowTableIndex(nRainbowTableIndex))
- {
- std::cerr << "invalid rainbow table index " << nRainbowTableIndex << std::endl;
- return 3;
- }
-
-
- // Open the file containing the chains we have to check.
- boinc_resolve_filename("chains", output_path, sizeof(output_path));
- infile = boinc_fopen(output_path, "rb");
- if (infile == NULL)
- {
- std::cerr << "failed to open " << output_path << std::endl;
- return 4;
- }
-
- // Open the resulting file. This will *maybe* contain the password (if found)
- boinc_resolve_filename("result", output_path, sizeof(output_path));
- outfile = boinc_fopen(output_path, "wb");
- if (outfile == NULL)
- {
- std::cerr << "failed to create " << output_path << std::endl;
- return 5;
- }
-
- // Read the chains from the input file
- int len = GetFileLen(infile);
- int numchains = len / 12; // Each chain is 12 bytes. 8 bytes startpoint and 4 bytes for the guessed position
- fseek(infile, 0, SEEK_SET);
- ChainCheckChain *pChain = new ChainCheckChain[numchains];
- int totalread = 0, read;
- for(int i = 0; i < numchains; i++)
- {
- int read = fread(&pChain[i].nIndexS, sizeof(pChain[i].nIndexS), 1, infile);
- if(read != 1)
- {
- std::cerr << "Error reading chaincheck file" << std::endl;
- return 6;
- }
- read = fread(&pChain[i].nGuessedPos, sizeof(pChain[i].nGuessedPos), 1, infile);
- if(read != 1)
- {
- std::cerr << "Error reading chaincheck file" << std::endl;
- return 7;
- }
-
- }
- fclose(infile);
-
-
- // Start checking the chains for false alarms
- CChainWalkContext cwc;
- int found = 0;
- for(int i = 0; i < numchains; i++)
- {
- cwc.SetIndex(pChain[i].nIndexS);
- int nPos;
- for (nPos = 0; nPos < pChain[i].nGuessedPos; nPos++)
- {
- cwc.IndexToPlain();
- cwc.PlainToHash();
- cwc.HashToIndex(nPos);
- }
- cwc.IndexToPlain();
- cwc.PlainToHash();
- std::string sHashme = cwc.GetHash();
- // Check if this is a matching chain
- if(sHashme.compare(sHash) == 0)
- {
- fwrite(cwc.GetPlain().c_str(), 1, cwc.GetPlain().length(), outfile);
- std::cout << "Password is " << cwc.GetPlain() << std::endl;
- found = 1;
- break; // Password is found. Lets break out.
- }
- // This chain didn't contain the password, so we update the progress
- boinc_fraction_done((double)i / (double)numchains);
-
- }
- if(found == 0)
- fwrite("0x00", 4, 1, outfile);
- // Last step: Clean up
- fclose(outfile);
- boinc_fraction_done(1);
- boinc_finish(0);
-}
-
-#ifdef _WIN32
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode) {
- LPSTR command_line;
- char* argv[100];
- int argc;
-
- command_line = GetCommandLine();
- argc = parse_command_line( command_line, argv );
- return main(argc, argv);
-}
-#endif
-
-const char *BOINC_RCSID_33ac47a071 = "$Id: chain_checker.cpp 2008-11-28 Martin Westergaard $";
-
+++ /dev/null
-#include "boinc_api.h"
-
-struct UC_SHMEM {
- double update_time;
- double fraction_done;
- double cpu_time;
- BOINC_STATUS status;
- int countdown;
- // graphics app sets this to 5 repeatedly,
- // main program decrements it once/sec.
- // If it's zero, don't bother updating shmem
-};
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chain_checker", "chain_checker.vcproj", "{74C09EAC-2EA2-4548-9B61-0FEE56147DFE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Debug|Win32.ActiveCfg = Debug|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Debug|Win32.Build.0 = Debug|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Release|Win32.ActiveCfg = Release|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="chain_checker"
- ProjectGUID="{74C09EAC-2EA2-4548-9B61-0FEE56147DFE}"
- RootNamespace="chain_checker"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- WholeProgramOptimization="false"
- AdditionalIncludeDirectories="/boinc/lib;/boinc/api;"/boinc/zip";"/boinc/client/win";"/boinc/";../distrrtgen;../../rt api"
- PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableEnhancedInstructionSet="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib ole32.lib delayimp.lib ..\lib_debug\libboinc_staticcrt.lib ..\lib_debug\libboincapi_staticcrt.lib c:/openssl/lib/libeay32.lib"
- LinkIncremental="2"
- IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- AdditionalIncludeDirectories="/boinc/lib;/boinc/api;"/boinc/zip";"/boinc/client/win";"/boinc/";../distrrtgen;../../rt api"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_MT"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="false"
- EnableEnhancedInstructionSet="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib ..\lib_release\libboinc_staticcrt.lib ..\lib_release\libboincapi_staticcrt.lib c:/openssl/lib/libeay32.lib"
- LinkIncremental="1"
- IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\chain_checker.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkContext.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_setkey.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ecb_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashAlgorithm.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashRoutine.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md4.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md5.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\Public.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\chain_checker.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkContext.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_locl.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashAlgorithm.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashRoutine.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md4.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md5.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\podd.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\Public.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\sk.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\spr.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- <File
- RelativePath=".\ReadMe.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-# charset configuration file for DistrRTgen v3.2 by Martin Westergaard (martinwj2005@gmail.com)
-
-byte = []
-alpha = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
-alpha-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ ]
-alpha-numeric = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
-alpha-numeric-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
-alpha-numeric-symbol14 = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
-alpha-numeric-symbol14-space= [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+= ]
-all = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-all-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-alpha-numeric-symbol32-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-lm-frt-cp437 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9b\9c\9d\9e\9f¥àáâãäæçèéêëî]
-lm-frt-cp850 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9c\9d\9f¥µ¶·½¾ÇÏÑÒÓÔÕÖ×ØÞàáâãåæèéêëíï]
-lm-frt-cp437-850 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9b\9c\9d\9e\9f¥µ¶·½¾ÇÏÑÒÓÔÕÖ×ØÞàáâãäåæçèéêëíîï]
-
-numeric = [0123456789]
-numeric-space = [0123456789 ]
-loweralpha = [abcdefghijklmnopqrstuvwxyz]
-loweralpha-space = [abcdefghijklmnopqrstuvwxyz ]
-loweralpha-numeric = [abcdefghijklmnopqrstuvwxyz0123456789]
-loweralpha-numeric-space = [abcdefghijklmnopqrstuvwxyz0123456789 ]
-loweralpha-numeric-symbol14 = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=]
-loweralpha-numeric-all = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-loweralpha-numeric-symbol32-space= [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-
-mixalpha = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]
-mixalpha-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ]
-mixalpha-numeric = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
-mixalpha-numeric-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
-mixalpha-numeric-symbol14 = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
-mixalpha-numeric-all = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-mixalpha-numeric-symbol32-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-mixalpha-numeric-all-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+++ /dev/null
-# This should work on Linux. Modify as needed for other platforms.
-
-BOINC_DIR = /home/frt/server_stable
-BOINC_API_DIR = $(BOINC_DIR)/api
-BOINC_LIB_DIR = $(BOINC_DIR)/lib
-
-CXXFLAGS = -g \
- -DAPP_GRAPHICS \
- -I$(BOINC_DIR) \
- -I$(BOINC_LIB_DIR) \
- -I$(BOINC_API_DIR) \
- -L$(BOINC_API_DIR) \
- -L$(BOINC_LIB_DIR) \
- -L /usr/X11R6/lib \
- -L.
-
-
-PROGS = distrrtgen \
-
-all: $(PROGS)
-
-libstdc++.a:
- ln -s `g++ -print-file-name=libstdc++.a`
-
-clean:
- /bin/rm -f $(PROGS) *.o
-
-distclean:
- /bin/rm -f $(PROGS) *.o libstdc++.a
-
-distrrtgen: distrrtgen.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
- $(CXX) Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp md5.cpp $(CXXFLAGS) -o distrrtgen distrrtgen.o libstdc++.a -pthread -lboinc_api -lboinc -lssl -O3
+++ /dev/null
-# charset configuration file for DistrRTgen v3.2 by Martin Westergaard (martinwj2005@gmail.com)
-
-byte = []
-alpha = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
-alpha-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ ]
-alpha-numeric = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
-alpha-numeric-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
-alpha-numeric-symbol14 = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
-alpha-numeric-symbol14-space= [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+= ]
-all = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-all-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-alpha-numeric-symbol32-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-lm-frt-cp437 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9b\9c\9d\9e\9f¥àáâãäæçèéêëî]
-lm-frt-cp850 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9c\9d\9f¥µ¶·½¾ÇÏÑÒÓÔÕÖ×ØÞàáâãåæèéêëíï]
-lm-frt-cp437-850 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9b\9c\9d\9e\9f¥µ¶·½¾ÇÏÑÒÓÔÕÖ×ØÞàáâãäåæçèéêëíîï]
-
-numeric = [0123456789]
-numeric-space = [0123456789 ]
-loweralpha = [abcdefghijklmnopqrstuvwxyz]
-loweralpha-space = [abcdefghijklmnopqrstuvwxyz ]
-loweralpha-numeric = [abcdefghijklmnopqrstuvwxyz0123456789]
-loweralpha-numeric-space = [abcdefghijklmnopqrstuvwxyz0123456789 ]
-loweralpha-numeric-symbol14 = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=]
-loweralpha-numeric-all = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-loweralpha-numeric-symbol32-space= [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-
-mixalpha = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]
-mixalpha-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ]
-mixalpha-numeric = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
-mixalpha-numeric-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
-mixalpha-numeric-symbol14 = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
-mixalpha-numeric-all = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-mixalpha-numeric-symbol32-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-mixalpha-numeric-all-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
+++ /dev/null
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2008 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-
-// This program serves as both
-// - An example BOINC application, illustrating the use of the BOINC API
-// - A program for testing various features of BOINC
-//
-// NOTE: this file exists as both
-// boinc/apps/upper_case.C
-// and
-// boinc_samples/example_app/uc2.C
-// If you update one, please update the other!
-
-// The program converts a mixed-case file to upper case:
-// read "in", convert to upper case, write to "out"
-//
-// command line options
-// -run_slow: sleep 1 second after each character
-// -cpu_time N: use about N CPU seconds after copying files
-// -early_exit: exit(10) after 30 chars
-// -early_crash: crash after 30 chars
-//
-
-#ifdef _WIN32
-
-#else
-#include <cstdio>
-#include <cctype>
-#include <ctime>
-#include <cstring>
-#include <cstdlib>
-#include <csignal>
-#include <unistd.h>
-#endif
-
-#include <string>
-#include <fstream>
-#include <iostream>
-#include <time.h>
-#include "Public.h"
-// Rainbowcrack code
-#include "ChainWalkContext.h"
-typedef unsigned int uint32;
-//typedef unsigned __int64 uint64;
-
-
-using std::string;
-
-/*
-bool early_exit = false;
-bool early_crash = false;
-bool early_sleep = false;
-double cpu_time = 20, comp_result;
-*/
-int main(int argc, char **argv) {
- int retval;
- double fd;
-
-
- if(argc < 10)
- {
- fprintf(stderr, "Not enough parameters");
- return -1;
- }
- string sHashRoutineName, sCharsetName, sSalt, sCheckPoints;
- uint32 nRainbowChainCount, nPlainLenMin, nPlainLenMax, nRainbowTableIndex, nRainbowChainLen;
- uint64 nChainStart;
- sHashRoutineName = argv[1];
- sCharsetName = argv[2];
- nPlainLenMin = atoi(argv[3]);
- nPlainLenMax = atoi(argv[4]);
- nRainbowTableIndex = atoi(argv[5]);
- nRainbowChainLen = atoi(argv[6]);
- nRainbowChainCount = atoi(argv[7]);
-#ifdef _WIN32
-
- nChainStart = _atoi64(argv[8]);
-
-#else
- nChainStart = atoll(argv[8]);
-#endif
- sCheckPoints = argv[9];
- vector<int> vCPPositions;
- char *cp = strtok((char *)sCheckPoints.c_str(), ",");
- while(cp != NULL)
- {
- vCPPositions.push_back(atoi(cp));
- cp = strtok(NULL, ",");
- }
- if(argc == 11)
- {
- sSalt = argv[10];
- }
- //std::cout << "Starting ChainGenerator" << std::endl;
- // Setup CChainWalkContext
- //std::cout << "ChainGenerator started." << std::endl;
-
- if (!CChainWalkContext::SetHashRoutine(sHashRoutineName))
- {
- fprintf(stderr, "hash routine %s not supported\n", sHashRoutineName.c_str());
- return 1;
- }
- //std::cout << "Hash routine validated" << std::endl;
-
- if (!CChainWalkContext::SetPlainCharset(sCharsetName, nPlainLenMin, nPlainLenMax))
- {
- std::cerr << "charset " << sCharsetName << " not supported" << std::endl;
- return 2;
- }
- //std::cout << "Plain charset validated" << std::endl;
-
- if (!CChainWalkContext::SetRainbowTableIndex(nRainbowTableIndex))
- {
- std::cerr << "invalid rainbow table index " << nRainbowTableIndex << std::endl;
- return 3;
- }
- //std::cout << "Rainbowtable index validated" << std::endl;
-
- if(sHashRoutineName == "mscache")// || sHashRoutineName == "lmchall" || sHashRoutineName == "halflmchall")
- {
- // Convert username to unicode
- const char *szSalt = sSalt.c_str();
- int salt_length = strlen(szSalt);
- unsigned char cur_salt[256];
- for (int i=0; i<salt_length; i++)
- {
- cur_salt[i*2] = szSalt[i];
- cur_salt[i*2+1] = 0x00;
- }
- CChainWalkContext::SetSalt(cur_salt, salt_length*2);
- }
- else if(sHashRoutineName == "halflmchall")
- { // The salt is hardcoded into the hash routine
- // CChainWalkContext::SetSalt((unsigned char*)&salt, 8);
- }
- else if(sHashRoutineName == "oracle")
- {
- CChainWalkContext::SetSalt((unsigned char *)sSalt.c_str(), sSalt.length());
- }
- //std::cout << "Opening chain file" << std::endl;
-
-
-
- // Check existing chains
- size_t nReturn;
- CChainWalkContext cwc;
- uint64 nIndex[2];
- time_t tStart = time(NULL);
-// std::cout << "Starting to generate chains" << std::endl;
- for(int nCurrentCalculatedChains = 0; nCurrentCalculatedChains < nRainbowChainCount; nCurrentCalculatedChains++)
- {
- int cpcheck = 0;
- unsigned short checkpoint = 0;
- fd = (double)nCurrentCalculatedChains / (double)nRainbowChainCount;
- cwc.SetIndex(nChainStart++); // use a given index now!
- nIndex[0] = cwc.GetIndex();
-
- for (int nPos = 0; nPos < nRainbowChainLen - 1; nPos++)
- {
- // std::cout << "IndexToPlain()" << std::endl;
- cwc.IndexToPlain();
- // std::cout << "PlainToHash()" << std::endl;
- cwc.PlainToHash();
- // std::cout << "HashToIndex()" << std::endl;
- cwc.HashToIndex(nPos);
- if(cpcheck < vCPPositions.size() && nPos == vCPPositions[cpcheck])
- {
-
- checkpoint |= (1 << cpcheck) & (unsigned short)cwc.GetIndex() << cpcheck;
- cpcheck++;
- }
- }
- //std::cout << "GetIndex()" << std::endl;
-
- nIndex[1] = cwc.GetIndex();
- // Write chain to disk
- }
- //std::cout << "Generation completed" << std::endl;
-
-
- // main loop - read characters, convert to UC, write
- //
-
-}
-
+++ /dev/null
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2008 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-
-#include "boinc_api.h"
-
-struct UC_SHMEM {
- double update_time;
- double fraction_done;
- double cpu_time;
- BOINC_STATUS status;
- int countdown;
- // graphics app sets this to 5 repeatedly,
- // main program decrements it once/sec.
- // If it's zero, don't bother updating shmem
-};
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "distrrtgen", "distrrtgen.vcproj", "{A3BDF5F8-4D0A-4B27-B1D9-7E77CBDA86C7}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "index_calculator", "..\index_calculator\index_calculator.vcproj", "{C7A957CF-9FDC-4C72-9C3E-7C029E915D1E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rti2rto", "..\..\standalone\rti2rto\rti2rto.vcproj", "{E0FBC06A-C902-4468-A614-CBF9F591AA7C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convertrti2", "..\..\standalone\converti2\converti2.vcproj", "{066FD6F1-5990-47AD-B095-7AE0029CF5AE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsearch", "..\..\standalone\rsearch\rsearch.vcproj", "{40F12861-0A31-4E0E-8324-24F897271C8E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtperfectp", "..\..\standalone\rtperfectp\rtperfectp.vcproj", "{9725038C-A07B-40DD-87CD-3A119021A244}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcracki", "..\..\standalone\rcracki\rcracki.vcproj", "{966DA4B4-E13C-449D-9A93-303C6FEA25C4}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chain_checker", "..\chain_checker\chain_checker.vcproj", "{74C09EAC-2EA2-4548-9B61-0FEE56147DFE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A3BDF5F8-4D0A-4B27-B1D9-7E77CBDA86C7}.Debug|Win32.ActiveCfg = Debug|Win32
- {A3BDF5F8-4D0A-4B27-B1D9-7E77CBDA86C7}.Debug|Win32.Build.0 = Debug|Win32
- {A3BDF5F8-4D0A-4B27-B1D9-7E77CBDA86C7}.Release|Win32.ActiveCfg = Release|Win32
- {A3BDF5F8-4D0A-4B27-B1D9-7E77CBDA86C7}.Release|Win32.Build.0 = Release|Win32
- {C7A957CF-9FDC-4C72-9C3E-7C029E915D1E}.Debug|Win32.ActiveCfg = Debug|Win32
- {C7A957CF-9FDC-4C72-9C3E-7C029E915D1E}.Debug|Win32.Build.0 = Debug|Win32
- {C7A957CF-9FDC-4C72-9C3E-7C029E915D1E}.Release|Win32.ActiveCfg = Release|Win32
- {C7A957CF-9FDC-4C72-9C3E-7C029E915D1E}.Release|Win32.Build.0 = Release|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Debug|Win32.ActiveCfg = Debug|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Debug|Win32.Build.0 = Debug|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Release|Win32.ActiveCfg = Release|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Release|Win32.Build.0 = Release|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Debug|Win32.ActiveCfg = Debug|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Debug|Win32.Build.0 = Debug|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Release|Win32.ActiveCfg = Release|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Release|Win32.Build.0 = Release|Win32
- {40F12861-0A31-4E0E-8324-24F897271C8E}.Debug|Win32.ActiveCfg = Debug|Win32
- {40F12861-0A31-4E0E-8324-24F897271C8E}.Debug|Win32.Build.0 = Debug|Win32
- {40F12861-0A31-4E0E-8324-24F897271C8E}.Release|Win32.ActiveCfg = Release|Win32
- {40F12861-0A31-4E0E-8324-24F897271C8E}.Release|Win32.Build.0 = Release|Win32
- {9725038C-A07B-40DD-87CD-3A119021A244}.Debug|Win32.ActiveCfg = Debug|Win32
- {9725038C-A07B-40DD-87CD-3A119021A244}.Debug|Win32.Build.0 = Debug|Win32
- {9725038C-A07B-40DD-87CD-3A119021A244}.Release|Win32.ActiveCfg = Release|Win32
- {9725038C-A07B-40DD-87CD-3A119021A244}.Release|Win32.Build.0 = Release|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Debug|Win32.ActiveCfg = Debug|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Debug|Win32.Build.0 = Debug|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Release|Win32.ActiveCfg = Release|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Release|Win32.Build.0 = Release|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Debug|Win32.ActiveCfg = Debug|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Debug|Win32.Build.0 = Debug|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Release|Win32.ActiveCfg = Release|Win32
- {74C09EAC-2EA2-4548-9B61-0FEE56147DFE}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="distrrtgen"
- ProjectGUID="{A3BDF5F8-4D0A-4B27-B1D9-7E77CBDA86C7}"
- RootNamespace="distrrtgen"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../Common/rt api"
- PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib ole32.lib delayimp.lib "
- LinkIncremental="0"
- IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="/boinc/lib;/boinc/api;/boinc/zip;/boinc/client/win;/boinc/;"C:\Users\mwj\git\Common\rt api""
- PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib ..\lib_release\libboinc_staticcrt.lib ..\lib_release\libboincapi_staticcrt.lib"
- LinkIncremental="0"
- IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\Common\rt api\ChainWalkContext.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\des_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\des_setkey.c"
- >
- </File>
- <File
- RelativePath=".\distrrtgen.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\ecb_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\HashAlgorithm.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\HashRoutine.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\md4.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\md5.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\Public.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\Common\rt api\ChainWalkContext.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\des.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\des_locl.h"
- >
- </File>
- <File
- RelativePath=".\distrrtgen.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\HashAlgorithm.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\HashRoutine.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\md4.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\md5.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\podd.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\Public.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\sk.h"
- >
- </File>
- <File
- RelativePath="..\..\..\Common\rt api\spr.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
- ProjectType="Visual C++"
- Version="9,00"
- ShowAllFiles="false"
- >
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- >
- <DebugSettings
- Command="$(TargetPath)"
- WorkingDirectory=""
- CommandArguments=""
- Attach="false"
- DebuggerType="3"
- Remote="1"
- RemoteMachine="MWJ-PC"
- RemoteCommand=""
- HttpUrl=""
- PDBPath=""
- SQLDebugging=""
- Environment=""
- EnvironmentMerge="true"
- DebuggerFlavor=""
- MPIRunCommand=""
- MPIRunArguments=""
- MPIRunWorkingDirectory=""
- ApplicationCommand=""
- ApplicationArguments=""
- ShimCommand=""
- MPIAcceptMode=""
- MPIAcceptFilter=""
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- >
- <DebugSettings
- Command="$(TargetPath)"
- WorkingDirectory=""
- CommandArguments=""
- Attach="false"
- DebuggerType="3"
- Remote="1"
- RemoteMachine="MWJ-PC"
- RemoteCommand=""
- HttpUrl=""
- PDBPath=""
- SQLDebugging=""
- Environment=""
- EnvironmentMerge="true"
- DebuggerFlavor=""
- MPIRunCommand=""
- MPIRunArguments=""
- MPIRunWorkingDirectory=""
- ApplicationCommand=""
- ApplicationArguments=""
- ShimCommand=""
- MPIAcceptMode=""
- MPIAcceptFilter=""
- />
- </Configuration>
- </Configurations>
-</VisualStudioUserFile>
+++ /dev/null
-# charset configuration file for DistrRTgen v3.2 by Martin Westergaard (martinwj2005@gmail.com)
-
-byte = []
-alpha = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
-alpha-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ ]
-alpha-numeric = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
-alpha-numeric-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
-alpha-numeric-symbol14 = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
-alpha-numeric-symbol14-space= [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+= ]
-all = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-all-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-alpha-numeric-symbol32-space = [ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-lm-frt-cp437 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9b\9c\9d\9e\9f¥àáâãäæçèéêëî]
-lm-frt-cp850 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9c\9d\9f¥µ¶·½¾ÇÏÑÒÓÔÕÖ×ØÞàáâãåæèéêëíï]
-lm-frt-cp437-850 = [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~\80\8e\8f\90\92\99\9a\9b\9c\9d\9e\9f¥µ¶·½¾ÇÏÑÒÓÔÕÖ×ØÞàáâãäåæçèéêëíîï]
-
-numeric = [0123456789]
-numeric-space = [0123456789 ]
-loweralpha = [abcdefghijklmnopqrstuvwxyz]
-loweralpha-space = [abcdefghijklmnopqrstuvwxyz ]
-loweralpha-numeric = [abcdefghijklmnopqrstuvwxyz0123456789]
-loweralpha-numeric-space = [abcdefghijklmnopqrstuvwxyz0123456789 ]
-loweralpha-numeric-symbol14 = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=]
-loweralpha-numeric-all = [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-loweralpha-numeric-symbol32-space= [abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-
-mixalpha = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]
-mixalpha-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ]
-mixalpha-numeric = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
-mixalpha-numeric-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]
-mixalpha-numeric-symbol14 = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=]
-mixalpha-numeric-all = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/]
-mixalpha-numeric-symbol32-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
-mixalpha-numeric-all-space = [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ ]
+++ /dev/null
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2008 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-
-
-#ifdef _WIN32
-#include "boinc_win.h"
-#else
-#include "config.h"
-#include <cstdio>
-#include <cctype>
-#include <ctime>
-#include <cstring>
-#include <cstdlib>
-#include <csignal>
-#include <unistd.h>
-#endif
-
-#include <string>
-#include <fstream>
-
-#include "str_util.h"
-#include "util.h"
-#include "filesys.h"
-#include "boinc_api.h"
-#include "Public.h"
-// Rainbowcrack code
-#include "ChainWalkSet.h"
-#include "ChainWalkContext.h"
-typedef unsigned int uint32;
-//typedef unsigned __int64 uint64;
-
-
-using std::string;
-
-int main(int argc, char **argv) {
- int i;
- int c, nchars = 0, retval, n;
- double fsize, fd;
- char output_path[512], chkpt_path[512];
- FILE* state, *infile;
- retval = boinc_init();
- if (retval) {
- fprintf(stderr, "boinc_init returned %d\n", retval);
- exit(retval);
- }
-
-
- // get size of input file (used to compute fraction done)
- //
- //file_size(input_path, fsize);
-
- // See if there's a valid checkpoint file.
- // If so seek input file and truncate output file
- //
-
-
- if(argc < 8)
- {
- std::cerr << "Not enough parameters";
- return -1;
- }
- string sHashRoutineName, sCharsetName, sHash;
- uint32 nRainbowChainCount, nPlainLenMin, nPlainLenMax, nRainbowTableIndex, nRainbowChainLen;
- uint64 nChainStart;
- sHashRoutineName = argv[1];
- sCharsetName = argv[2];
- nPlainLenMin = atoi(argv[3]);
- nPlainLenMax = atoi(argv[4]);
- nRainbowTableIndex = atoi(argv[5]);
- nRainbowChainLen = atoi(argv[6]);
- sHash = argv[7];
- //std::cout << "Starting ChainGenerator" << std::endl;
- // Setup CChainWalkContext
- //std::cout << "ChainGenerator started." << std::endl;
-
- if (!CChainWalkContext::SetHashRoutine(sHashRoutineName))
- {
- std::cerr << "hash routine " << sHashRoutineName << " not supported" << std::endl;
- return 1;
- }
- //std::cout << "Hash routine validated" << std::endl;
-
- if (!CChainWalkContext::SetPlainCharset(sCharsetName, nPlainLenMin, nPlainLenMax))
- {
- std::cerr << "charset " << sCharsetName << " not supported" << std::endl;
- return 2;
- }
- //std::cout << "Plain charset validated" << std::endl;
-
- if (!CChainWalkContext::SetRainbowTableIndex(nRainbowTableIndex))
- {
- std::cerr << "invalid rainbow table index " << nRainbowTableIndex << std::endl;
- return 3;
- }
- //std::cout << "Rainbowtable index validated" << std::endl;
-/*
- if(sHashRoutineName == "mscache")// || sHashRoutineName == "lmchall" || sHashRoutineName == "halflmchall")
- {
- // Convert username to unicode
- const char *szSalt = sSalt.c_str();
- int salt_length = strlen(szSalt);
- unsigned char cur_salt[256];
- for (int i=0; i<salt_length; i++)
- {
- cur_salt[i*2] = szSalt[i];
- cur_salt[i*2+1] = 0x00;
- }
- CChainWalkContext::SetSalt(cur_salt, salt_length*2);
- }*/
- else if(sHashRoutineName == "halflmchall")
- { // The salt is hardcoded into the hash routine
- // CChainWalkContext::SetSalt((unsigned char*)&salt, 8);
- }
- /*
- else if(sHashRoutineName == "oracle")
- {
- CChainWalkContext::SetSalt((unsigned char *)sSalt.c_str(), sSalt.length());
- }
- */
- //std::cout << "Opening chain file" << std::endl;
-
-
- // Open file
- boinc_resolve_filename("result", output_path, sizeof(output_path));
- FILE *outfile = boinc_fopen(output_path, "wb");
-
- if (outfile == NULL)
- {
- std::cerr << "failed to create " << output_path << std::endl;
- return 4;
- }
- unsigned char TargetHash[255];
- int nHashLen = 0;
- ParseHash(sHash, TargetHash, nHashLen);
- CChainWalkSet m_cws;
- CChainWalkContext cwc;
-
- bool fNewlyGenerated;
- uint64* pStartPosIndexE = m_cws.RequestWalk(TargetHash,
- nHashLen,
- sHashRoutineName,
- sCharsetName,
- nPlainLenMin,
- nPlainLenMax,
- nRainbowTableIndex,
- nRainbowChainLen,
- fNewlyGenerated);
- int nPos;
- double nTargetChains = pow((double)nRainbowChainLen - 2, 2) / 2 - (nRainbowChainLen - 2);
- if (fNewlyGenerated)
- {
- time_t tStart = time(NULL);
- for (nPos = nRainbowChainLen - 2; nPos >= 0; nPos--)
- {
- if(time(NULL) - tStart > 1)
- {
- time(&tStart);
- double nCurrentChains = pow(((double)nRainbowChainLen - 2 - (double)nPos), 2) / 2 - (nRainbowChainLen - 2);
- double fResult = ((double)((double)(nCurrentChains) / nTargetChains));
- if(fResult < 0)
- fResult = 0;
- boinc_fraction_done(fResult);
- }
-
- cwc.SetHash(TargetHash);
- cwc.HashToIndex(nPos);
- int i;
- for (i = nPos + 1; i <= nRainbowChainLen - 2; i++)
- {
- cwc.IndexToPlain();
- cwc.PlainToHash();
- cwc.HashToIndex(i);
- }
- uint64 index = cwc.GetIndex();
- if(fwrite(&index, 8, 1, outfile) != 1)
- {
- fprintf(stderr, "unable to write to outfile");
- return 9;
- }
- //nChainWalkStep += nRainbowChainLen - 2 - nPos;
- }
-// printf("ok\n");
- double nCurrentChains = pow(((double)nRainbowChainLen - 2 - (double)nPos), 2) / 2 - (nRainbowChainLen - 2);
- double fResult = ((double)((double)(nCurrentChains) / nTargetChains));
- boinc_fraction_done(fResult);
- }
-
-
- fclose(outfile);
-
- // main loop - read characters, convert to UC, write
- //
-
- boinc_fraction_done(1);
- boinc_finish(0);
-}
-
-#ifdef _WIN32
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR Args, int WinMode) {
- LPSTR command_line;
- char* argv[100];
- int argc;
-
- command_line = GetCommandLine();
- argc = parse_command_line( command_line, argv );
- return main(argc, argv);
-}
-#endif
-
-const char *BOINC_RCSID_33ac47a071 = "$Id: upper_case.C 12135 2007-02-21 20:04:14Z davea $";
-
+++ /dev/null
-// This file is part of BOINC.
-// http://boinc.berkeley.edu
-// Copyright (C) 2008 University of California
-//
-// BOINC is free software; you can redistribute it and/or modify it
-// under the terms of the GNU Lesser General Public License
-// as published by the Free Software Foundation,
-// either version 3 of the License, or (at your option) any later version.
-//
-// BOINC is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-
-#include "boinc_api.h"
-
-struct UC_SHMEM {
- double update_time;
- double fraction_done;
- double cpu_time;
- BOINC_STATUS status;
- int countdown;
- // graphics app sets this to 5 repeatedly,
- // main program decrements it once/sec.
- // If it's zero, don't bother updating shmem
-};
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="index_calculator"
- ProjectGUID="{C7A957CF-9FDC-4C72-9C3E-7C029E915D1E}"
- RootNamespace="index_calculator"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="/boinc/lib;/boinc/api;"/boinc/zip";"/boinc/client/win";"/boinc/";../distrrtgen;"../../rt api""
- PreprocessorDefinitions="WIN32;_DEBUG;_MT;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib ole32.lib delayimp.lib ..\lib_debug\libboinc_staticcrt.lib ..\lib_debug\libboincapi_staticcrt.lib c:/openssl/lib/libeay32.lib"
- LinkIncremental="0"
- IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="/boinc/lib;/boinc/api;"/boinc/zip";"/boinc/client/win";"/boinc/";../distrrtgen;"../../rt api""
- PreprocessorDefinitions="WIN32;NDEBUG;_MT;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib ..\lib_release\libboinc_staticcrt.lib ..\lib_release\libboincapi_staticcrt.lib c:/openssl/lib/libeay32.lib"
- LinkIncremental="1"
- IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="0"
- EnableCOMDATFolding="0"
- LinkTimeCodeGeneration="0"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\rt api\ChainWalkContext.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkSet.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_setkey.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ecb_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashAlgorithm.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashRoutine.cpp"
- >
- </File>
- <File
- RelativePath=".\index_calculator.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md4.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md5.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\Public.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\rt api\ChainWalkContext.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkSet.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_locl.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashAlgorithm.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashRoutine.h"
- >
- </File>
- <File
- RelativePath=".\index_calculator.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md4.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md5.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\podd.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\Public.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\sk.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\spr.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
unsigned int nChains = nAllocatedSize / sizeof(RainbowChain);
uint64 curPrefix = 0, prefixStart = 0;
vector<IndexRow> indexes;
- while(reader->GetChainsLeft() > 0) {
+ unsigned int chainsLeft;
+ while((chainsLeft = reader->GetChainsLeft()) > 0) {
/* if (ftell(file) == nFileLen)
break;*/
+ printf("%u chains left to read\n", chainsLeft);
int nReadThisRound;
clock_t t1 = clock();
printf("reading...\n");
#ifdef _MEMORYDEBUG
printf("Grabbing %i chains from file\n", nChains);
#endif
- reader->ReadChains(nChains, pChain);
+ reader->ReadChains(nChains, pChain);
#ifdef _MEMORYDEBUG
printf("Recieved %i chains from file\n", nChains);
#endif
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "converti2", "converti2.vcxproj", "{066FD6F1-5990-47AD-B095-7AE0029CF5AE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcracki_mt", "..\rcracki_mt\rcracki_mt.vcxproj", "{966DA4B4-E13C-449D-9A93-303C6FEA25C4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Debug|Win32.ActiveCfg = Debug|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Debug|Win32.Build.0 = Debug|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Release|Win32.ActiveCfg = Release|Win32
- {066FD6F1-5990-47AD-B095-7AE0029CF5AE}.Release|Win32.Build.0 = Release|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Debug|Win32.ActiveCfg = Debug|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Debug|Win32.Build.0 = Debug|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Release|Win32.ActiveCfg = Release|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="converti2"
- ProjectGUID="{066FD6F1-5990-47AD-B095-7AE0029CF5AE}"
- RootNamespace="convertrti2"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../Common/rt api"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../Common/rt api"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\converti2.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\MemoryPool.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\Public.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\Common\rt api\MemoryPool.h"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\Public.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
}
static CMemoryPool mp(bytesForChainWalkSet, debug, maxMem);
- RainbowChainO* pChain = (RainbowChainO*)mp.Allocate(nFileLen, nAllocatedSize);
+ RainbowChainO* pChain = NULL;
+ if(doRti2Format) {
+ pChain = (RainbowChainO*)mp.Allocate(pReader->GetChainsLeft() * 16, nAllocatedSize);
+ } else {
+ pChain = (RainbowChainO*)mp.Allocate(nFileLen, nAllocatedSize);
+ }
#ifdef _WIN32
if (debug) printf("Allocated %I64u bytes, filelen %lu\n", nAllocatedSize, (unsigned long)nFileLen);
#else
if ( doRti2Format )
{
nDataRead = nAllocatedSize / 16;
- pReader->ReadChains(nDataRead, pChain);
+ if(pReader->GetChainsLeft() <= 0) // No more data
+ break;
+ pReader->ReadChains(nDataRead, (RainbowChain*)pChain);
nDataRead *= 8; // Convert from chains read to bytes
-
- if ( nDataRead == 0 ) // No more data
- break;
}
else
{
m_fTotalDiskAccessTime += fTime;
int nRainbowChainCountRead = nDataRead / 16;
-
+ if(doRti2Format) {
+ nRainbowChainCountRead = nDataRead / 8;
+ }
// Verify table chunk
if (!fVerified)
{
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcracki_mt", "rcracki_mt.vcproj", "{966DA4B4-E13C-449D-9A93-303C6FEA25C4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Debug|Win32.ActiveCfg = Debug|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Debug|Win32.Build.0 = Debug|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Release|Win32.ActiveCfg = Release|Win32
- {966DA4B4-E13C-449D-9A93-303C6FEA25C4}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="rcracki_mt"
- ProjectGUID="{966DA4B4-E13C-449D-9A93-303C6FEA25C4}"
- RootNamespace="rcracki_mt"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\rt api"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\rt api"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\rt api\BaseRTReader.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkContext.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkSet.cpp"
- >
- </File>
- <File
- RelativePath=".\CrackEngine.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_setkey.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ecb_enc.c"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashAlgorithm.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashRoutine.cpp"
- >
- </File>
- <File
- RelativePath=".\HashSet.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md4.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md5.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\MemoryPool.cpp"
- >
- </File>
- <File
- RelativePath="..\converti2\Public.cpp"
- >
- </File>
- <File
- RelativePath=".\RainbowCrack.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\RTI2Reader.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\RTIReader.cpp"
- >
- </File>
- <File
- RelativePath="..\..\rt api\RTReader.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\rt api\BaseRTReader.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkContext.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\ChainWalkSet.h"
- >
- </File>
- <File
- RelativePath=".\CrackEngine.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\des_locl.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashAlgorithm.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\HashRoutine.h"
- >
- </File>
- <File
- RelativePath=".\HashSet.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md4.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\md5.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\MemoryPool.h"
- >
- </File>
- <File
- RelativePath="..\converti2\Public.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\RTI2Reader.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\RTIReader.h"
- >
- </File>
- <File
- RelativePath="..\..\rt api\RTReader.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rti2rto", "rti2rto.vcxproj", "{E0FBC06A-C902-4468-A614-CBF9F591AA7C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Debug|Win32.ActiveCfg = Debug|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Debug|Win32.Build.0 = Debug|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Release|Win32.ActiveCfg = Release|Win32
- {E0FBC06A-C902-4468-A614-CBF9F591AA7C}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="rti2rto"
- ProjectGUID="{E0FBC06A-C902-4468-A614-CBF9F591AA7C}"
- RootNamespace="rti2rto"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../common/rt api"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../common/rt api"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\Common\rt api\BaseRTReader.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\MemoryPool.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\Public.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\RTI2Reader.cpp"
- >
- </File>
- <File
- RelativePath=".\rti2rto.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\RTIReader.cpp"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\RTReader.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\Common\rt api\BaseRTReader.h"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\MemoryPool.h"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\Public.h"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\RTI2Reader.h"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\RTIReader.h"
- >
- </File>
- <File
- RelativePath="..\..\Common\rt api\RTReader.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
class BaseRTReader
{
public:
- virtual int ReadChains(unsigned int &numChains, RainbowChain *pData) = 0;
- virtual unsigned int GetChainsLeft() = 0;
+ virtual int ReadChains(UINT4 &numChains, RainbowChain *pData) = 0;
+ virtual UINT4 GetChainsLeft() = 0;
virtual ~BaseRTReader() { };
};
public:
RTI2Reader(string Filename);
~RTI2Reader(void);
- int ReadChains(unsigned int &numChains, RainbowChain *pData);
+ int ReadChains(UINT4 &numChains, RainbowChain *pData);
unsigned int GetChainsLeft();
static RTI2Header *GetHeader() { return m_pHeader; }
};
}
if(readChains == numChains) break;
}
- if(readChains != numChains) numChains = readChains; // Update how many chains we read
+ if(readChains != numChains) {
+ numChains = readChains; // Update how many chains we read
+ }
m_chainPosition += readChains;
+ printf("Chain position is now %u\n", m_chainPosition);
return 0;
}
-unsigned int RTIReader::GetChainsLeft()
-{
- int len = GetFileLen(m_pFile) / 8 - m_chainPosition;
- return len;
+UINT4 RTIReader::GetChainsLeft()
+{
+ return (GetFileLen(m_pFile) / 8) - m_chainPosition;
}
RTIReader::~RTIReader(void)
*/
#include "des_locl.h"
-#include "spr.h"
+//#include "spr.h"
extern const DES_LONG des_SPtrans[8][64];
void des_encrypt1(DES_LONG *data, des_key_schedule ks, int enc)
#include "global.h"
+
+#define MD4_DIGEST_LENGTH 16
+
//Main function
void MD4_NEW( unsigned char * buf, int len, unsigned char * pDigest);
* [including the GNU Public Licence.]
*/
+#ifndef __SPR_H__
+#define __SPR_H__
const DES_LONG des_SPtrans[8][64]={
{
/* nibble 0 */
0x00000080L, 0x20820000L, 0x00820080L, 0x00000000L,
0x20000000L, 0x20800080L, 0x00020000L, 0x00820080L,
}};
+
+#endif
\ No newline at end of file