Closed russhaun closed 2 years ago
issue has been fixed. was due to the way ToastMessages() handled alerts. as it is a class i was initializing 2 instances wrongly should have only been 1 instance. also main class that it inherits from had an error which would set up the message wrong.
this is code from main class:
self.wc = WNDCLASS() self.hinst = self.wc.hInstance = GetModuleHandle(None) self.wc.lpszClassName = str(f"PythonTaskbar{title}") # must be a string<----------This is what i changed self.wc.lpfnWndProc = message_map # could also specify a wndproc. try: self.classAtom = RegisterClass(self.wc) except Exception as e: print(e)
original line did not add {title} var this makes the messages unique and issue no longer occurs. will be in next release
had to add one more line to toast messages:
try: self.classAtom = RegisterClass(self.wc) except Exception as e: self.classAtom = self.wc <------added this line print(e)<-----removed this
the logic is this. it initially sets up the class at start of func. when calling multiple times like in honepot.py when being scanned. it tries to register ,if already there (which it is) catch the error and then just set it to the the class already there.
issue is resolved in next release 1.0.5(beta)
[!] Error detected. Printing: 'ToastMessages' object has no attribute 'classAtom' Traceback (most recent call last): File "src\honeypot.py", line 106, in setup ban(ip) File "src\core.py", line 365, in ban HoneyPotEvent(ip) File "src\events.py", line 121, in HoneyPotEvent callback_on_click= honeypot_toast.on_event() File "win10toast__init__.py", line 159, in show_toast File "win10toast__init__.py", line 102, in _show_toast AttributeError: 'ToastMessages' object has no attribute 'classAtom'
also see this: ERROR:root:Some trouble with classAtom ((1410, 'RegisterClass', 'Class already exists.'))
when getting an alert in honeypot you receive this error. artillery continues to run . issue is with way toast was being called.testing fixes as we speak