Skip to content

Commit

Permalink
Migration to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
RedRaysTeam committed Aug 7, 2024
1 parent 3be61f3 commit e2a7b9f
Show file tree
Hide file tree
Showing 28 changed files with 764 additions and 677 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Checkout pysap
uses: actions/checkout@v3

- name: Setup Python 3.10
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install Python dependencies
run: |
Expand All @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.12"]
experimental: [false]
continue-on-error: ${{ matrix.experimental }}

Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.12"]

steps:
- name: Checkout pysap
Expand Down
2 changes: 1 addition & 1 deletion docs/protocols/SAPRouter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"outputs": [],
"source": [
"router_string = [SAPRouterRouteHop(hostname=\"8.8.8.8\", port=3299),\n",
" SAPRouterRouteHop(hostname=\"10.0.0.1\", port=3200, password=\"S3cr3t\")]\n",
" SAPRouterRouteHop(hostname=\"127.0.0.1\", port=3200, password=\"S3cr3t\")]\n",
"router_string_lens = map(len, map(str, router_string))\n",
"p = SAPRouter(type=SAPRouter.SAPROUTER_ROUTE,\n",
" route_entries=len(router_string),\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/diag_capturer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def parse_fields(self, pkt):
if atom.etype in [121, 122, 123, 130, 131, 132]:
text = atom.field1_text or atom.field2_text
text = text.strip()
if "@\Q" in text:
if "@\\Q" in text:
parts = text.split("@")
try:
text = "%s (hint: %s)" % (parts[2], parts[1])
Expand Down
4 changes: 2 additions & 2 deletions examples/diag_login_brute_force.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# Standard imports
import logging
from string import letters
from string import ascii_letters
from random import choice
from argparse import ArgumentParser
# External imports
Expand Down Expand Up @@ -124,7 +124,7 @@ def make_login(username, password, client):


def get_rand(length):
return ''.join(choice(letters) for _ in range(length))
return ''.join(choice(ascii_letters) for _ in range(length))


def is_duplicate_login(response):
Expand Down
Loading

0 comments on commit e2a7b9f

Please sign in to comment.