Skip to content

Commit 3ee33cd

Browse files
authored
Merge pull request Pennyw0rth#535 from Pennyw0rth/neff-patch-1
Update license file and lint py version
2 parents 1bfe964 + a562430 commit 3ee33cd

12 files changed

Lines changed: 19 additions & 21 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023, Marshall-Hallenbeck, NeffIsBack, zblurx, mpgn_x64
1+
Copyright (c) 2025, Marshall-Hallenbeck, NeffIsBack, zblurx, mpgn_x64
22
Copyright (c) 2022, byt3bl33d3r
33
All rights reserved.
44

nxc/modules/wcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, name, description="", checkers=None, checker_args=None, check
5454
self.reasons = []
5555

5656
def run(self):
57-
for checker, args, kwargs in zip(self.checkers, self.checker_args, self.checker_kwargs):
57+
for checker, args, kwargs in zip(self.checkers, self.checker_args, self.checker_kwargs, strict=True):
5858
if checker is None:
5959
checker = HostChecker.check_registry
6060

nxc/modules/winscp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# - https://github.com/rapid7/metasploit-framework/blob/master/lib/rex/parser/winscp.rb
66

77
import traceback
8-
from typing import Tuple
98
from impacket.dcerpc.v5.rpcrt import DCERPCException
109
from impacket.dcerpc.v5 import rrp
1110
from impacket.examples.secretsdump import RemoteOperations
@@ -98,7 +97,7 @@ def decrypt_passwd(self, host: str, username: str, password: str) -> str:
9897
clearpass = clearpass[len(key):]
9998
return clearpass
10099

101-
def dec_next_char(self, pass_bytes) -> "Tuple[int, bytes]":
100+
def dec_next_char(self, pass_bytes) -> tuple[int, bytes]:
102101
"""
103102
Decrypts the first byte of the password and returns the decrypted byte and the remaining bytes.
104103

nxc/nxcdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def do_export(self, line):
153153
if cred[4] == "hash":
154154
usernames.append(cred[2])
155155
passwords.append(cred[3])
156-
output_list = [":".join(combination) for combination in zip(usernames, passwords)]
156+
output_list = [":".join(combination) for combination in zip(usernames, passwords, strict=True)]
157157
write_list(filename, output_list)
158158
else:
159159
print(f"[-] No such export option: {line[1]}")

nxc/protocols/ldap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ def printTable(items, header):
11171117
rbcdRights.append(str(rbcd.get("sAMAccountName")))
11181118
rbcdObjType.append(str(rbcd.get("objectCategory")))
11191119

1120-
for rights, objType in zip(rbcdRights, rbcdObjType):
1120+
for rights, objType in zip(rbcdRights, rbcdObjType, strict=True):
11211121
answers.append([rights, objType, "Resource-Based Constrained", sAMAccountName])
11221122

11231123
if delegation in ["Unconstrained", "Constrained", "Constrained w/ Protocol Transition"]:

nxc/protocols/mssql/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def add_admin_user(self, credtype, domain, username, password, host, user_id=Non
189189
nxc_logger.debug(f"Hosts: {hosts}")
190190

191191
if users is not None and hosts is not None:
192-
for user, host in zip(users, hosts):
192+
for user, host in zip(users, hosts, strict=True):
193193
user_id = user[0]
194194
host_id = host[0]
195195
link = {"userid": user_id, "hostid": host_id}

nxc/protocols/nfs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def shares(self):
167167
# Mount shares and check permissions
168168
self.logger.highlight(f"{'UID':<11}{'Perms':<9}{'Storage Usage':<17}{'Share':<30} {'Access List':<15}")
169169
self.logger.highlight(f"{'---':<11}{'-----':<9}{'-------------':<17}{'-----':<30} {'-----------':<15}")
170-
for share, network in zip(shares, networks):
170+
for share, network in zip(shares, networks, strict=True):
171171
try:
172172
mnt_info = self.mount.mnt(share, self.auth)
173173
self.logger.debug(f"Mounted {share} - {mnt_info}")
@@ -225,7 +225,7 @@ def enum_shares(self):
225225
networks = self.export_info(self.mount.export())
226226

227227
self.logger.display("Enumerating NFS Shares Directories")
228-
for share, network in zip(shares, networks):
228+
for share, network in zip(shares, networks, strict=True):
229229
try:
230230
mount_info = self.mount.mnt(share, self.auth)
231231
self.logger.debug(f"Mounted {share} - {mount_info}")

nxc/protocols/smb/database.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33
import warnings
44
from datetime import datetime
5-
from typing import Optional
65

76
from sqlalchemy import func, Table, select, delete
87
from sqlalchemy.dialects.sqlite import Insert # used for upsert
@@ -350,7 +349,7 @@ def add_admin_user(self, credtype, domain, username, password, host, user_id=Non
350349
hosts = self.get_hosts(host)
351350

352351
if users and hosts:
353-
for user, host in zip(users, hosts):
352+
for user, host in zip(users, hosts, strict=True):
354353
user_id = user[0]
355354
host_id = host[0]
356355
link = {"userid": user_id, "hostid": host_id}
@@ -693,7 +692,7 @@ def add_domain_backupkey(self, domain: str, pvk: bytes):
693692
except Exception as e:
694693
nxc_logger.debug(f"Issue while inserting DPAPI Backup Key: {e}")
695694

696-
def get_domain_backupkey(self, domain: Optional[str] = None):
695+
def get_domain_backupkey(self, domain: str | None = None):
697696
"""
698697
Get domain backupkey
699698
:domain is the domain fqdn
@@ -748,11 +747,11 @@ def add_dpapi_secrets(
748747
def get_dpapi_secrets(
749748
self,
750749
filter_term=None,
751-
host: Optional[str] = None,
752-
dpapi_type: Optional[str] = None,
753-
windows_user: Optional[str] = None,
754-
username: Optional[str] = None,
755-
url: Optional[str] = None,
750+
host: str | None = None,
751+
dpapi_type: str | None = None,
752+
windows_user: str | None = None,
753+
username: str | None = None,
754+
url: str | None = None,
756755
):
757756
"""Get dpapi secrets from nxcdb"""
758757
q = select(self.DpapiSecrets)

nxc/protocols/smb/samrfunc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def get_local_administrators(self):
7777
member_sids = self.samr_query.get_alias_members(domain_handle, self.groups["Administrators"])
7878
member_names = self.lsa_query.lookup_sids(member_sids)
7979

80-
for sid, name in zip(member_sids, member_names):
80+
for sid, name in zip(member_sids, member_names, strict=True):
8181
print(f"{name} - {sid}")
8282

8383

nxc/protocols/ssh/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def add_admin_user(self, credtype, username, secret, host_id=None, cred_id=None)
256256
hosts = self.get_hosts(host_id)
257257

258258
if creds and hosts:
259-
for cred, host in zip(creds, hosts):
259+
for cred, host in zip(creds, hosts, strict=True):
260260
cred_id = cred[0]
261261
host_id = host[0]
262262
link = {"credid": cred_id, "hostid": host_id}

0 commit comments

Comments
 (0)