Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to python3 #76

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading