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";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-X8FpGnrF0aHuf3yIzRrxoNAu77UASTL36CQpcuxESV8=";
|
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";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://sqlmap.org";
|
2022-02-20 05:27:41 +00:00
|
|
|
changelog = "https://github.com/sqlmapproject/sqlmap/releases/tag/${version}";
|
2021-03-23 19:22:30 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ bennofs ];
|
|
|
|
};
|
|
|
|
}
|