Skip to content

Commit 8e720de

Browse files
committed
Migration to python3
1 parent 3be61f3 commit 8e720de

23 files changed

+671
-645
lines changed

.github/workflows/build_and_test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout pysap
1818
uses: actions/checkout@v3
1919

20-
- name: Setup Python 3.10
20+
- name: Setup Python 3.12
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.10"
23+
python-version: "3.12"
2424

2525
- name: Install Python dependencies
2626
run: |
@@ -46,7 +46,7 @@ jobs:
4646
fail-fast: false
4747
matrix:
4848
os: [ubuntu-latest]
49-
python-version: ["3.7", "3.8", "3.9", "3.10"]
49+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.12"]
5050
experimental: [false]
5151
continue-on-error: ${{ matrix.experimental }}
5252

@@ -83,7 +83,7 @@ jobs:
8383
runs-on: ubuntu-latest
8484
strategy:
8585
matrix:
86-
python-version: ["3.10"]
86+
python-version: ["3.12"]
8787

8888
steps:
8989
- name: Checkout pysap

docs/protocols/SAPRouter.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"outputs": [],
130130
"source": [
131131
"router_string = [SAPRouterRouteHop(hostname=\"8.8.8.8\", port=3299),\n",
132-
" SAPRouterRouteHop(hostname=\"10.0.0.1\", port=3200, password=\"S3cr3t\")]\n",
132+
" SAPRouterRouteHop(hostname=\"127.0.0.1\", port=3200, password=\"S3cr3t\")]\n",
133133
"router_string_lens = map(len, map(str, router_string))\n",
134134
"p = SAPRouter(type=SAPRouter.SAPROUTER_ROUTE,\n",
135135
" route_entries=len(router_string),\n",

examples/diag_capturer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def parse_fields(self, pkt):
106106
if atom.etype in [121, 122, 123, 130, 131, 132]:
107107
text = atom.field1_text or atom.field2_text
108108
text = text.strip()
109-
if "@\Q" in text:
109+
if "@\\Q" in text:
110110
parts = text.split("@")
111111
try:
112112
text = "%s (hint: %s)" % (parts[2], parts[1])

examples/diag_login_brute_force.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Standard imports
2121
import logging
22-
from string import letters
22+
from string import ascii_letters
2323
from random import choice
2424
from argparse import ArgumentParser
2525
# External imports
@@ -124,7 +124,7 @@ def make_login(username, password, client):
124124

125125

126126
def get_rand(length):
127-
return ''.join(choice(letters) for _ in range(length))
127+
return ''.join(choice(ascii_letters) for _ in range(length))
128128

129129

130130
def is_duplicate_login(response):

0 commit comments

Comments
 (0)