Hack Forums
[C] Window Logger - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] Window Logger (/showthread.php?tid=5976978)



Window Logger - lynxmk - Jun 5, 2019

Removed. It was pretty bad tbh.


RE: Window Logger - YouthInAsia - Jun 5, 2019

There are better ways to retrieve the time.
Window could be unicode.
Writing [buffer overflow] when you could have just written partial window title.
Redundant call to memset since stack is cleaned at the end of the scope.
And writing a window title every 500ms seconds which will fill up your file really quickly.

overall trash code, trash design.


RE: Window Logger - lynxmk - Jun 5, 2019

(Jun 5, 2019 02:16 PM)YouthInAsia Wrote:  There are better ways to retrieve the time.
Window could be unicode.
Writing [buffer overflow] when you could have just written partial window title.
Redundant call to memset since stack is cleaned at the end of the scope.
And writing a window title every 500ms seconds which will fill up your file really quickly.

overall trash code, trash design.

I'll try to improve. ✌


RE: Window Logger - incelsubhuman - Jun 5, 2019

lol what kinda code is this

your "title" buffer will never have a "strlen" above the MaxCount argument to begin with...


RE: Window Logger - YouthInAsia - Jun 5, 2019

(Jun 5, 2019 03:48 PM)incelsubhuman Wrote:  lol what kinda code is this

your "title" buffer will never have a "strlen" above the MaxCount argument to begin with...

GetWindowText(hwnd, title,buflen);
I wasn't even paying attention to that 🤣