git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #109667 from fabaff/censys
commit6898046c315a593510c379e0cceffc533032c5df authorSandro <sandro.jaeckel@gmail.com> dateTue 19 Jan 2021, 12:32 (6 years ago) parentf6977480bd552d
3 files changed+79−6
pkgs/development/python-modules/censys/default.nix+50 pkgs/tools/security/theharvester/default.nix+27−6 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/censys/default.nixnew file+50
@@ -0,0 +1,50 @@
1+{ lib
2+, backoff
3+, buildPythonPackage
4+, fetchFromGitHub
5+, pytestCheckHook
6+, requests
7+, pytestcov
8+, requests-mock
9+, parameterized
10+}:
11+
12+buildPythonPackage rec {
13+ pname = "censys";
14+ version = "1.1.0";
15+
16+ src = fetchFromGitHub {
17+ owner = "censys";
18+ repo = "censys-python";
19+ rev = "v${version}";
20+ sha256 = "0vvd13g48i4alnqil98zc09zi5kv6l2s3kdfyg5syjxvq4lfd476";
21+ };
22+
23+ propagatedBuildInputs = [
24+ backoff
25+ requests
26+ ];
27+
28+ checkInputs = [
29+ pytestcov
30+ pytestCheckHook
31+ requests-mock
32+ parameterized
33+ ];
34+
35+ # The tests want to write a configuration file
36+ preCheck = ''
37+ export HOME=$(mktemp -d)
38+ mkdir -p $HOME
39+ '';
40+ # All other tests require an API key
41+ pytestFlagsArray = [ "tests/test_config.py" ];
42+ pythonImportsCheck = [ "censys" ];
43+
44+ meta = with lib; {
45+ description = "Python API wrapper for the Censys Search Engine (censys.io)";
46+ homepage = "https://github.com/censys/censys-python";
47+ license = with licenses; [ asl20 ];
48+ maintainers = [ maintainers.fab ];
49+ };
50+}
pkgs/tools/security/theharvester/default.nix+27−6
@@ -1,8 +1,11 @@
1−{ lib, fetchFromGitHub, python3 }:
1+{ lib
2+, fetchFromGitHub
3+, python3
4+}:
25
36python3.pkgs.buildPythonApplication rec {
47 pname = "theHarvester";
5− version = "3.1";
8+ version = "3.2.2";
69
710 src = fetchFromGitHub {
811 owner = "laramies";
@@ -11,9 +14,27 @@ python3.pkgs.buildPythonApplication rec {
1114 sha256 = "0lxzxfa9wbzim50d2jmd27i57szd0grm1dfayhnym86jn01qpvn3";
1215 };
1316
14− propagatedBuildInputs = with python3.pkgs; [
15− aiodns beautifulsoup4 dns grequests netaddr
16− plotly pyyaml requests retrying shodan texttable
17+ propagatedBuildInputs = with python3.pkgs; [
18+ aiodns
19+ aiohttp
20+ aiomultiprocess
21+ aiosqlite
22+ beautifulsoup4
23+ censys
24+ certifi
25+ dns
26+ gevent
27+ grequests
28+ lxml
29+ netaddr
30+ plotly
31+ pyppeteer
32+ pyyaml
33+ requests
34+ retrying
35+ shodan
36+ texttable
37+ uvloop
1738 ];
1839
1940 checkInputs = [ python3.pkgs.pytest ];
@@ -31,6 +52,6 @@ python3.pkgs.buildPythonApplication rec {
3152 '';
3253 homepage = "https://github.com/laramies/theHarvester";
3354 maintainers = with maintainers; [ c0bw3b treemo ];
34− license = licenses.gpl2;
55+ license = licenses.gpl2Only;
3556 };
3657}
pkgs/top-level/python-packages.nix+2
@@ -1175,6 +1175,8 @@ in {
11751175
11761176 cement = callPackage ../development/python-modules/cement { };
11771177
1178+ censys = callPackage ../development/python-modules/censys { };
1179+
11781180 connect-box = callPackage ../development/python-modules/connect_box { };
11791181
11801182 cerberus = callPackage ../development/python-modules/cerberus { };