Merging against master - updating smokingpig, rebase was going to be messy
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fcrackzip-${version}";
|
||||
version = "1.0";
|
||||
src = fetchurl {
|
||||
url = "http://oldhome.schmorp.de/marc/data/${name}.tar.gz";
|
||||
sha256 = "0l1qsk949vnz18k4vjf3ppq8p497966x4c7f2yx18x8pk35whn2a";
|
||||
};
|
||||
|
||||
# 'fcrackzip --use-unzip' cannot deal with file names containing a single quote
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430387
|
||||
patches = [ ./fcrackzip_forkexec.patch ];
|
||||
|
||||
# Do not clash with unizp/zipinfo
|
||||
postInstall = "mv $out/bin/zipinfo $out/bin/fcrackzip-zipinfo";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "zip password cracker, similar to fzc, zipcrack and others";
|
||||
homepage = http://oldhome.schmorp.de/marc/fcrackzip.html;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ nico202 ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
--- origin/main.c 2016-12-12 12:53:38.344285376 +0100
|
||||
+++ main.c 2016-12-12 13:01:41.134548824 +0100
|
||||
@@ -26,11 +26,13 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef USE_UNIX_REDIRECTION
|
||||
-#define DEVNULL ">/dev/null 2>&1"
|
||||
+#define DEVNULL "/dev/null"
|
||||
#else
|
||||
-#define DEVNULL ">NUL 2>&1"
|
||||
+#define DEVNULL "NUL"
|
||||
#endif
|
||||
|
||||
+#include <errno.h>
|
||||
+
|
||||
#include "crack.h"
|
||||
|
||||
int use_unzip;
|
||||
@@ -47,21 +49,77 @@
|
||||
int REGPARAM
|
||||
check_unzip (const char *pw)
|
||||
{
|
||||
- char buff[1024];
|
||||
- int status;
|
||||
+pid_t cpid;
|
||||
+cpid = fork ();
|
||||
+if (cpid == -1)
|
||||
+ {
|
||||
+ perror ("fork");
|
||||
+ exit (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+if (cpid == 0)
|
||||
+ {
|
||||
+ // Redirect STDERR/STDOUT to /dev/null
|
||||
+ int oldfd_stderr, oldfd_stdout;
|
||||
+ oldfd_stdout = dup (fileno (stdout));
|
||||
+ if (oldfd_stdout == -1)
|
||||
+ {
|
||||
+ perror ("dup for stdout");
|
||||
+ _exit (127);
|
||||
+ }
|
||||
+ oldfd_stderr = dup (fileno (stderr));
|
||||
+ if (oldfd_stderr == -1)
|
||||
+ {
|
||||
+ perror ("dup for stderr");
|
||||
+ _exit (127);
|
||||
+ }
|
||||
+ if (freopen (DEVNULL, "w", stdout) == NULL)
|
||||
+ {
|
||||
+ perror ("freopen " DEVNULL " for stdout");
|
||||
+ _exit (127);
|
||||
+ }
|
||||
+ if (freopen (DEVNULL, "w", stderr) == NULL)
|
||||
+ {
|
||||
+ perror ("freopen " DEVNULL " for stderr");
|
||||
+ _exit (127);
|
||||
+ }
|
||||
+ execlp ("unzip", "unzip", "-qqtP", pw, file_path[0], NULL);
|
||||
+
|
||||
+ // When execlp failed.
|
||||
+ // Restores the stderr/stdout redirection to print an error.
|
||||
+ int errno_saved = errno;
|
||||
+ dup2 (oldfd_stderr, fileno (stderr));
|
||||
+ dup2 (oldfd_stdout, fileno (stdout));
|
||||
+ close (oldfd_stderr);
|
||||
+ close (oldfd_stdout);
|
||||
+ errno = errno_saved;
|
||||
+ perror ("execlp for unzip");
|
||||
+ _exit (127); // Returns 127 on error as system(3) does
|
||||
+ }
|
||||
|
||||
- sprintf (buff, "unzip -qqtP \"%s\" %s " DEVNULL, pw, file_path[0]);
|
||||
- status = system (buff);
|
||||
-
|
||||
-#undef REDIR
|
||||
+ int status;
|
||||
|
||||
- if (status == EXIT_SUCCESS)
|
||||
+ if (waitpid (cpid, &status, 0) == -1)
|
||||
{
|
||||
- printf("\n\nPASSWORD FOUND!!!!: pw == %s\n", pw);
|
||||
+ perror ("waitpid");
|
||||
+ exit (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ // The child process does not terminated normally, OR returns the exit status 127.
|
||||
+ if (!WIFEXITED (status)
|
||||
+ || (WIFEXITED (status) && (WEXITSTATUS (status) == 127)))
|
||||
+ {
|
||||
+ fprintf (stderr, "Executing unzip failed.\n");
|
||||
+ exit (EXIT_FAILURE);
|
||||
+ }
|
||||
+// unzip exited normally with the exit status 0 then...
|
||||
+ if (WIFEXITED (status) && (WEXITSTATUS (status) == EXIT_SUCCESS))
|
||||
+ {
|
||||
+ printf ("\n\nPASSWORD FOUND!!!!: pw == %s\n", pw);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
- return !status;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* misc. callbacks. */
|
||||
@@ -15,11 +15,11 @@ assert guiSupport -> pinentry != null;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gnupg-${version}";
|
||||
|
||||
version = "2.1.17";
|
||||
version = "2.1.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnupg/gnupg/${name}.tar.bz2";
|
||||
sha256 = "1js308b46ifx1gim0c9nivr5yxhans7iq1yvkf7zl2928gdm9p65";
|
||||
sha256 = "157rrv3ly9j2k0acz43nhiba5hfl6h7048jvj55wwqjmgsmnyk6h";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, makeWrapper, opencl-headers, opencl-icd }:
|
||||
{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${opencl-icd}/lib
|
||||
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pcsclite-${version}";
|
||||
version = "1.8.17";
|
||||
version = "1.8.20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://alioth.debian.org/frs/download.php/file/4173/pcsc-lite-${version}.tar.bz2";
|
||||
sha256 = "0vq2291kvnbg8czlakqahxrdhsvp74fqy3z75lfjlkq2aj36yayp";
|
||||
# This URL changes in unpredictable ways, so it is not sensicle
|
||||
# to put a version variable in there.
|
||||
url = "https://alioth.debian.org/frs/download.php/file/4203/pcsc-lite-1.8.20.tar.bz2";
|
||||
sha256 = "1ckb0jf4n585a4j26va3jm2nrv3c1y38974514f8qy3c04a02zgc";
|
||||
};
|
||||
|
||||
patches = [ ./no-dropdir-literals.patch ];
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
{stdenv, fetchurl, gnupg, perl, automake111x, autoconf}:
|
||||
{ stdenv, fetchurl, makeWrapper, autoconf, automake
|
||||
, gnupg, perl, python, libmd, qprint, coreutils, gnused, glibc, gnupg1compat
|
||||
, perlPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.2";
|
||||
version = "2.5";
|
||||
basename = "signing-party";
|
||||
name = "${basename}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/s/${basename}/${basename}_${version}.orig.tar.gz";
|
||||
sha256 = "13qncdyadw1cnslc2xss9s2rpkalm7rz572b23p7mqcdqp30cpdd";
|
||||
sha256 = "1y2bxk01qiwaqaily0s6zi10ssv7l35vksib6fxzyl76pp693nv2";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
patches = [ ./gpgwrap_makefile.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace gpg-mailkeys/gpg-mailkeys --replace "/usr/sbin/sendmail" "sendmail"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace sig2dot/Makefile --replace "\$(DESTDIR)/usr" "$out"
|
||||
substituteInPlace gpgsigs/Makefile --replace "\$(DESTDIR)/usr" "$out"
|
||||
@@ -19,19 +28,46 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace keyanalyze/Makefile --replace "\$(DESTDIR)/usr" "$out"
|
||||
'';
|
||||
|
||||
# - perl is required for its pod2man (used in caff)
|
||||
buildInputs = [ automake111x autoconf perl gnupg ];
|
||||
|
||||
patches = [ ./gpgwrap_makefile.patch ];
|
||||
nativeBuildInputs = [ autoconf automake makeWrapper ];
|
||||
buildInputs = [ gnupg perl python libmd ] ++
|
||||
(with perlPackages; [ GnuPGInterface TextTemplate MIMEtools NetIDNEncode MailTools ]);
|
||||
|
||||
installFlags = [ "DESTDIR=\${out}" ];
|
||||
|
||||
doCheck = false; # no check rule
|
||||
postInstall = ''
|
||||
install -m 755 \
|
||||
caff/caff caff/pgp-clean caff/pgp-fixkey \
|
||||
gpglist/gpglist \
|
||||
gpgparticipants/gpgparticipants \
|
||||
gpgparticipants/gpgparticipants-prefill \
|
||||
gpgsigs/gpgsigs \
|
||||
gpg-key2ps/gpg-key2ps \
|
||||
gpg-mailkeys/gpg-mailkeys \
|
||||
keyart/keyart \
|
||||
$out/bin
|
||||
|
||||
install -m 644 \
|
||||
caff/caff.1 caff/pgp-clean.1 caff/pgp-fixkey.1 \
|
||||
gpglist/gpglist.1 \
|
||||
gpgparticipants/gpgparticipants-prefill.1 \
|
||||
gpgparticipants/gpgparticipants.1 \
|
||||
gpgsigs/gpgsigs.1 \
|
||||
gpg-key2ps/gpg-key2ps.1 \
|
||||
gpg-mailkeys/gpg-mailkeys.1 \
|
||||
$out/share/man/man1
|
||||
|
||||
wrapProgram $out/bin/caff --prefix PERL5LIB ":" "$PERL5LIB" \
|
||||
--prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1compat ]}"
|
||||
wrapProgram $out/bin/gpg-mailkeys --prefix PATH ":" "${stdenv.lib.makeBinPath [ qprint coreutils gnused glibc gnupg1compat ]}"
|
||||
'';
|
||||
|
||||
doCheck = false; # no tests
|
||||
|
||||
meta = {
|
||||
description = "A collection for all kinds of pgp related things, including signing scripts, party preparation scripts etc";
|
||||
homepage = http://pgp-tools.alioth.debian.org;
|
||||
platforms = gnupg.meta.platforms;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = with stdenv.lib.maintainers; [ fpletz ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tor-0.2.8.12";
|
||||
name = "tor-0.2.9.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://archive.torproject.org/tor-package-archive/${name}.tar.gz";
|
||||
sha256 = "1bsagy4gcf6hgq04q949hv45ljb36j3ylxxn22cwxy4whgr4hmxk";
|
||||
url = "https://dist.torproject.org/${name}.tar.gz";
|
||||
sha256 = "0hqdk5p6dw4bpn7c8gmhyi8jjkhc37112pfw5nx4gl0g4lmmscik";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
Reference in New Issue
Block a user