RE: Building Libnet Win32

"Mustafa Abu Sedera" <[email protected]> Wed, 14 Jul 2004 04:31:02 +0000
Newsgroups gmane.comp.security.libnet
Message-ID <[email protected]>
Hi there..
follow the instructions in the attached readme files to be able to run 
libnet programs on WinXP with MSVS 6.0 Sp6, it is the same like the one in 
the libnet package but more detailed...It only works with me for libnet 
1.1.1 and wpcap developers pack 3.0 beta..
When i tried it with libnet 1.1.2 and wpcap 3.1 beta i got an error building 
the library.. But you can try it and if you succeed tell me how...
Regards, Mustaffa Abu Sedira


>From: Pete Markowsky <[email protected]>
>To: [email protected]
>Subject: Building Libnet Win32
>Date: Mon, 12 Jul 2004 10:40:34 -0400
>
>Hi,
>
>Currently I've been attempting to build libnet on winxp sp 1 with
>visual c++ 6 sp 6. After following the instructions in the readme.txt
>I'm ending up with linking errors:
>
>libnet_prand.obj : error LNK2001: unresolved external symbol
>__imp__CryptReleaseContext@8
>libnet_prand.obj : error LNK2001: unresolved external symbol
>__imp__CryptGenRandom@12
>libnet_prand.obj : error LNK2001: unresolved external symbol
>__imp__CryptAcquireContextA@20
>
>My include path looks as follows
>
>C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE
>C:\DOCUMENTS AND SETTINGS\PETERM\DESKTOP\WPDPACK\INCLUDE
><DEFAULT visual c include paths>
>
>and my library path is
>
>C:\PROGRAM FILES\MICROSOFT SDK\LIB
>C:\DOCUMENTS AND SETTINGS\PETERM\DESKTOP\WPDPACK\LIB
>
>I'm not sure where windows is supposed to find those libraries because
>Crypt32 Lib seems to be in those directories. What am I doing wrong?
>
>-Pete
>
>--
>It sure is fun to sit around at night, look up at the stars, and think
>about billion dollar computers owned by the government that can crack
>1024-bit RSA keys in 2 minutes flat.  Makes you feel so small...

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus
README.txt (text/plain, 2.2 KB)
Libnet 1.1.1 VC++ Build instructions.
Kirby Kuehl [email protected]


Tested Platforms:
Windows 2000 SP4, Windows XP SP1

Tested IDEs:
VC++ 6.0 Service Pack 5
Visual Studio .NET 2003
Visual Studio .NET 2002

Winpcap 3.01 Developers pack: http://winpcap.polito.it/install/default.htm
Platform SDK : http://www.microsoft.com/msdownload/platformsdk/sdkupdate/


1. Extract Libnet tarball. (Probably unnecessary since you are reading 
this.)

2. Download and extract Winpcap 3.0 Beta developer's pack from 
http://winpcap.polito.it/install/default.htm
   NOTE: Must download 3.0 Beta developer's pack. Do not use earlier 
versions.

3. Open Libnet-1.1.1/win32/Libnet.dsw (If you are using VC++6.0)
        Libnet-1.1.1/win32/Libnet-1.1.1-2002.sln (If youa are using Visual 
Studio .NET 20002)
        Libnet-1.1.1/win32/Libnet-1.1.1-2003.sln (If youa are using Visual 
Studio .NET 20003)

4. To properly setup the winpcap/libpcap dependencies.

   Visual Studio .NET Instructions.
   Select Tools/Options
      Under the options dialog, select Projects and then VC++ Directories
      Select Include files.
      Add the following path
      <path>wpdpack\Include
      Select Library paths.
      Add the following path
      <path>wpdpack\Lib

   Visual C++ 6.0 Instructions
   You will need to also install the Microsoft Platform SDK in order to have 
iphlpapi.h
   The platform SDK is available here: 
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
   NOTE: The include order is important, or you will get redefinition 
errors. Put the platform sdk's directory first.

to do so select Tools/Options within Visual Studio 6.0

Select the Directories Tab
      Select Include files.
      Add the following path
	<path>Program Files\Microsoft SDK\include
	<path>wpdpack\Include
	<path>libnet\libnet-1.1.1\win32

      Select Library paths.
      Add the following path
	<path>Program Files\Microsoft SDK\Lib
        <path>wpdpack\Lib
	<path>libnet\libnet-1.1.1\win32\lib

5.Build the project opened. You will have a libnet.dll file in the debug 
folder.


6.copy the file "libnet.dll" to the directory, from which you run the .exe 
files which need libnet.(usually the debug folder of your project)