Skip to content

Commit 54e8160

Browse files
committed
fix: initialize hash_file variable before try block in handshake.py
Prevents potential NameError if tempfile creation fails in hcxpcapngtool_handshakes() exception handler. https://claude.ai/code/session_01AR5k1ToyGf5WcdRMqiQvcT
1 parent 6657f07 commit 54e8160

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wifite/model/handshake.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def hcxpcapngtool_handshakes(self):
151151
import tempfile
152152

153153
# Create a temporary hash file to test if hcxpcapngtool can extract data
154+
hash_file = None
154155
try:
155156
with tempfile.NamedTemporaryFile(mode='w', suffix='.22000', delete=False) as tmp:
156157
hash_file = tmp.name

0 commit comments

Comments
 (0)