From cc7a49f911ad499ac9dcd7054f4f64088c604288 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 20 Oct 2023 19:52:06 +0200 Subject: [PATCH 1/4] Add gitignore file --- .gitignore | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e81f084 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# general things to ignore +build/ +dist/ +*.egg-info/ +*.egg +*.py[cod] +__pycache__/ +*.so +*~ + +# due to using tox and pytest +.tox +.cache From 3f89138fcdfd7992b8d563eaaa6abfd351d93313 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 20 Oct 2023 19:52:29 +0200 Subject: [PATCH 2/4] Add devcontainer config --- .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..444ff25 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", + "features": { + "ghcr.io/devcontainers-contrib/features/black:2": {}, + "ghcr.io/devcontainers-contrib/features/isort:2": {} + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "pip3 install --user -r requirements.txt", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From f1bc8a652494cc428195c8f9f41188d0029ed692 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 20 Oct 2023 19:53:33 +0200 Subject: [PATCH 3/4] Reorginize project * scripts to bin dir * modules to src using sippts name * lib to src/sippts * fix import paths --- readme.md => README.md | 0 arpspoof.py => bin/arpspoof | 4 ++-- rtcpbleed.py => bin/rtcpbleed | 4 ++-- rtpbleed.py => bin/rtpbleed | 4 ++-- rtpbleedflood.py => bin/rtpbleedflood | 4 ++-- rtpbleedinject.py => bin/rtpbleedinject | 4 ++-- sipcrack.py => bin/sipcrack | 4 ++-- sipdigestleak.py => bin/sipdigestleak | 4 ++-- sipdump.py => bin/sipdump | 4 ++-- sipenumerate.py => bin/sipenumerate | 4 ++-- sipexten.py => bin/sipexten | 4 ++-- sipflood.py => bin/sipflood | 4 ++-- sipfuzzer.py => bin/sipfuzzer | 4 ++-- sipinvite.py => bin/sipinvite | 4 ++-- sipping.py => bin/sipping | 4 ++-- siprcrack.py => bin/siprcrack | 4 ++-- sipscan.py => bin/sipscan | 4 ++-- sipsend.py => bin/sipsend | 4 ++-- sipsniff.py => bin/sipsniff | 4 ++-- siptshark.py => bin/siptshark | 4 ++-- wssend.py => bin/wssend | 4 ++-- {modules => src/sippts}/arpspoof.py | 6 +++--- {lib => src/sippts/lib}/__init__.py | 0 {lib => src/sippts/lib}/color.py | 0 {lib => src/sippts/lib}/functions.py | 0 {lib => src/sippts/lib}/functions_fuzz.py | 0 {lib => src/sippts/lib}/logos.py | 2 +- {lib => src/sippts/lib}/params.py | 0 {modules => src/sippts}/rtcpbleed.py | 4 ++-- {modules => src/sippts}/rtpbleed.py | 4 ++-- {modules => src/sippts}/rtpbleedflood.py | 4 ++-- {modules => src/sippts}/rtpbleedinject.py | 4 ++-- {modules => src/sippts}/sipcrack.py | 6 +++--- {modules => src/sippts}/sipdigestleak.py | 6 +++--- {modules => src/sippts}/sipdump.py | 6 +++--- {modules => src/sippts}/sipenumerate.py | 6 +++--- {modules => src/sippts}/sipexten.py | 6 +++--- {modules => src/sippts}/sipflood.py | 6 +++--- {modules => src/sippts}/sipfuzzer.py | 6 +++--- {modules => src/sippts}/sipinvite.py | 6 +++--- {modules => src/sippts}/sipping.py | 6 +++--- {modules => src/sippts}/siprcrack.py | 6 +++--- {modules => src/sippts}/sipscan.py | 6 +++--- {modules => src/sippts}/sipsend.py | 6 +++--- {modules => src/sippts}/sipsniff.py | 6 +++--- {modules => src/sippts}/siptshark.py | 4 ++-- {modules => src/sippts}/wssend.py | 6 +++--- 47 files changed, 96 insertions(+), 96 deletions(-) rename readme.md => README.md (100%) rename arpspoof.py => bin/arpspoof (83%) rename rtcpbleed.py => bin/rtcpbleed (83%) rename rtpbleed.py => bin/rtpbleed (85%) rename rtpbleedflood.py => bin/rtpbleedflood (81%) rename rtpbleedinject.py => bin/rtpbleedinject (80%) rename sipcrack.py => bin/sipcrack (87%) rename sipdigestleak.py => bin/sipdigestleak (92%) rename sipdump.py => bin/sipdump (81%) rename sipenumerate.py => bin/sipenumerate (89%) rename sipexten.py => bin/sipexten (90%) rename sipflood.py => bin/sipflood (92%) rename sipfuzzer.py => bin/sipfuzzer (85%) rename sipinvite.py => bin/sipinvite (93%) rename sipping.py => bin/sipping (93%) rename siprcrack.py => bin/siprcrack (89%) rename sipscan.py => bin/sipscan (93%) rename sipsend.py => bin/sipsend (94%) rename sipsniff.py => bin/sipsniff (84%) rename siptshark.py => bin/siptshark (84%) rename wssend.py => bin/wssend (92%) rename {modules => src/sippts}/arpspoof.py (97%) rename {lib => src/sippts/lib}/__init__.py (100%) rename {lib => src/sippts/lib}/color.py (100%) rename {lib => src/sippts/lib}/functions.py (100%) rename {lib => src/sippts/lib}/functions_fuzz.py (100%) rename {lib => src/sippts/lib}/logos.py (99%) rename {lib => src/sippts/lib}/params.py (100%) rename {modules => src/sippts}/rtcpbleed.py (97%) rename {modules => src/sippts}/rtpbleed.py (98%) rename {modules => src/sippts}/rtpbleedflood.py (98%) rename {modules => src/sippts}/rtpbleedinject.py (98%) rename {modules => src/sippts}/sipcrack.py (99%) rename {modules => src/sippts}/sipdigestleak.py (98%) rename {modules => src/sippts}/sipdump.py (96%) rename {modules => src/sippts}/sipenumerate.py (98%) rename {modules => src/sippts}/sipexten.py (98%) rename {modules => src/sippts}/sipflood.py (98%) rename {modules => src/sippts}/sipfuzzer.py (98%) rename {modules => src/sippts}/sipinvite.py (99%) rename {modules => src/sippts}/sipping.py (98%) rename {modules => src/sippts}/siprcrack.py (98%) rename {modules => src/sippts}/sipscan.py (99%) rename {modules => src/sippts}/sipsend.py (98%) rename {modules => src/sippts}/sipsniff.py (98%) rename {modules => src/sippts}/siptshark.py (98%) rename {modules => src/sippts}/wssend.py (98%) diff --git a/readme.md b/README.md similarity index 100% rename from readme.md rename to README.md diff --git a/arpspoof.py b/bin/arpspoof similarity index 83% rename from arpspoof.py rename to bin/arpspoof index c0331aa..ff3cfb2 100755 --- a/arpspoof.py +++ b/bin/arpspoof @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.arpspoof import ArpSpoof -from lib.params import get_spoof_args +from sippts.arpspoof import ArpSpoof +from sippts.lib.params import get_spoof_args def main(): diff --git a/rtcpbleed.py b/bin/rtcpbleed similarity index 83% rename from rtcpbleed.py rename to bin/rtcpbleed index c4c1470..6a93d67 100755 --- a/rtcpbleed.py +++ b/bin/rtcpbleed @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.rtcpbleed import RTCPBleed -from lib.params import get_rtcpbleed_args +from sippts.rtcpbleed import RTCPBleed +from sippts.lib.params import get_rtcpbleed_args def main(): diff --git a/rtpbleed.py b/bin/rtpbleed similarity index 85% rename from rtpbleed.py rename to bin/rtpbleed index fc8c2bf..c3d04a0 100755 --- a/rtpbleed.py +++ b/bin/rtpbleed @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.rtpbleed import RTPBleed -from lib.params import get_rtpbleed_args +from sippts.rtpbleed import RTPBleed +from sippts.lib.params import get_rtpbleed_args def main(): diff --git a/rtpbleedflood.py b/bin/rtpbleedflood similarity index 81% rename from rtpbleedflood.py rename to bin/rtpbleedflood index ff836c5..760df75 100755 --- a/rtpbleedflood.py +++ b/bin/rtpbleedflood @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.rtpbleedflood import RTPBleedFlood -from lib.params import get_rtcbleed_flood_args +from sippts.rtpbleedflood import RTPBleedFlood +from sippts.lib.params import get_rtcbleed_flood_args def main(): diff --git a/rtpbleedinject.py b/bin/rtpbleedinject similarity index 80% rename from rtpbleedinject.py rename to bin/rtpbleedinject index 85286bc..461f1f7 100755 --- a/rtpbleedinject.py +++ b/bin/rtpbleedinject @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.rtpbleedinject import RTPBleedInject -from lib.params import get_rtcbleed_inject_args +from sippts.rtpbleedinject import RTPBleedInject +from sippts.lib.params import get_rtcbleed_inject_args def main(): diff --git a/sipcrack.py b/bin/sipcrack similarity index 87% rename from sipcrack.py rename to bin/sipcrack index df3fc9d..fbc4b2b 100755 --- a/sipcrack.py +++ b/bin/sipcrack @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipcrack import SipDigestCrack -from lib.params import get_sipcrack_args +from sippts.sipcrack import SipDigestCrack +from sippts.lib.params import get_sipcrack_args def main(): diff --git a/sipdigestleak.py b/bin/sipdigestleak similarity index 92% rename from sipdigestleak.py rename to bin/sipdigestleak index 2fd343b..b281451 100755 --- a/sipdigestleak.py +++ b/bin/sipdigestleak @@ -8,8 +8,8 @@ __email__ = "pepeluxx@gmail.com" from sys import setdlopenflags -from modules.sipdigestleak import SipDigestLeak -from lib.params import get_sipdigestleak_args +from sippts.sipdigestleak import SipDigestLeak +from sippts.lib.params import get_sipdigestleak_args def main(): diff --git a/sipdump.py b/bin/sipdump similarity index 81% rename from sipdump.py rename to bin/sipdump index 162f8dc..55f27e6 100755 --- a/sipdump.py +++ b/bin/sipdump @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipdump import SipDump -from lib.params import get_sipdump_args +from sippts.sipdump import SipDump +from sippts.lib.params import get_sipdump_args def main(): diff --git a/sipenumerate.py b/bin/sipenumerate similarity index 89% rename from sipenumerate.py rename to bin/sipenumerate index 487ca9f..21d819b 100755 --- a/sipenumerate.py +++ b/bin/sipenumerate @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipenumerate import SipEnumerate -from lib.params import get_sipenumerate_args +from sippts.sipenumerate import SipEnumerate +from sippts.lib.params import get_sipenumerate_args def main(): diff --git a/sipexten.py b/bin/sipexten similarity index 90% rename from sipexten.py rename to bin/sipexten index 8b99072..cfdd3d9 100755 --- a/sipexten.py +++ b/bin/sipexten @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipexten import SipExten -from lib.params import get_sipexten_args +from sippts.sipexten import SipExten +from sippts.lib.params import get_sipexten_args def main(): diff --git a/sipflood.py b/bin/sipflood similarity index 92% rename from sipflood.py rename to bin/sipflood index 3058717..58f31c7 100755 --- a/sipflood.py +++ b/bin/sipflood @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipflood import SipFlood -from lib.params import get_sipflood_args +from sippts.sipflood import SipFlood +from sippts.lib.params import get_sipflood_args def main(): diff --git a/sipfuzzer.py b/bin/sipfuzzer similarity index 85% rename from sipfuzzer.py rename to bin/sipfuzzer index 038f569..10df1b9 100755 --- a/sipfuzzer.py +++ b/bin/sipfuzzer @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from lib.params import get_sipfuzzer_args -from modules.sipfuzzer import SipFuzzer +from sippts.lib.params import get_sipfuzzer_args +from sippts.sipfuzzer import SipFuzzer def main(): diff --git a/sipinvite.py b/bin/sipinvite similarity index 93% rename from sipinvite.py rename to bin/sipinvite index 6481806..4442ff7 100755 --- a/sipinvite.py +++ b/bin/sipinvite @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipinvite import SipInvite -from lib.params import get_sipinvite_args +from sippts.sipinvite import SipInvite +from sippts.lib.params import get_sipinvite_args def main(): diff --git a/sipping.py b/bin/sipping similarity index 93% rename from sipping.py rename to bin/sipping index 8a0119e..cf79a32 100755 --- a/sipping.py +++ b/bin/sipping @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipping import SipPing -from lib.params import get_sipping_args +from sippts.sipping import SipPing +from sippts.lib.params import get_sipping_args def main(): diff --git a/siprcrack.py b/bin/siprcrack similarity index 89% rename from siprcrack.py rename to bin/siprcrack index 02b52ad..b88fbc2 100755 --- a/siprcrack.py +++ b/bin/siprcrack @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.siprcrack import SipRemoteCrack -from lib.params import get_sipremotecrack_args +from sippts.siprcrack import SipRemoteCrack +from sippts.lib.params import get_sipremotecrack_args def main(): diff --git a/sipscan.py b/bin/sipscan similarity index 93% rename from sipscan.py rename to bin/sipscan index 2d0a7ce..4bc249a 100755 --- a/sipscan.py +++ b/bin/sipscan @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipscan import SipScan -from lib.params import get_sipscan_args +from sippts.sipscan import SipScan +from sippts.lib.params import get_sipscan_args def main(): diff --git a/sipsend.py b/bin/sipsend similarity index 94% rename from sipsend.py rename to bin/sipsend index d129053..55973a1 100755 --- a/sipsend.py +++ b/bin/sipsend @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipsend import SipSend -from lib.params import get_sipsend_args +from sippts.sipsend import SipSend +from sippts.lib.params import get_sipsend_args def main(): diff --git a/sipsniff.py b/bin/sipsniff similarity index 84% rename from sipsniff.py rename to bin/sipsniff index 24053f0..011626e 100755 --- a/sipsniff.py +++ b/bin/sipsniff @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.sipsniff import SipSniff -from lib.params import get_sniff_args +from sippts.sipsniff import SipSniff +from sippts.lib.params import get_sniff_args def main(): diff --git a/siptshark.py b/bin/siptshark similarity index 84% rename from siptshark.py rename to bin/siptshark index f4f0cbf..bc458fa 100755 --- a/siptshark.py +++ b/bin/siptshark @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.siptshark import SipShark -from lib.params import get_tshark_args +from sippts.siptshark import SipShark +from sippts.lib.params import get_tshark_args def main(): diff --git a/wssend.py b/bin/wssend similarity index 92% rename from wssend.py rename to bin/wssend index 6c30e51..ae9616a 100755 --- a/wssend.py +++ b/bin/wssend @@ -7,8 +7,8 @@ __copyright__ = "Copyright (C) 2015-2022, SIPPTS" __email__ = "pepeluxx@gmail.com" -from modules.wssend import WsSend -from lib.params import get_wssend_args +from sippts.wssend import WsSend +from sippts.lib.params import get_wssend_args def main(): diff --git a/modules/arpspoof.py b/src/sippts/arpspoof.py similarity index 97% rename from modules/arpspoof.py rename to src/sippts/arpspoof.py index 9589d3e..8751ee7 100755 --- a/modules/arpspoof.py +++ b/src/sippts/arpspoof.py @@ -17,9 +17,9 @@ import platform import socket from IPy import IP -from lib.functions import get_machine_default_ip, ip2long, get_default_gateway_linux, get_default_gateway_mac, enable_ip_route, disable_ip_route, ip2long, long2ip -from lib.color import Color -from lib.logos import Logo +from .lib.functions import get_machine_default_ip, ip2long, get_default_gateway_linux, get_default_gateway_mac, enable_ip_route, disable_ip_route, ip2long, long2ip +from .lib.color import Color +from .lib.logos import Logo class ArpSpoof: diff --git a/lib/__init__.py b/src/sippts/lib/__init__.py similarity index 100% rename from lib/__init__.py rename to src/sippts/lib/__init__.py diff --git a/lib/color.py b/src/sippts/lib/color.py similarity index 100% rename from lib/color.py rename to src/sippts/lib/color.py diff --git a/lib/functions.py b/src/sippts/lib/functions.py similarity index 100% rename from lib/functions.py rename to src/sippts/lib/functions.py diff --git a/lib/functions_fuzz.py b/src/sippts/lib/functions_fuzz.py similarity index 100% rename from lib/functions_fuzz.py rename to src/sippts/lib/functions_fuzz.py diff --git a/lib/logos.py b/src/sippts/lib/logos.py similarity index 99% rename from lib/logos.py rename to src/sippts/lib/logos.py index 7f6730e..b2f9a68 100644 --- a/lib/logos.py +++ b/src/sippts/lib/logos.py @@ -1,6 +1,6 @@ # https://fsymbols.com/generators/smallcaps/ -from lib.color import Color +from .color import Color class Logo: diff --git a/lib/params.py b/src/sippts/lib/params.py similarity index 100% rename from lib/params.py rename to src/sippts/lib/params.py diff --git a/modules/rtcpbleed.py b/src/sippts/rtcpbleed.py similarity index 97% rename from modules/rtcpbleed.py rename to src/sippts/rtcpbleed.py index f87f3ac..6f48cb9 100644 --- a/modules/rtcpbleed.py +++ b/src/sippts/rtcpbleed.py @@ -14,8 +14,8 @@ import os import sys import time -from lib.color import Color -from lib.logos import Logo +from .lib.color import Color +from .lib.logos import Logo class RTCPBleed: diff --git a/modules/rtpbleed.py b/src/sippts/rtpbleed.py similarity index 98% rename from modules/rtpbleed.py rename to src/sippts/rtpbleed.py index e5eb7e7..f198e7e 100644 --- a/modules/rtpbleed.py +++ b/src/sippts/rtpbleed.py @@ -14,8 +14,8 @@ import os import sys import time -from lib.color import Color -from lib.logos import Logo +from .lib.color import Color +from .lib.logos import Logo class RTPBleed: diff --git a/modules/rtpbleedflood.py b/src/sippts/rtpbleedflood.py similarity index 98% rename from modules/rtpbleedflood.py rename to src/sippts/rtpbleedflood.py index eab7989..b481bfd 100644 --- a/modules/rtpbleedflood.py +++ b/src/sippts/rtpbleedflood.py @@ -13,8 +13,8 @@ import fcntl import os import sys -from lib.color import Color -from lib.logos import Logo +from .lib.color import Color +from .lib.logos import Logo class RTPBleedFlood: diff --git a/modules/rtpbleedinject.py b/src/sippts/rtpbleedinject.py similarity index 98% rename from modules/rtpbleedinject.py rename to src/sippts/rtpbleedinject.py index c0873c1..eb988ca 100755 --- a/modules/rtpbleedinject.py +++ b/src/sippts/rtpbleedinject.py @@ -12,8 +12,8 @@ import os import sys import time -from lib.color import Color -from lib.logos import Logo +from .lib.color import Color +from .lib.logos import Logo class RTPBleedInject: diff --git a/modules/sipcrack.py b/src/sippts/sipcrack.py similarity index 99% rename from modules/sipcrack.py rename to src/sippts/sipcrack.py index 71a2216..9d2cacf 100644 --- a/modules/sipcrack.py +++ b/src/sippts/sipcrack.py @@ -13,13 +13,13 @@ from nis import cat import re import time -from lib.functions import calculateHash, format_time +from .lib.functions import calculateHash, format_time import itertools import string import threading import signal -from lib.color import Color -from lib.logos import Logo +from .lib.color import Color +from .lib.logos import Logo class SipDigestCrack: diff --git a/modules/sipdigestleak.py b/src/sippts/sipdigestleak.py similarity index 98% rename from modules/sipdigestleak.py rename to src/sippts/sipdigestleak.py index dfc74c2..3fed52c 100644 --- a/modules/sipdigestleak.py +++ b/src/sippts/sipdigestleak.py @@ -14,9 +14,9 @@ import ssl import time import signal -from lib.functions import create_message, create_response_error, create_response_ok, parse_message, parse_digest, generate_random_string, get_machine_default_ip, ip2long, get_free_port, calculateHash, long2ip, ping -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, create_response_error, create_response_ok, parse_message, parse_digest, generate_random_string, get_machine_default_ip, ip2long, get_free_port, calculateHash, long2ip, ping +from .lib.color import Color +from .lib.logos import Logo class SipDigestLeak: diff --git a/modules/sipdump.py b/src/sippts/sipdump.py similarity index 96% rename from modules/sipdump.py rename to src/sippts/sipdump.py index a33a0b8..6c43b61 100644 --- a/modules/sipdump.py +++ b/src/sippts/sipdump.py @@ -9,9 +9,9 @@ import os import re -from lib.functions import parse_digest -from lib.color import Color -from lib.logos import Logo +from .lib.functions import parse_digest +from .lib.color import Color +from .lib.logos import Logo class SipDump: diff --git a/modules/sipenumerate.py b/src/sippts/sipenumerate.py similarity index 98% rename from modules/sipenumerate.py rename to src/sippts/sipenumerate.py index 17ca419..77de8a8 100644 --- a/modules/sipenumerate.py +++ b/src/sippts/sipenumerate.py @@ -11,9 +11,9 @@ import sys import ssl import time -from lib.functions import create_message, get_free_port, parse_message, fingerprinting, format_time -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, get_free_port, parse_message, fingerprinting, format_time +from .lib.color import Color +from .lib.logos import Logo from concurrent.futures import ThreadPoolExecutor diff --git a/modules/sipexten.py b/src/sippts/sipexten.py similarity index 98% rename from modules/sipexten.py rename to src/sippts/sipexten.py index 61ceb7c..5b44a07 100644 --- a/modules/sipexten.py +++ b/src/sippts/sipexten.py @@ -13,9 +13,9 @@ import ssl import re import time -from lib.functions import create_message, parse_message, ip2long, long2ip, get_free_port, format_time -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, parse_message, ip2long, long2ip, get_free_port, format_time +from .lib.color import Color +from .lib.logos import Logo from itertools import product from concurrent.futures import ThreadPoolExecutor diff --git a/modules/sipflood.py b/src/sippts/sipflood.py similarity index 98% rename from modules/sipflood.py rename to src/sippts/sipflood.py index 9e1999b..dc87646 100644 --- a/modules/sipflood.py +++ b/src/sippts/sipflood.py @@ -15,9 +15,9 @@ import fcntl import threading import time -from lib.color import Color -from lib.functions import create_message, get_free_port, generate_random_integer, generate_random_string -from lib.logos import Logo +from .lib.color import Color +from .lib.functions import create_message, get_free_port, generate_random_integer, generate_random_string +from .lib.logos import Logo class SipFlood: diff --git a/modules/sipfuzzer.py b/src/sippts/sipfuzzer.py similarity index 98% rename from modules/sipfuzzer.py rename to src/sippts/sipfuzzer.py index 422f2b8..f03681d 100755 --- a/modules/sipfuzzer.py +++ b/src/sippts/sipfuzzer.py @@ -17,9 +17,9 @@ import threading import base64 from datetime import datetime -from lib.functions import create_message, get_free_port -from lib.functions_fuzz import create_fuzzed_msg -from lib.color import Color +from .lib.functions import create_message, get_free_port +from .lib.functions_fuzz import create_fuzzed_msg +from .lib.color import Color class SipFuzzer: diff --git a/modules/sipinvite.py b/src/sippts/sipinvite.py similarity index 99% rename from modules/sipinvite.py rename to src/sippts/sipinvite.py index 32a4a4f..a2317a0 100644 --- a/modules/sipinvite.py +++ b/src/sippts/sipinvite.py @@ -30,9 +30,9 @@ import re from concurrent.futures import ThreadPoolExecutor from itertools import product -from lib.functions import create_message, create_response_ok, parse_message, generate_random_string, get_machine_default_ip, parse_digest, calculateHash, get_free_port -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, create_response_ok, parse_message, generate_random_string, get_machine_default_ip, parse_digest, calculateHash, get_free_port +from .lib.color import Color +from .lib.logos import Logo class SipInvite: diff --git a/modules/sipping.py b/src/sippts/sipping.py similarity index 98% rename from modules/sipping.py rename to src/sippts/sipping.py index daf7939..72de0e1 100644 --- a/modules/sipping.py +++ b/src/sippts/sipping.py @@ -12,9 +12,9 @@ import ssl import time import signal -from lib.functions import create_message, get_free_port, parse_message, generate_random_string, get_machine_default_ip -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, get_free_port, parse_message, generate_random_string, get_machine_default_ip +from .lib.color import Color +from .lib.logos import Logo from datetime import datetime diff --git a/modules/siprcrack.py b/src/sippts/siprcrack.py similarity index 98% rename from modules/siprcrack.py rename to src/sippts/siprcrack.py index a507593..939a0e7 100644 --- a/modules/siprcrack.py +++ b/src/sippts/siprcrack.py @@ -15,9 +15,9 @@ import threading import signal import time -from lib.functions import create_message, parse_message, parse_digest, ip2long, long2ip, generate_random_string, get_free_port, calculateHash, format_time -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, parse_message, parse_digest, ip2long, long2ip, generate_random_string, get_free_port, calculateHash, format_time +from .lib.color import Color +from .lib.logos import Logo from itertools import product from concurrent.futures import ThreadPoolExecutor diff --git a/modules/sipscan.py b/src/sippts/sipscan.py similarity index 99% rename from modules/sipscan.py rename to src/sippts/sipscan.py index e55e503..810aff8 100644 --- a/modules/sipscan.py +++ b/src/sippts/sipscan.py @@ -15,9 +15,9 @@ import re import time from IPy import IP -from lib.functions import create_message, parse_message, get_machine_default_ip, ip2long, long2ip, get_free_port, ping, fingerprinting, format_time -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, parse_message, get_machine_default_ip, ip2long, long2ip, get_free_port, ping, fingerprinting, format_time +from .lib.color import Color +from .lib.logos import Logo from itertools import product from concurrent.futures import ThreadPoolExecutor diff --git a/modules/sipsend.py b/src/sippts/sipsend.py similarity index 98% rename from modules/sipsend.py rename to src/sippts/sipsend.py index 101e15d..2ee76de 100644 --- a/modules/sipsend.py +++ b/src/sippts/sipsend.py @@ -10,9 +10,9 @@ import socket import sys import ssl -from lib.functions import create_message, get_free_port, parse_message, parse_digest, generate_random_string, calculateHash, get_machine_default_ip -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, get_free_port, parse_message, parse_digest, generate_random_string, calculateHash, get_machine_default_ip +from .lib.color import Color +from .lib.logos import Logo class SipSend: diff --git a/modules/sipsniff.py b/src/sippts/sipsniff.py similarity index 98% rename from modules/sipsniff.py rename to src/sippts/sipsniff.py index f88c484..dec8073 100644 --- a/modules/sipsniff.py +++ b/src/sippts/sipsniff.py @@ -16,9 +16,9 @@ import socket import threading import time -from lib.functions import parse_message, parse_digest, searchInterface -from lib.color import Color -from lib.logos import Logo +from .lib.functions import parse_message, parse_digest, searchInterface +from .lib.color import Color +from .lib.logos import Logo class SipSniff: diff --git a/modules/siptshark.py b/src/sippts/siptshark.py similarity index 98% rename from modules/siptshark.py rename to src/sippts/siptshark.py index 5c35bc8..448a4bd 100755 --- a/modules/siptshark.py +++ b/src/sippts/siptshark.py @@ -8,8 +8,8 @@ __email__ = "pepeluxx@gmail.com" import os -from lib.color import Color -from lib.logos import Logo +from .lib.color import Color +from .lib.logos import Logo # https://www.wireshark.org/docs/dfref/s/sip.html diff --git a/modules/wssend.py b/src/sippts/wssend.py similarity index 98% rename from modules/wssend.py rename to src/sippts/wssend.py index 643cc7e..5ec7150 100644 --- a/modules/wssend.py +++ b/src/sippts/wssend.py @@ -13,9 +13,9 @@ import ssl import rel import time -from lib.functions import create_message, get_free_port, get_machine_default_ip -from lib.color import Color -from lib.logos import Logo +from .lib.functions import create_message, get_free_port, get_machine_default_ip +from .lib.color import Color +from .lib.logos import Logo class WsSend: From e88269506e44559f00bdad3d0714675e1dc1ca08 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 20 Oct 2023 19:54:52 +0200 Subject: [PATCH 4/4] setuptools config fixes #35 --- pyproject.toml | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 29 +++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 pyproject.toml create mode 100755 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..09ca6ec --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,88 @@ +[project] +name = "sippts" +version = "3.4.dev0" +description = "Tools to audit VoIP servers and devices using SIP protocol" +readme = "README.md" +requires-python = ">=3.7" +license = {file = "LICENSE.txt"} +dynamic = ["dependencies"] + +authors = [ + {name = "Jose Luis Verdeguer", email = "pepeluxx@gmail.com" } +] + +maintainers = [ + {name = "Victor Seva", email = "linuxmaniac@torreviejawireless.org" } +] + +# Classifiers help users find your project by categorizing it. +# +# For a list of valid classifiers, see https://pypi.org/classifiers/ +# classifiers = [ # Optional +# # How mature is this project? Common values are +# # 3 - Alpha +# # 4 - Beta +# # 5 - Production/Stable +# "Development Status :: 3 - Alpha", +# +# # Indicate who your project is intended for +# "Intended Audience :: Developers", +# "Topic :: Software Development :: Build Tools", +# +# # Pick your license as you wish +# "License :: OSI Approved :: MIT License", +# +# # Specify the Python versions you support here. In particular, ensure +# # that you indicate you support Python 3. These classifiers are *not* +# # checked by "pip install". See instead "python_requires" below. +# "Programming Language :: Python :: 3", +# "Programming Language :: Python :: 3.7", +# "Programming Language :: Python :: 3.8", +# "Programming Language :: Python :: 3.9", +# "Programming Language :: Python :: 3.10", +# "Programming Language :: Python :: 3.11", +# "Programming Language :: Python :: 3 :: Only", +# ] + +# List additional groups of dependencies here (e.g. development +# dependencies). Users will be able to install these using the "extras" +# syntax, for example: +# +# $ pip install sampleproject[dev] +# +# Similar to `dependencies` above, these must be valid existing +# projects. +#[project.optional-dependencies] # Optional +#dev = ["check-manifest"] +#test = ["coverage"] + +# List URLs that are relevant to your project +# +# This field corresponds to the "Project-URL" and "Home-Page" metadata fields: +# https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use +# https://packaging.python.org/specifications/core-metadata/#home-page-optional +# +# Examples listed include a pattern for specifying where the package tracks +# issues, where the source is hosted, where to say thanks to the package +# maintainers, and where to support the project financially. The key is +# what's used to render the link text on PyPI. +[project.urls] # Optional +"Homepage" = "https://github.com/Pepelux/sippts" +"Bug Reports" = "https://github.com/Pepelux/sippts/issues" + +# This is configuration specific to the `setuptools` build backend. +# If you are using a different build backend, you will need to change this. +[tool.setuptools] +# If there are data files included in your packages that need to be +# installed, specify them here. +#package-data = {"sample" = ["*.dat"]} + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"] } + +[build-system] +# These are the assumed default build requirements from pip: +# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support +requires = ["setuptools>=43.0.0", "wheel"] +build-backend = "setuptools.build_meta" + diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..9768bd0 --- /dev/null +++ b/setup.py @@ -0,0 +1,29 @@ +"""Shim setup file to allow for editable install.""" + +from setuptools import setup + +scripts=[ + "bin/arpspoof", + "bin/rtcpbleed", + "bin/rtpbleed", + "bin/rtpbleedflood", + "bin/rtpbleedinject", + "bin/sipcrack", + "bin/sipdigestleak", + "bin/sipdump", + "bin/sipenumerate", + "bin/sipexten", + "bin/sipflood", + "bin/sipfuzzer", + "bin/sipinvite", + "bin/sipping", + "bin/siprcrack", + "bin/sipscan", + "bin/sipsend", + "bin/sipsniff", + "bin/siptshark", + "bin/wssend", +] + +if __name__ == "__main__": + setup(scripts=scripts)