2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
file,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlmap";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.8.9";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-0ARkSUzmrqyRSPl3EXU7NzcnaWf+Zbt4zQZ626gvfEs=";
|
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
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "sqlmap" ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
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 ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sqlmap";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|