diff --git a/pkgs/development/python-modules/censys/default.nix b/pkgs/development/python-modules/censys/default.nix new file mode 100644 index 00000000000..561d9651fed --- /dev/null +++ b/pkgs/development/python-modules/censys/default.nix @@ -0,0 +1,50 @@ +{ lib +, backoff +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, requests +, pytestcov +, requests-mock +, parameterized +}: + +buildPythonPackage rec { + pname = "censys"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "censys"; + repo = "censys-python"; + rev = "v${version}"; + sha256 = "0vvd13g48i4alnqil98zc09zi5kv6l2s3kdfyg5syjxvq4lfd476"; + }; + + propagatedBuildInputs = [ + backoff + requests + ]; + + checkInputs = [ + pytestcov + pytestCheckHook + requests-mock + parameterized + ]; + + # The tests want to write a configuration file + preCheck = '' + export HOME=$(mktemp -d) + mkdir -p $HOME + ''; + # All other tests require an API key + pytestFlagsArray = [ "tests/test_config.py" ]; + pythonImportsCheck = [ "censys" ]; + + meta = with lib; { + description = "Python API wrapper for the Censys Search Engine (censys.io)"; + homepage = "https://github.com/censys/censys-python"; + license = with licenses; [ asl20 ]; + maintainers = [ maintainers.fab ]; + }; +} diff --git a/pkgs/tools/security/theharvester/default.nix b/pkgs/tools/security/theharvester/default.nix index 4153ddafbf4..7a03649859e 100644 --- a/pkgs/tools/security/theharvester/default.nix +++ b/pkgs/tools/security/theharvester/default.nix @@ -1,8 +1,11 @@ -{ lib, fetchFromGitHub, python3 }: +{ lib +, fetchFromGitHub +, python3 +}: python3.pkgs.buildPythonApplication rec { pname = "theHarvester"; - version = "3.1"; + version = "3.2.2"; src = fetchFromGitHub { owner = "laramies"; @@ -11,9 +14,27 @@ python3.pkgs.buildPythonApplication rec { sha256 = "0lxzxfa9wbzim50d2jmd27i57szd0grm1dfayhnym86jn01qpvn3"; }; - propagatedBuildInputs = with python3.pkgs; [ - aiodns beautifulsoup4 dns grequests netaddr - plotly pyyaml requests retrying shodan texttable + propagatedBuildInputs = with python3.pkgs; [ + aiodns + aiohttp + aiomultiprocess + aiosqlite + beautifulsoup4 + censys + certifi + dns + gevent + grequests + lxml + netaddr + plotly + pyppeteer + pyyaml + requests + retrying + shodan + texttable + uvloop ]; checkInputs = [ python3.pkgs.pytest ]; @@ -31,6 +52,6 @@ python3.pkgs.buildPythonApplication rec { ''; homepage = "https://github.com/laramies/theHarvester"; maintainers = with maintainers; [ c0bw3b treemo ]; - license = licenses.gpl2; + license = licenses.gpl2Only; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9dccc052333..17a9808f66c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1175,6 +1175,8 @@ in { cement = callPackage ../development/python-modules/cement { }; + censys = callPackage ../development/python-modules/censys { }; + connect-box = callPackage ../development/python-modules/connect_box { }; cerberus = callPackage ../development/python-modules/cerberus { };