Skip to content

Commit

Permalink
ruff checked
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 committed Jul 31, 2024
1 parent b845fe9 commit c23d2ad
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions base.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def find_openssl_binpath():
path = result.stdout.decode().strip()
if path:
return path
except Exception as e:
except Exception:
pass

return "openssl"
Expand Down Expand Up @@ -143,7 +143,7 @@ def register(cls, s):
module = importlib.import_module(module_path)
_class = getattr(module, class_name)
cls.extensions.append(_class())
except (ImportError, AttributeError) as e:
except (ImportError, AttributeError):
raise ImportError(class_name + " in the extension " + module_name)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion plugins/alwaysonline.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class AlwaysOnline(Extension):
def __init__(self):
self.type = "connector" # this is a connector
self.connection_type = "alwaysonline"
self.buffer_size = 8192;
self.buffer_size = 8192

def connect(self, conn, data, webserver, port, scheme, method, url):
logger.info("[*] Connecting... Connecting...")
Expand Down
1 change: 0 additions & 1 deletion plugins/bio.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# Updated at: 2024-07-02
#

import json
from Bio.Seq import Seq
from Bio.SeqUtils import gc_fraction

Expand Down
1 change: 0 additions & 1 deletion plugins/portscanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#
import sys
import nmap
import json

from base import Extension

Expand Down
8 changes: 2 additions & 6 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
import json
import ssl
import time
import hashlib
import traceback
import textwrap
from datetime import datetime
from platform import python_version

import re
import requests
from requests.auth import HTTPBasicAuth
from urllib.parse import urlparse
Expand All @@ -35,9 +33,7 @@
from base import (
Extension,
extract_credentials,
jsonrpc2_create_id,
jsonrpc2_encode,
jsonrpc2_result_encode,
find_openssl_binpath,
Logger,
)
Expand Down Expand Up @@ -467,7 +463,7 @@ def bypass_callback(response, *args, **kwargs):
result = query.json()["result"]
resolved_address_list.append(result["data"])
logger.info("[*] resolved IP: %s" % (result["data"]))
except requests.exceptions.ReadTimeout as e:
except requests.exceptions.ReadTimeout:
pass
proxy_data["data"]["client_address"] = resolved_address_list[0]

Expand Down Expand Up @@ -503,7 +499,7 @@ def relay_connect(id, raw_data, proxy_data):
logger.info("[*] waiting for the relay... %s" % id)
max_reties = 30
t = 0
while t < max_reties and not id in accepted_relay:
while t < max_reties and id not in accepted_relay:
time.sleep(1)
t += 1
if t < max_reties:
Expand Down
5 changes: 0 additions & 5 deletions smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@
#
import asyncio
from aiosmtpd.controller import Controller
from aiosmtpd.handlers import Message
from email.message import EmailMessage
import re
import sys
import json
import requests
from platform import python_version
from decouple import config
from requests.auth import HTTPBasicAuth
from base import (
extract_credentials,
jsonrpc2_create_id,
jsonrpc2_encode,
jsonrpc2_result_encode,
Logger,
)

Expand Down

0 comments on commit c23d2ad

Please sign in to comment.