2017-05-07 19:01:36 +01:00
|
|
|
{ stdenv, fetchurl, libpcap, sqlite, makeWrapper }:
|
2013-04-26 14:06:20 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-05-07 19:01:36 +01:00
|
|
|
version = "1.4";
|
|
|
|
name = "reaver-wps-${version}";
|
|
|
|
confdir = "/var/db/${name}"; # the sqlite database is at "${confdir}/reaver/reaver.db"
|
2013-04-26 14:06:20 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-05-07 19:01:36 +01:00
|
|
|
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/reaver-wps/reaver-${version}.tar.gz";
|
2013-04-26 14:06:20 +01:00
|
|
|
sha256 = "0bdjai4p8xbsw8zdkkk43rgsif79x0nyx4djpyv0mzh59850blxd";
|
|
|
|
};
|
|
|
|
|
2017-05-07 19:01:36 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2013-04-26 14:06:20 +01:00
|
|
|
buildInputs = [ libpcap sqlite ];
|
|
|
|
|
2017-11-02 12:54:20 +00:00
|
|
|
|
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=$(echo */src)
|
|
|
|
'';
|
2017-05-07 19:01:36 +01:00
|
|
|
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--sysconfdir=${confdir}" ];
|
2017-05-07 19:01:36 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,etc}
|
|
|
|
cp reaver.db $out/etc/
|
|
|
|
cp reaver wash $out/bin/
|
2013-04-26 14:06:20 +01:00
|
|
|
|
2017-05-07 19:01:36 +01:00
|
|
|
wrapProgram $out/bin/reaver --run "[ -s ${confdir}/reaver/reaver.db ] || install -D $out/etc/reaver.db ${confdir}/reaver/reaver.db"
|
|
|
|
wrapProgram $out/bin/wash --run "[ -s ${confdir}/reaver/reaver.db ] || install -D $out/etc/reaver.db ${confdir}/reaver/reaver.db"
|
2013-04-26 14:06:20 +01:00
|
|
|
'';
|
|
|
|
|
2017-05-07 19:01:36 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-04-26 14:06:20 +01:00
|
|
|
description = "Brute force attack against Wifi Protected Setup";
|
2017-10-27 00:44:19 +01:00
|
|
|
homepage = https://code.google.com/archive/p/reaver-wps/;
|
2017-05-07 19:01:36 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ nico202 volth ];
|
2013-04-26 14:06:20 +01:00
|
|
|
};
|
|
|
|
}
|