hashcat: add broken package

The hope is that someone adds OpenCL for NetBSD to fix this.

TODO:
Does not build on NetBSD due to missing OpenCL support.

DESCR:
hashcat is the world's fastest and most advanced password recovery
utility, supporting five unique modes of attack for over 160
highly-optimized hashing algorithms. hashcat currently supports
CPU's, GPU's other hardware-accelerators on Linux, Windows and OSX,
and has facilities to help enable distributed password cracking.
This commit is contained in:
Thomas Klausner 2016-07-02 11:15:22 +02:00
parent 6e5c21602b
commit 72caf4bf3b
7 changed files with 85 additions and 0 deletions

View file

@ -1060,6 +1060,7 @@ SUBDIR+= haproxy-devel
SUBDIR+= haproxy15
SUBDIR+= hasciicam
SUBDIR+= haserl
SUBDIR+= hashcat
SUBDIR+= haskell-mode
SUBDIR+= hasktags
SUBDIR+= hawk
@ -1724,6 +1725,7 @@ SUBDIR+= ltp
SUBDIR+= ltrace
SUBDIR+= lua-MessagePack
SUBDIR+= lua-lbn
SUBDIR+= lua-mpack
SUBDIR+= lua-pgsql
SUBDIR+= lucene
SUBDIR+= lugaru
@ -2020,6 +2022,7 @@ SUBDIR+= nss-pam-ldapd
SUBDIR+= ntimed-git
SUBDIR+= nuget-git
SUBDIR+= nullpop
SUBDIR+= num-utils
SUBDIR+= numactl
SUBDIR+= nuppelvideo
SUBDIR+= nuttcp

5
hashcat/DESCR Normal file
View file

@ -0,0 +1,5 @@
hashcat is the world's fastest and most advanced password recovery
utility, supporting five unique modes of attack for over 160
highly-optimized hashing algorithms. hashcat currently supports
CPU's, GPU's other hardware-accelerators on Linux, Windows and OSX,
and has facilities to help enable distributed password cracking.

16
hashcat/Makefile Normal file
View file

@ -0,0 +1,16 @@
# $NetBSD$
DISTNAME= hashcat-3.00
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_GITHUB:=hashcat/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/hashcat/hashcat/
COMMENT= World's fastest and most advanced password recovery utility
LICENSE= mit
USE_TOOLS+= gmake
BUILD_TARGET= hashcat
.include "../../mk/bsd.pkg.mk"

1
hashcat/PLIST Normal file
View file

@ -0,0 +1 @@
@comment $NetBSD$

1
hashcat/TODO Normal file
View file

@ -0,0 +1 @@
Does not build on NetBSD due to missing OpenCL support.

7
hashcat/distinfo Normal file
View file

@ -0,0 +1,7 @@
$NetBSD$
SHA1 (hashcat-3.00.tar.gz) = 3f882ab112b99da22fca59cd3fa4420376f3da86
RMD160 (hashcat-3.00.tar.gz) = 98f09aa0e68fdccf6527a11221fe649676fdb8eb
SHA512 (hashcat-3.00.tar.gz) = cdaf00830a1f4b52b008c5c6499cd6246eb328a1711be1446ea7b8b3d6ad9afeb9f3626cf9cef58a04b4a414d10e09e5a8429bc47684a9d6dbf511effbc2eedb
Size (hashcat-3.00.tar.gz) = 4068649 bytes
SHA1 (patch-src_Makefile) = aa29b2d92f57d61559a32ea51aee0a5cf06db2f1

View file

@ -0,0 +1,52 @@
$NetBSD$
Add minimal NetBSD support.
--- src/Makefile.orig 2016-06-28 09:47:32.000000000 +0000
+++ src/Makefile
@@ -17,7 +17,7 @@ UNAME := $(shell unam
# we need to strip the windows version number to be able to build hashcat on cygwin hosts
UNAME := $(patsubst CYGWIN_NT-%,CYGWIN_NT-,$(UNAME))
-ifeq (,$(filter $(UNAME),Linux Darwin CYGWIN_NT-))
+ifeq (,$(filter $(UNAME),Linux Darwin NetBSD CYGWIN_NT-))
$(error "! Your Operating System ($(UNAME)) is not supported by $(PROG_NAME) Makefile")
endif
@@ -87,7 +87,7 @@ VERSION_TAG := $(shell test
## Compiler flags
##
-CFLAGS := -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/
+CFLAGS := -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/ -I../include
ifndef DEBUG
CFLAGS += -O2
@@ -122,6 +122,16 @@ LFLAGS_NATIVE := -lpthread -l
CFLAGS_NATIVE += -DHAVE_HWMON
endif # linux
+ifeq ($(UNAME),NetBSD)
+CFLAGS_NATIVE := -D_POSIX
+ifndef DEBUG
+CFLAGS_NATIVE += -s
+endif
+CFLAGS_NATIVE += $(CFLAGS)
+LFLAGS_NATIVE := -lpthread
+CFLAGS_NATIVE += -DHAVE_HWMON
+endif # linux
+
##
## Cross compilation target
##
@@ -150,9 +160,9 @@ LFLAGS_CROSS_WIN := -lpsapi
## Objects
##
+ifeq ($(UNAME),Linux)
NATIVE_OBJS := obj/ext_OpenCL.NATIVE.o obj/shared.NATIVE.o obj/rp_kernel_on_cpu.NATIVE.o
-ifeq ($(UNAME),Linux)
NATIVE_OBJS += obj/ext_ADL.NATIVE.o
NATIVE_OBJS += obj/ext_nvapi.NATIVE.o
NATIVE_OBJS += obj/ext_nvml.NATIVE.o