<div dir="ltr">Looks like I can grep <span style="font-size:12.8px">NGX_MODULE_SIGNATURE from the nginx binary itself. Depending on the version of nginx, it could be a decent option. I'm literally only dependent on core and http. Most of the elements of the signature appear to be extraneous.</span></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 29, 2017 at 12:27 AM, Joseph Spencer <span dir="ltr"><<a href="mailto:spencer@kogosoftwarellc.com" target="_blank">spencer@kogosoftwarellc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm looking to create a portable binary, and from everything I can read, it is almost impossible. The recommended approach seems to be to expose source code and require users to compile. This is painful because it requires the source code and gcc to be available: a hard sell for the lazy sysadmin.<div><br></div><div>My goal is to create a proprietary module that is used in conjunction with a paid service. Users simply install the module and provide access token credentials.</div><div><br></div><div>As you can imagine it's been really difficult, mainly because practically <i>every</i> configure option is compared at run time.</div><div><br></div><div>I added some logging, and found that the module signature is indeed embedded in the resulting .so file. I was able to successfully use sed to get my module to work, but I'm thinking this is an obvious hack not even worth considering for a production binary:</div><div><br></div><div>sed -i'' 's|8,4,8,<wbr>001111111101011100111111111111<wbr>1111|8,4,8,<wbr>000011111101011100111010111100<wbr>0110|' <a href="http://ngx_my_custom_module-nginx-1.11.5.so" target="_blank">ngx_my_custom_module-nginx-1.<wbr>11.5.so</a> <br></div><div><div><br></div><div>Having nginx -V is nice, but it could be beneficial to expose NGX_MODULE_SIGNATURE somehow. That way I could have an installer script that checkes to ensure that essential modules are available and modify the binary after it's been downloaded. I realize this is dangerous, but I'm not willing to expose source code and require gcc yet.</div><div><br></div><div>Any opinions or guidance would be greatly appreciated.</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_9040448487603238843gmail_signature"><div dir="ltr">Thanks,<div>Joe Spencer (member)</div><div>Kogo Software LLC</div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Thanks,<div>Joe Spencer (member)</div><div>Kogo Software LLC</div></div></div>
</div>