hashcat-3.40.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils pax-utils multilib
  5. DESCRIPTION="World's fastest and most advanced password recovery utility"
  6. HOMEPAGE="https://github.com/hashcat/hashcat"
  7. SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~x86 ~amd64"
  11. IUSE="custom-cflags video_cards_nvidia video_cards_fglrx"
  12. DEPEND="virtual/opencl"
  13. RDEPEND="${DEPEND}"
  14. src_prepare() {
  15. #do not strip
  16. sed -i "/LFLAGS += -s/d" src/Makefile
  17. #do not add random CFLAGS
  18. sed -i "s/-O2//" src/Makefile || die
  19. export PREFIX=/usr
  20. export LIBRARY_FOLDER="/usr/$(get_libdir)"
  21. eapply_user
  22. }
  23. src_compile() {
  24. default
  25. pax-mark -mr hashcat
  26. }
  27. src_test() {
  28. if use video_cards_nvidia; then
  29. addwrite /dev/nvidia0
  30. addwrite /dev/nvidiactl
  31. addwrite /dev/nvidia-uvm
  32. if [ ! -w /dev/nvidia0 ]; then
  33. einfo "To run these tests, portage likely must be in the video group."
  34. einfo "Please run \"gpasswd -a portage video\" if the tests will fail"
  35. fi
  36. elif use vidia_cards_fglrx; then
  37. addwrite /dev/ati
  38. fi
  39. #this always exits with 255 despite success
  40. #./hashcat -b -m 2500 || die "Test failed"
  41. ./hashcat -a 3 -m 1500 nQCk49SiErOgk
  42. }