1{ lib
2, fetchFromGitHub
3, python3
4}:
5
6python3.pkgs.buildPythonApplication rec {
7 pname = "routersploit";
8 version = "unstable-2021-02-06";
9 format = "setuptools";
10
11 src = fetchFromGitHub {
12 owner = "threat9";
13 repo = pname;
14 rev = "3fd394637f5566c4cf6369eecae08c4d27f93cda";
15 hash = "sha256-IET0vL0VVP9ZNn75hKdTCiEmOZRHHYICykhzW2g3LEg=";
16 };
17
18 propagatedBuildInputs = with python3.pkgs; [
19 future
20 paramiko
21 pycryptodome
22 pysnmp
23 requests
24 setuptools
25 ];
26
27 nativeCheckInputs = with python3.pkgs; [
28 pytest-xdist
29 pytestCheckHook
30 threat9-test-bed
31 ];
32
33 postInstall = ''
34 mv $out/bin/rsf.py $out/bin/rsf
35 '';
36
37 pythonImportsCheck = [
38 "routersploit"
39 ];
40
41 pytestFlagsArray = [
42 "-n"
43 "$NIX_BUILD_CORES"
44 # Run the same tests as upstream does in the first round
45 "tests/core/"
46 "tests/test_exploit_scenarios.py"
47 "tests/test_module_info.py"
48 ];
49
50 meta = with lib; {
51 description = "Exploitation Framework for Embedded Devices";
52 homepage = "https://github.com/threat9/routersploit";
53 license = with licenses; [ bsd3 ];
54 maintainers = with maintainers; [ fab ];
55 mainProgram = "rsf";
56 };
57}