1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-23 00:28:11 +00:00

Some cleanups

This commit is contained in:
Jens Steube 2016-02-04 15:47:52 +01:00
parent 4d2be9073e
commit 2381af313d
18 changed files with 33 additions and 136 deletions

View File

@ -17,9 +17,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
static void ripemd160_transform (const u32 w[16], u32 dgst[5]) static void ripemd160_transform (const u32 w[16], u32 dgst[5])
{ {

View File

@ -17,9 +17,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
static void ripemd160_transform (const u32 w[16], u32 dgst[5]) static void ripemd160_transform (const u32 w[16], u32 dgst[5])
{ {

View File

@ -17,9 +17,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
static void ripemd160_transform (const u32 w[16], u32 dgst[5]) static void ripemd160_transform (const u32 w[16], u32 dgst[5])
{ {

View File

@ -17,9 +17,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
__constant u64 k_sha512[80] = __constant u64 k_sha512[80] =
{ {

View File

@ -17,9 +17,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
__constant u64 k_sha512[80] = __constant u64 k_sha512[80] =
{ {

View File

@ -17,9 +17,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
__constant u64 k_sha512[80] = __constant u64 k_sha512[80] =
{ {

View File

@ -19,9 +19,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
#define R 10 #define R 10

View File

@ -19,9 +19,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
#define R 10 #define R 10

View File

@ -19,9 +19,9 @@
#include "OpenCL/types_ocl.c" #include "OpenCL/types_ocl.c"
#include "OpenCL/common.c" #include "OpenCL/common.c"
#include "OpenCL/kernel_aes256_amd.c" #include "OpenCL/kernel_aes256.c"
#include "OpenCL/kernel_twofish256_amd.c" #include "OpenCL/kernel_twofish256.c"
#include "OpenCL/kernel_serpent256_amd.c" #include "OpenCL/kernel_serpent256.c"
#define R 10 #define R 10

View File

@ -1,15 +0,0 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef EXT_SMI_H
#define EXT_SMI_H
#ifdef HAVE_HWMON
#include <common.h>
#endif // HAVE_HWMON
#endif

View File

@ -1,20 +0,0 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef EXT_SMI_H
#define EXT_SMI_H
#ifdef HAVE_HWMON
#include <common.h>
#define SMI_OK 0
#define SMI_NOBIN 1
int hc_nvidia_smi (int dev, int *temperature, int *gpu);
#endif // HAVE_HWMON
#endif

View File

@ -100,10 +100,7 @@
* temperature management * temperature management
*/ */
#ifdef OSX #if _WIN
#include <ext_smi.h>
#include <ext_dummy.h>
#elif _WIN
#include <ext_ADL.h> #include <ext_ADL.h>
#include <ext_nvapi.h> #include <ext_nvapi.h>
#else #else

View File

@ -1 +0,0 @@
#include <ext_dummy.h>

View File

@ -1,68 +0,0 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#include <ext_smi.h>
int hc_nvidia_smi (int dev, int *temperature, int *gpu)
{
char cmd[256] = { 0 };
snprintf (cmd, sizeof (cmd) - 1, "nvidia-smi -q -g %d", dev);
FILE *fp = popen (cmd, "r");
if (fp == NULL)
{
log_info ("WARN: %s\n", "nvidia-smi is missing!");
return SMI_NOBIN;
}
int temp_found = 0;
int util_found = 0;
char token[32];
while (fscanf (fp, " %31s ", token) == 1)
{
if (strcmp (token, "Temperature") == 0)
{
if (fscanf (fp, " : %4s C", token) == 1) *temperature = atoi (token);
temp_found = 1;
}
if (temp_found == 1)
{
if ((strcmp (token, "GPU") == 0) || (strcmp (token, "Gpu") == 0))
{
if (fscanf (fp, " : %4s C", token) == 1) *temperature = atoi (token);
temp_found = 0;
}
}
if (strcmp (token, "Utilization") == 0)
{
util_found = 1;
temp_found = 0;
}
if (util_found == 1)
{
if ((strcmp (token, "GPU") == 0) || (strcmp (token, "Gpu") == 0))
{
if (fscanf (fp, " : %2s%%", token) == 1) *gpu = atoi (token);
util_found = 0;
}
}
}
pclose (fp);
return (SMI_OK);
}

View File

@ -12,6 +12,7 @@ rm -rf $OUT
rm -rf $OUT.7z rm -rf $OUT.7z
mkdir -p $OUT mkdir -p $OUT
mkdir -p $OUT/include
cp $IN/oclHashcat??.exe $OUT/ cp $IN/oclHashcat??.exe $OUT/
cp $IN/oclHashcat??.bin $OUT/ cp $IN/oclHashcat??.bin $OUT/
@ -26,7 +27,10 @@ cp $IN/example.dict $OUT/
cp $IN/example[0123456789]*.hash $OUT/ cp $IN/example[0123456789]*.hash $OUT/
cp $IN/example[0123456789]*.cmd $OUT/ cp $IN/example[0123456789]*.cmd $OUT/
cp -r $IN/include $OUT/ cp -r $IN/include/constants.h $OUT/include
cp -r $IN/include/kernel_functions.c $OUT/include
cp -r $IN/include/kernel_vendor.h $OUT/include
cp -r $IN/include/rp_kernel.h $OUT/include
cp -r $IN/OpenCL $OUT/ cp -r $IN/OpenCL $OUT/
# since for the binary distribution we still use .bin, we need to rewrite the commands # since for the binary distribution we still use .bin, we need to rewrite the commands