-
Notifications
You must be signed in to change notification settings - Fork 87
/
integrate_libpcap.bat
74 lines (48 loc) · 1.45 KB
/
integrate_libpcap.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
echo Copying files...
set LIBPCAP_FOLDER=..\libpcap
set LIBPCAP_TEMP_FOLDER=.\libpcap_temp
rmdir /S /Q %LIBPCAP_TEMP_FOLDER% >NUL 2>NUL
mkdir %LIBPCAP_TEMP_FOLDER% >NUL
xcopy /s/e/v %LIBPCAP_FOLDER%\*.* %LIBPCAP_TEMP_FOLDER%\ >NUL
xcopy /s/e/v /y %LIBPCAP_TEMP_FOLDER%\*.* .\wpcap\libpcap >NUL
rmdir /S /Q %LIBPCAP_TEMP_FOLDER% >NUL
set LIBPCAP_FOLDER=
set LIBPCAP_TEMP_FOLDER=
echo Copying files -- Done
echo ---------------------------------------
echo Applying remote code patch...
pushd .\wpcap\libpcap\
patch -p1 -s < remote_code.patch
chmod -R guoa+rw *
del /s *.orig >NUL 2>NUL
popd
echo Applying remote code patch -- Done
echo ---------------------------------------
echo Applying TurboCap code patch...
pushd .\wpcap\libpcap\
patch -p1 -s < tc.patch
chmod -R guoa+rw *
del /s *.orig >NUL 2>NUL
popd
echo Applying TurboCap code patch -- Done
echo ---------------------------------------
echo Applying _snprintf _MSC_VER patch...
pushd .\wpcap\libpcap\
patch -p1 -s < snprintf.patch
chmod -R guoa+rw *
del /s *.orig >NUL 2>NUL
popd
echo Applying _snprintf _MSC_VER patch -- Done
echo ---------------------------------------
echo DOS'ifing the libpcap makefile...
pushd .\wpcap\libpcap\win32\prj
unix2dos libpcap.dsp
popd
echo DOS'ifing the libpcap makefile -- Done
echo ---------------------------------------
echo Generating the compiler files...
pushd .\wpcap\prj\
call build_scanner_parser.bat
popd
echo Generating the compiler files -- Done