[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nmap-dev
Subject:    Questions about Building a Standalone Ncat Portable for Windows
From:       Kary Hui <karyi.hui () gmail ! com>
Date:       2018-07-20 5:39:32
Message-ID: CAFSDj+KCRDKm-Lc_VKh=WPyOVthgBh2WkTAARytCb1JmH7hOxg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Developer,

I follow the steps as mentioned in "Building Ncat Portable for
Windows" (*https://secwiki.org/w/Nmap/Ncat_Portable
<https://secwiki.org/w/Nmap/Ncat_Portable>)*. However, I cannot build a
standalone Ncat. Since I am new to Visual Studio, if you find that
following steps do not make sense, please do let me know.

1) For your information, Visual Studio Express 2013 for Desktop is used.
The source codes of Nmap are downloaded from SVN source code repository on
today (HKT 1200).

2) I successfully build dynamic release version Nmap & Ncat.

3) I select 'Ncat Static' in nmap Solution > Configuration Manager > Active
Solution Configuration and ensure Configurations for nbase, nsock and ncat
are static.

4) I build ncat. Error messages are as below.
Error 5 error C1083: Cannot open include file: 'lua.h': No such file or
directory c:\nmap\ncat\ncat_lua.h 137 1 ncat
Error 6 error C1083: Cannot open include file: 'lua.h': No such file or
directory c:\nmap\ncat\ncat_lua.h 137 1 ncat

5) I update on \nmap\ncat\ncat.vcxproj to add back ..\liblua; for
'Static|Win32'.

6) I click on Rebuild. Error messages are as below.
Error 44 error LNK2005: _memchr already defined in LIBCMT.lib(memchr.obj)
C:\nmap\ncat\MSVCRT.lib(MSVCR120.dll) ncat
......

7) I search on Google. The errors occur because liblua.lib is built by
selecting 'Runtime Library' = 'Multi-threaded DLL (/MD)'. However, other
libraries (i.e. ncat.lib, nsock.lib & nbase.lib) are built by selecting
'Runtime Library' = 'Multi-threaded (/MT)'.

8) No matter I try to rebuild liblua.lib by selecting 'Runtime Library' =
'Multi-threaded (/MT)' or input '/NODEFAULTLIB:libcmt.lib' to linker of
ncat > Command Line, the standalone ncat cannot be built successfully.

Please check. Thank you.

Regards,
Kary

[Attachment #5 (text/html)]

<div dir="ltr">Hi Developer,<div><br></div><div>I follow the steps as mentioned in \
&quot;Building Ncat Portable for Windows&quot; (<u \
style="font-size:small;background-color:rgb(255,255,255)"><a \
href="https://secwiki.org/w/Nmap/Ncat_Portable">https://secwiki.org/w/Nmap/Ncat_Portable</a>)</u>. \
<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">However, \
I cannot build a standalone Ncat. Since I am new to Visual Studio, if you find that \
following steps do not make sense, please do let me \
know.</span></div><div><br></div><div>1) For your information, Visual Studio Express \
2013 for Desktop is used. The source codes of Nmap are downloaded from SVN source \
code repository on today (HKT 1200).</div><div><br></div><div>2) I successfully build \
dynamic release version Nmap &amp; Ncat.  </div><div><br></div><div>3) I select \
&#39;Ncat Static&#39; in nmap Solution &gt; Configuration Manager &gt; Active \
Solution Configuration and ensure Configurations for nbase, nsock and ncat are \
static.</div><div><br></div><div>4) I build ncat. Error messages are as \
below.</div><div><div>Error<span style="white-space:pre">	</span>5<span \
style="white-space:pre">	</span>error C1083: Cannot open include file: \
&#39;lua.h&#39;: No such file or directory<span \
style="white-space:pre">	</span>c:\nmap\ncat\ncat_lua.h<span \
style="white-space:pre">	</span>137<span style="white-space:pre">	</span>1<span \
style="white-space:pre">	</span>ncat</div></div><div><div>Error<span \
style="white-space:pre">	</span>6<span style="white-space:pre">	</span>error C1083: \
Cannot open include file: &#39;lua.h&#39;: No such file or directory<span \
style="white-space:pre">	</span>c:\nmap\ncat\ncat_lua.h<span \
style="white-space:pre">	</span>137<span style="white-space:pre">	</span>1<span \
style="white-space:pre">	</span>ncat</div></div><div><br></div><div>5) I update on \
\nmap\ncat\ncat.vcxproj to add back ..\liblua; for \
&#39;Static|Win32&#39;.</div><div><br></div><div>6) I click on Rebuild. Error \
messages are as below.</div><div><div>Error<span \
style="white-space:pre">	</span>44<span style="white-space:pre">	</span>error \
LNK2005: _memchr already defined in LIBCMT.lib(memchr.obj)<span \
style="white-space:pre">	</span>C:\nmap\ncat\MSVCRT.lib(MSVCR120.dll)<span \
style="white-space:pre">	</span>ncat</div></div><div>......</div><div><br></div><div>7) \
I search on Google. The errors occur because liblua.lib is built by selecting \
&#39;Runtime Library&#39; = &#39;Multi-threaded DLL (/MD)&#39;. However, other \
libraries (i.e. ncat.lib, nsock.lib &amp; nbase.lib) are built by selecting \
&#39;Runtime Library&#39; = &#39;Multi-threaded \
(/MT)&#39;.</div><div><br></div><div>8) No matter I try to rebuild  <span \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">liblua.lib \
b<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">y \
selecting &#39;Runtime Library&#39; = &#39;Multi-threaded (/MT)&#39; or input \
&#39;/NODEFAULTLIB:libcmt.lib&#39; to linker of ncat &gt; Command Line, the \
standalone ncat cannot be built successfully.</span></span></div><div><span \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><div><span \
style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Please \
check.  </span></span>Thank \
you.</div><div><br></div><div>Regards,</div><div>Kary</div></div>



_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic