1211
This commit is contained in:
94
test/Detours/samples/tracessl/Makefile
Normal file
94
test/Detours/samples/tracessl/Makefile
Normal file
@@ -0,0 +1,94 @@
|
||||
##############################################################################
|
||||
##
|
||||
## Utility to trace WinSock SSL APIs.
|
||||
##
|
||||
## Microsoft Research Detours Package
|
||||
##
|
||||
## Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
##
|
||||
|
||||
!include ..\common.mak
|
||||
|
||||
LIBS=$(LIBS) kernel32.lib ws2_32.lib secur32.lib
|
||||
|
||||
##############################################################################
|
||||
|
||||
all: dirs \
|
||||
$(BIND)\trcssl$(DETOURS_BITS).dll \
|
||||
!IF $(DETOURS_SOURCE_BROWSING)==1
|
||||
$(OBJD)\trcssl$(DETOURS_BITS).bsc \
|
||||
!ENDIF
|
||||
option
|
||||
|
||||
##############################################################################
|
||||
|
||||
dirs:
|
||||
@if not exist $(BIND) mkdir $(BIND) && echo. Created $(BIND)
|
||||
@if not exist $(OBJD) mkdir $(OBJD) && echo. Created $(OBJD)
|
||||
|
||||
$(OBJD)\trcssl.obj : trcssl.cpp
|
||||
|
||||
$(OBJD)\trcssl.res : trcssl.rc
|
||||
|
||||
$(BIND)\trcssl$(DETOURS_BITS).dll : $(OBJD)\trcssl.obj $(OBJD)\trcssl.res $(DEPS)
|
||||
cl /LD $(CFLAGS) /Fe$@ /Fd$(@R).pdb \
|
||||
$(OBJD)\trcssl.obj $(OBJD)\trcssl.res \
|
||||
/link $(LINKFLAGS) /subsystem:console \
|
||||
/export:DetourFinishHelperProcess,@1,NONAME \
|
||||
$(LIBS)
|
||||
|
||||
$(OBJD)\trcssl$(DETOURS_BITS).bsc : $(OBJD)\trcssl.obj
|
||||
bscmake /v /n /o $@ $(OBJD)\trcssl.sbr
|
||||
|
||||
##############################################################################
|
||||
|
||||
clean:
|
||||
-del *~ test.txt 2>nul
|
||||
-del $(BIND)\trcssl*.* 2>nul
|
||||
-rmdir /q /s $(OBJD) 2>nul
|
||||
|
||||
realclean: clean
|
||||
-rmdir /q /s $(OBJDS) 2>nul
|
||||
|
||||
############################################### Install non-bit-size binaries.
|
||||
|
||||
!IF "$(DETOURS_OPTION_PROCESSOR)" != ""
|
||||
|
||||
$(OPTD)\trcssl$(DETOURS_OPTION_BITS).dll:
|
||||
$(OPTD)\trcssl$(DETOURS_OPTION_BITS).pdb:
|
||||
|
||||
$(BIND)\trcssl$(DETOURS_OPTION_BITS).dll : $(OPTD)\trcssl$(DETOURS_OPTION_BITS).dll
|
||||
@if exist $? copy /y $? $(BIND) >nul && echo $@ copied from $(DETOURS_OPTION_PROCESSOR).
|
||||
$(BIND)\trcssl$(DETOURS_OPTION_BITS).pdb : $(OPTD)\trcssl$(DETOURS_OPTION_BITS).pdb
|
||||
@if exist $? copy /y $? $(BIND) >nul && echo $@ copied from $(DETOURS_OPTION_PROCESSOR).
|
||||
|
||||
option: \
|
||||
$(BIND)\trcssl$(DETOURS_OPTION_BITS).dll \
|
||||
$(BIND)\trcssl$(DETOURS_OPTION_BITS).pdb \
|
||||
|
||||
!ELSE
|
||||
|
||||
option:
|
||||
|
||||
!ENDIF
|
||||
|
||||
##############################################################################
|
||||
|
||||
test: all
|
||||
@echo -------- Logging output to test.txt ------------
|
||||
start $(BIND)\syelogd.exe /o test.txt
|
||||
$(BIND)\sleep5.exe 1
|
||||
@echo -------- Should load trcssl$(DETOURS_BITS).dll dynamically using withdll.exe ------------
|
||||
@echo.
|
||||
@echo ** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE **
|
||||
@echo **
|
||||
@echo ** Close the Internet Explorer window to continue test.
|
||||
@echo **
|
||||
@echo ** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE **
|
||||
@echo.
|
||||
$(BIND)\withdll -d:$(BIND)\trcssl$(DETOURS_BITS).dll \
|
||||
"c:\program files\Internet Explorer\iexplore.exe" "https://www.microsoft.com"
|
||||
@echo -------- Log from syelog -------------
|
||||
type test.txt
|
||||
|
||||
################################################################# End of File.
|
||||
1782
test/Detours/samples/tracessl/trcssl.cpp
Normal file
1782
test/Detours/samples/tracessl/trcssl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
17
test/Detours/samples/tracessl/trcssl.rc
Normal file
17
test/Detours/samples/tracessl/trcssl.rc
Normal file
@@ -0,0 +1,17 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version information for trcssl.rc.
|
||||
//
|
||||
// Microsoft Research Detours Package
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include "detver.h"
|
||||
|
||||
#define VER_INTERNALNAME_STR "trcssl" DETOURS_STRINGIFY(DETOURS_BITS)
|
||||
#define VER_ORIGINALFILENAME_STR "trcsll" DETOURS_STRINGIFY(DETOURS_BITS) ".dll"
|
||||
#define VER_FILEDESCRIPTION_STR "Detours SSL Trace Module"
|
||||
#define VER_COMPANYNAME_STR "Microsoft Corporation"
|
||||
|
||||
#include "common.ver"
|
||||
Reference in New Issue
Block a user