I recently got my first job as Go developer, this is the coding test I had to do

polaris · · 1007 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I had to reverse-engineer a linux binary provided by the company. This was my solution, I hope it can help to others.</p> <p><a href="https://github.com/fern4lvarez/offers-finder" rel="nofollow">https://github.com/fern4lvarez/offers-finder</a></p> <hr/>**评论:**<br/><br/>HighSchoolArtClass: <pre><p>Can you define how exactly you reverse-engineered it? You just had to figure out which endpoints worked and document them, and then build a binary that worked in the same way? Or did they give you a specification to build your binary off of?</p></pre>fern4lvarez: <pre><p>I got just the binary and a short specification, as the one written in my README file, and had to do all the implementation from scratch by myself</p></pre>digitalyatri: <pre><p>Does this code really reverse a linux binary (ELF) ? as it says in the text of this post ? Looking at the code it seems something else entirely ? I was atleast expecting to see the debug/elf package being imported somewhere for this use case, but couldn&#39;t find it. Can someone comment ?</p></pre>fern4lvarez: <pre><p>I&#39;m not sure what do you mean. What I attempted to do is to replicate the functionality of a provided binary, built with <code>go build</code> for Linux, without having any clue of the implementation. Probably you are looking for something else.</p></pre>digitalyatri: <pre><p>So you mean, you were already told what the binary does and also had the spec, you didn&#39;t actually have to dig into the binary to find out what it does on your own, which is what reverse-engineering is. I might have been carried away by that definition</p></pre>fern4lvarez: <pre><blockquote> <p>Reverse engineering is taking apart an object to see how it works in order to duplicate or enhance the object.</p> </blockquote> <p>I had the binary myself, I was playing with it, trying around all cases, checking responses and headers, that&#39;s it.</p></pre>digitalyatri: <pre><p><a href="/u/hoffentlich" rel="nofollow">/u/hoffentlich</a> pretty much understood as to what i was saying, the use of term RE is incorrect. When you say &#34;trying around all cases&#34; etc etc just wondering if the binary had help section in it ? ./&lt;binary&gt; -help ? which gave u info on the various flags and arguments, files etc the binary makes use of ?</p></pre>fern4lvarez: <pre><p>there&#39;s no options, the binary just starts the server</p></pre>Simpfally: <pre><p>How is analysing packets going in/out not RE?<br/> RE isn&#39;t only about reading ASM.</p></pre>hoffentlich: <pre><p>You&#39;re using the term &#34;reverse engineering&#34; wrong in the world of compiled languages. What you did is not reverse engineering anything, it&#39;s re-implementing something from scratch. To be able to reverse engineer a binary you would need knowledge of ASM (Assembly Language) among other things. What if the binary implemented a complex algorithm? You think you could just execute it and see how the algorithm is implemented?</p></pre>hipone: <pre><blockquote> <p>provided by the company</p> <p>I hope it can help to others.</p> </blockquote> <p>Have you asked your potential boss you&#39;re allowed to disclose it?</p></pre>fern4lvarez: <pre><p>This has been open sourced since day 0, I actually submitted my solution as a public link, so there was never such disclosure.</p> <p>This test was unique, the intention is to share open source code to help people learning Go, or learn myself from feedback of others, not for letting copy my solution, which makes no sense.</p></pre>

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

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