2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, file
|
2021-03-23 19:22:30 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlmap";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "1.5.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-HTayAlXehm3Azmbi+ar/Vav5bPYmGu9gflzZCwWZihw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace sqlmap/thirdparty/magic/magic.py --replace "ctypes.util.find_library('magic')" \
|
|
|
|
"'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
|
|
|
|
|
|
|
# the check for the last update date does not work in Nix,
|
|
|
|
# since the timestamp of the all files in the nix store is reset to the unix epoch
|
|
|
|
echo 'LAST_UPDATE_NAGGING_DAYS = float("inf")' >> sqlmap/lib/core/settings.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
pythonImportsCheck = [ "sqlmap" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatic SQL injection and database takeover tool";
|
2021-03-23 19:22:30 +00:00
|
|
|
homepage = "http://sqlmap.org";
|
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ bennofs ];
|
|
|
|
};
|
|
|
|
}
|