Keylogger

xuanbao · · 943 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>So i want to make a keylogger for my GoBot project, its for Windows. Would i be able to achieve this in Go or will i have to write it in C?</p> <hr/>**评论:**<br/><br/>IntellectualReserve: <pre><p>You&#39;ll need to provide a more detailed question to get a more useful reply.</p> <p>With the amount of information you provided, yes, you can do this in Go.</p></pre>SaturnsVoid: <pre><p>I am guessing i would need to call GetAsyncKeyState? I am not vary will versed in Go or C... </p></pre>IntellectualReserve: <pre><p>What are your design requirements?</p></pre>SaturnsVoid: <pre><p>I don&#39;t really have any, i just want it to be a clean standalone system, this is for my GoBot project <a href="https://github.com/SaturnsVoid/GoBot" rel="nofollow">https://github.com/SaturnsVoid/GoBot</a> Witch it a PoC HTTP Trojan written in Go (and C i guess).</p></pre>IntellectualReserve: <pre><p>Surely you have some design requirements or you wouldn&#39;t be trying to design something. </p> <p>A keylogger could be something as simple as reading from stdin and logging it to stdout, but I don&#39;t think that&#39;s what you are trying to do. </p></pre>SaturnsVoid: <pre><p>Sorry i think i misunderstood your words. I want it to be able to log all key presses from the keyboard and know what the window/program in that it being typed into. Then save it to a temp file to be sent to the main C&amp;C, then deleted after confirmation of the C&amp;C reserving the file.</p></pre>IntellectualReserve: <pre><p>Put another way, you want to store Windows key input events including the windows/programs to which they are sent.</p> <p>To answer your original question:</p> <blockquote> <p>Would i be able to achieve this in Go or will i have to write it in C?</p> </blockquote> <p>Achieving this purely in Go would be difficult and would involve essentially hacking the Windows OS.</p> <p>As you mentioned, Windows has an API you could use. That&#39;s written in C++.</p> <p>Go can call C. C++ APIs can be transformed to C. Therefore, you could write the vast majority of your keylogger in Go, with a small portion of it being a C wrapper for Windows C++ APIs.</p> <p>Separately, consider using GetKeyboardState over GetAsyncKeyState.</p></pre>yeah-ok: <pre><p>I recently researched this subject for a project that would require cross platform mouse/keyboard control and the only solid solution that I found (which wouldn&#39;t req. substantial C/C++ tinkering on each platform) is Lazarus/Free Pascal which has following package: <a href="http://wiki.lazarus.freepascal.org/MouseAndKeyInput" rel="nofollow">http://wiki.lazarus.freepascal.org/MouseAndKeyInput</a> - I would be interested in using this from Go but who knows, maybe its time to write some Pascal! :)</p></pre>JennyPance: <pre><p>You can take a look at this <a href="http://download.cnet.com/Micro-Keylogger/3000-2162_4-75375292.html" rel="nofollow">http://download.cnet.com/Micro-Keylogger/3000-2162_4-75375292.html</a></p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

943 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传