2021-12-14 16:22:32 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "log4shell-detector";
|
2021-12-17 08:05:09 +00:00
|
|
|
version = "unstable-2021-12-16";
|
|
|
|
format = "setuptools";
|
2021-12-14 16:22:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Neo23x0";
|
|
|
|
repo = pname;
|
2021-12-17 08:05:09 +00:00
|
|
|
rev = "622b88e7ea36819da23ce6ac090785cd6cca77f9";
|
|
|
|
sha256 = "sha256-N81x9hq473LfM+bQIQLWizCAsVc/pzyB84PV7/N5jk4=";
|
2021-12-14 16:22:32 +00:00
|
|
|
};
|
|
|
|
|
2021-12-17 08:05:09 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
zstandard
|
|
|
|
];
|
|
|
|
|
2021-12-14 16:22:32 +00:00
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -vD ${pname}.py $out/bin/${pname}
|
2021-12-17 08:05:09 +00:00
|
|
|
install -vd $out/${python3.sitePackages}/
|
|
|
|
cp -R Log4ShellDetector $out/${python3.sitePackages}
|
2021-12-14 16:22:32 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Detector for Log4Shell exploitation attempts";
|
|
|
|
homepage = "https://github.com/Neo23x0/log4shell-detector";
|
2021-12-17 08:05:09 +00:00
|
|
|
license = licenses.mit;
|
2021-12-14 16:22:32 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|