checking in all the old panacean stuff
This commit is contained in:
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/CL.read.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/CL.write.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/CL.write.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/be_none.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/be_none.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/cl.command.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/cl.command.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/cmdline.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/cmdline.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/cproxy.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/cproxy.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/int64.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/int64.obj
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/link.command.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/link.command.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/link.read.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/link.read.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/link.write.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/link.write.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/logging.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/logging.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/misc.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/misc.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/mt.command.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/mt.command.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/mt.read.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/mt.read.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/mt.write.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/mt.write.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/pinger.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/pinger.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/portfwd.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/portfwd.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/proxy.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/proxy.obj
Normal file
Binary file not shown.
@@ -0,0 +1,69 @@
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\.\Release\psftp.dll
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\.\Release\psftp.dll.intermediate.manifest
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\BE_NONE.OBJ
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\cl.command.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\CL.read.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\CL.write.1.tlog
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\CMDLINE.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\CPROXY.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\INT64.OBJ
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\link.command.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\link.read.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\link.write.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\link-cvtres.read.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\link-cvtres.write.1.tlog
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\LOGGING.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\MISC.OBJ
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\mt.command.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\mt.read.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\mt.write.1.tlog
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PINGER.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PORTFWD.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PROXY.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PSFTP.DLL
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PSFTP.DLL.INTERMEDIATE.MANIFEST
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.exp
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.lib
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PSFTP.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\PSFTP.RES
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.write.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\rc.command.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\rc.read.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\rc.write.1.tlog
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SETTINGS.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SFTP.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSH.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHAES.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHARCF.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHBLOWF.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHBN.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHCRC.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHCRCDA.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHDES.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHDH.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHDSS.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHMD5.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHPUBK.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHRAND.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHRSA.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHSH256.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHSH512.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHSHA.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\SSHZLIB.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\TIMING.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\TREE234.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\VC100.PDB
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\VERSION.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WILDCARD.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINCONS.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINDEFS.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINHANDL.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINMISC.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINNET.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINNOISE.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINPGNTC.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINPROXY.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINSFTP.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINSTORE.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\WINTIME.OBJ
|
||||
C:\_ROOT_\PANACEANTECH\SFTPLUGINS\PSFTP\WINDOWS\MSVC\PSFTP\RELEASE\X11FWD.OBJ
|
||||
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.dll
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.dll
Normal file
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.exp
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.exp
Normal file
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#v4.0:v100
|
||||
Release|Win32|C:\_ROOT_\PanaceanTech\sFTPlugins\|
|
||||
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.lib
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.lib
Normal file
Binary file not shown.
350
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.log
Normal file
350
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.log
Normal file
@@ -0,0 +1,350 @@
|
||||
Build started 6/8/2011 2:32:21 AM.
|
||||
Project "C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\psftp.vcxproj" on node 2 (rebuild target(s)).
|
||||
_PrepareForClean:
|
||||
Deleting file ".\Release\psftp.lastbuildstate".
|
||||
InitializeBuildStatus:
|
||||
Creating ".\Release\psftp.unsuccessfulbuild" because "AlwaysCreate" was specified.
|
||||
ClCompile:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I..\..\..\./ /I..\..\..\charset/ /I..\..\..\windows/ /I..\..\..\unix/ /I..\..\..\mac/ /I..\..\..\macosx/ /Zi /nologo /W3 /WX- /O2 /Ob1 /Oy- /D WIN32 /D NDEBUG /D _WINDOWS /D _VC80_UPGRADE=0x0600 /D _WINDLL /D _MBCS /GF /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo".\Release\\" /Fd".\Release\vc100.pdb" /Gd /TC /analyze- /errorReport:prompt ..\..\..\be_none.c ..\..\..\cmdline.c ..\..\..\cproxy.c ..\..\..\int64.c ..\..\..\logging.c ..\..\..\misc.c ..\..\..\pinger.c ..\..\..\portfwd.c ..\..\..\proxy.c ..\..\..\psftp.c ..\..\..\settings.c ..\..\..\sftp.c ..\..\..\ssh.c ..\..\..\sshaes.c ..\..\..\ssharcf.c ..\..\..\sshblowf.c ..\..\..\sshbn.c ..\..\..\sshcrc.c ..\..\..\sshcrcda.c ..\..\..\sshdes.c ..\..\..\sshdh.c ..\..\..\sshdss.c ..\..\..\sshmd5.c ..\..\..\sshpubk.c ..\..\..\sshrand.c ..\..\..\sshrsa.c ..\..\..\sshsh256.c ..\..\..\sshsh512.c ..\..\..\sshsha.c ..\..\..\sshzlib.c ..\..\..\timing.c ..\..\..\tree234.c ..\..\..\version.c ..\..\..\wildcard.c ..\..\wincons.c ..\..\windefs.c ..\..\winhandl.c ..\..\winmisc.c ..\..\winnet.c ..\..\winnoise.c ..\..\winpgntc.c ..\..\winproxy.c ..\..\winsftp.c ..\..\winstore.c ..\..\wintime.c ..\..\..\x11fwd.c
|
||||
be_none.c
|
||||
cmdline.c
|
||||
..\..\..\cmdline.c(99): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\cmdline.c(203): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\cmdline.c(228): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\cmdline.c(266): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\cmdline.c(288): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
cproxy.c
|
||||
int64.c
|
||||
logging.c
|
||||
..\..\..\logging.c(88): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\logging.c(152): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\logging.c(274): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\logging.c(283): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\logging.c(286): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\logging.c(299): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
misc.c
|
||||
..\..\..\misc.c(140): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\misc.c(163): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\misc.c(171): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\misc.c(251): warning C4996: '_vsnprintf': This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(363) : see declaration of '_vsnprintf'
|
||||
..\..\..\misc.c(508): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\misc.c(550): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
pinger.c
|
||||
portfwd.c
|
||||
..\..\..\portfwd.c(162): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\portfwd.c(244): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\portfwd.c(416): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\portfwd.c(460): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
proxy.c
|
||||
..\..\..\proxy.c(318): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(325): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(333): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(335): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(540): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\proxy.c(542): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\proxy.c(546): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(620): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(325) : see declaration of 'sscanf'
|
||||
..\..\..\proxy.c(733): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1099): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1102): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1103): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1104): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1105): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1106): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1107): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1108): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1109): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\proxy.c(1112): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\proxy.c(1336): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(1347): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(1349): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\proxy.c(1356): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(1364): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(1372): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(1380): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(248) : see declaration of 'strnicmp'
|
||||
..\..\..\proxy.c(1383): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
psftp.c
|
||||
..\..\..\psftp.c(1714): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(325) : see declaration of 'sscanf'
|
||||
..\..\..\psftp.c(2404): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\psftp.c(2708): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\psftp.c(2713): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\psftp.c(2754): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\psftp.c(2783): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\psftp.c(2800): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
settings.c
|
||||
..\..\..\settings.c(62): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\settings.c(65): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\settings.c(186): warning C4996: 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(197) : see declaration of 'strtok'
|
||||
..\..\..\settings.c(224): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(175) : see declaration of 'strncat'
|
||||
..\..\..\settings.c(227): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(175) : see declaration of 'strncat'
|
||||
..\..\..\settings.c(384): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\settings.c(386): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\settings.c(397): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\settings.c(401): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\settings.c(684): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\settings.c(686): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(325) : see declaration of 'sscanf'
|
||||
..\..\..\settings.c(710): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\settings.c(825): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
sftp.c
|
||||
ssh.c
|
||||
..\..\..\ssh.c(268): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(246) : see declaration of 'stricmp'
|
||||
..\..\..\ssh.c(273): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(246) : see declaration of 'stricmp'
|
||||
..\..\..\ssh.c(908): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\ssh.c(2404): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\ssh.c(2762): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\ssh.c(3006): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\ssh.c(3250): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\ssh.c(3853): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\ssh.c(4132): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\..\ssh.c(4347): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\ssh.c(4818): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(325) : see declaration of 'sscanf'
|
||||
..\..\..\ssh.c(6908): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\ssh.c(7982): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(325) : see declaration of 'sscanf'
|
||||
sshaes.c
|
||||
ssharcf.c
|
||||
sshblowf.c
|
||||
sshbn.c
|
||||
sshcrc.c
|
||||
sshcrcda.c
|
||||
sshdes.c
|
||||
Generating Code...
|
||||
Compiling...
|
||||
sshdh.c
|
||||
sshdss.c
|
||||
..\..\..\sshdss.c(141): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshdss.c(148): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshdss.c(155): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshdss.c(162): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshdss.c(200): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshdss.c(203): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshdss.c(206): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
sshmd5.c
|
||||
sshpubk.c
|
||||
..\..\..\sshpubk.c(165): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(206): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(244): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(367): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(637): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(811): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshpubk.c(886): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(967): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(1148): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
..\..\..\sshpubk.c(1184): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
|
||||
sshrand.c
|
||||
sshrsa.c
|
||||
..\..\..\sshrsa.c(262): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshrsa.c(270): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshrsa.c(305): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshrsa.c(308): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshrsa.c(309): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\sshrsa.c(314): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\sshrsa.c(691): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshrsa.c(694): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\sshrsa.c(697): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
sshsh256.c
|
||||
sshsh512.c
|
||||
sshsha.c
|
||||
sshzlib.c
|
||||
timing.c
|
||||
tree234.c
|
||||
version.c
|
||||
wildcard.c
|
||||
wincons.c
|
||||
windefs.c
|
||||
..\..\windefs.c(13): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\windefs.c(27): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
winhandl.c
|
||||
winmisc.c
|
||||
..\..\winmisc.c(21): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdlib.h(433) : see declaration of 'getenv'
|
||||
..\..\winmisc.c(27): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
winnet.c
|
||||
..\..\winnet.c(469): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(471): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(488): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(501): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(505): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\winnet.c(519): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(552): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(559): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\winnet.c(562): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
winnoise.c
|
||||
..\..\winnoise.c(26): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
Generating Code...
|
||||
Compiling...
|
||||
winpgntc.c
|
||||
winproxy.c
|
||||
winsftp.c
|
||||
winstore.c
|
||||
..\..\winstore.c(297): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\winstore.c(298): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\winstore.c(300): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\winstore.c(510): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\winstore.c(517): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\winstore.c(537): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
..\..\winstore.c(547): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
wintime.c
|
||||
x11fwd.c
|
||||
..\..\..\x11fwd.c(87): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\x11fwd.c(90): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
|
||||
..\..\..\x11fwd.c(91): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\x11fwd.c(161): warning C4244: 'function' : conversion from 'time_t' to 'int', possible loss of data
|
||||
..\..\..\x11fwd.c(300): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(188) : see declaration of 'strncpy'
|
||||
..\..\..\x11fwd.c(347): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(325) : see declaration of 'sscanf'
|
||||
Generating Code...
|
||||
ResourceCompile:
|
||||
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /D NDEBUG /D _VC80_UPGRADE=0x0600 /l"0x0809" /I"\Users\Administrator\Documents\Visual Studio 2010\Projects\puttysrc\windows" /nologo /fo".\Release\psftp.res" ..\..\psftp.rc
|
||||
Link:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:".\Release\psftp.dll" /INCREMENTAL:NO /NOLOGO comctl32.lib imm32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:".\Release\psftp.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Release\psftp.lib" /MACHINE:X86 /DLL .\Release\psftp.res
|
||||
.\Release\be_none.obj
|
||||
.\Release\cmdline.obj
|
||||
.\Release\cproxy.obj
|
||||
.\Release\int64.obj
|
||||
.\Release\logging.obj
|
||||
.\Release\misc.obj
|
||||
.\Release\pinger.obj
|
||||
.\Release\portfwd.obj
|
||||
.\Release\proxy.obj
|
||||
.\Release\psftp.obj
|
||||
.\Release\settings.obj
|
||||
.\Release\sftp.obj
|
||||
.\Release\ssh.obj
|
||||
.\Release\sshaes.obj
|
||||
.\Release\ssharcf.obj
|
||||
.\Release\sshblowf.obj
|
||||
.\Release\sshbn.obj
|
||||
.\Release\sshcrc.obj
|
||||
.\Release\sshcrcda.obj
|
||||
.\Release\sshdes.obj
|
||||
.\Release\sshdh.obj
|
||||
.\Release\sshdss.obj
|
||||
.\Release\sshmd5.obj
|
||||
.\Release\sshpubk.obj
|
||||
.\Release\sshrand.obj
|
||||
.\Release\sshrsa.obj
|
||||
.\Release\sshsh256.obj
|
||||
.\Release\sshsh512.obj
|
||||
.\Release\sshsha.obj
|
||||
.\Release\sshzlib.obj
|
||||
.\Release\timing.obj
|
||||
.\Release\tree234.obj
|
||||
.\Release\version.obj
|
||||
.\Release\wildcard.obj
|
||||
.\Release\wincons.obj
|
||||
.\Release\windefs.obj
|
||||
.\Release\winhandl.obj
|
||||
.\Release\winmisc.obj
|
||||
.\Release\winnet.obj
|
||||
.\Release\winnoise.obj
|
||||
.\Release\winpgntc.obj
|
||||
.\Release\winproxy.obj
|
||||
.\Release\winsftp.obj
|
||||
.\Release\winstore.obj
|
||||
.\Release\wintime.obj
|
||||
.\Release\x11fwd.obj
|
||||
Creating library .\Release\psftp.lib and object .\Release\psftp.exp
|
||||
psftp.vcxproj -> C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\.\Release\psftp.dll
|
||||
Manifest:
|
||||
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:".\Release\psftp.dll;#2" /manifest .\Release\psftp.dll.intermediate.manifest
|
||||
FinalizeBuildStatus:
|
||||
Deleting file ".\Release\psftp.unsuccessfulbuild".
|
||||
Touching ".\Release\psftp.lastbuildstate".
|
||||
Done Building Project "C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\psftp.vcxproj" (rebuild target(s)).
|
||||
|
||||
Build succeeded.
|
||||
|
||||
Time Elapsed 00:00:15.13
|
||||
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.res
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/psftp.res
Normal file
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
^C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\psftp.vcxproj
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.lib
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.lib
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.exp
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\psftp\WINDOWS\MSVC\PSFTP\Release\psftp.exp
|
||||
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/rc.command.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/rc.command.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/rc.read.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/rc.read.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/rc.write.1.tlog
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/rc.write.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/settings.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/settings.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sftp.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sftp.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/ssh.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/ssh.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshaes.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshaes.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/ssharcf.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/ssharcf.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshblowf.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshblowf.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshbn.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshbn.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshcrc.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshcrc.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshcrcda.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshcrcda.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshdes.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshdes.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshdh.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshdh.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshdss.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshdss.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshmd5.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshmd5.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshpubk.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshpubk.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshrand.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshrand.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshrsa.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshrsa.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshsh256.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshsh256.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshsh512.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshsh512.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshsha.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshsha.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshzlib.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/sshzlib.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/timing.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/timing.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/tree234.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/tree234.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/vc100.pdb
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/vc100.pdb
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/version.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/version.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/wildcard.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/wildcard.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/wincons.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/wincons.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/windefs.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/windefs.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winhandl.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winhandl.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winmisc.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winmisc.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winnet.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winnet.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winnoise.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winnoise.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winpgntc.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winpgntc.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winproxy.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winproxy.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winsftp.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winsftp.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winstore.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/winstore.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/wintime.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/wintime.obj
Normal file
Binary file not shown.
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/x11fwd.obj
Normal file
BIN
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/Release/x11fwd.obj
Normal file
Binary file not shown.
235
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj
Normal file
235
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj
Normal file
@@ -0,0 +1,235 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<UseOfAtl>false</UseOfAtl>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>.\Release\</OutDir>
|
||||
<IntDir>.\Release\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>.\Debug\</OutDir>
|
||||
<IntDir>.\Debug\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<StringPooling>true</StringPooling>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<AdditionalIncludeDirectories>..\..\..\./;..\..\..\charset/;..\..\..\windows/;..\..\..\unix/;..\..\..\mac/;..\..\..\macosx/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerListingLocation>.\Release\</AssemblerListingLocation>
|
||||
<PrecompiledHeaderOutputFile>.\Release\psftp.pch</PrecompiledHeaderOutputFile>
|
||||
<ObjectFileName>.\Release\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Release\psftp.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0809</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\psftp.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OutputFile>.\Release\psftp.dll</OutputFile>
|
||||
<AdditionalDependencies>comctl32.lib;imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level2</WarningLevel>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalIncludeDirectories>..\..\..\./;..\..\..\charset/;..\..\..\windows/;..\..\..\unix/;..\..\..\mac/;..\..\..\macosx/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
|
||||
<PrecompiledHeaderOutputFile>.\Debug\psftp.pch</PrecompiledHeaderOutputFile>
|
||||
<ObjectFileName>.\Debug\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Debug\psftp.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0809</Culture>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug\psftp.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>NotSet</SubSystem>
|
||||
<OutputFile>.\Debug\psftp.dll</OutputFile>
|
||||
<AdditionalDependencies>comctl32.lib;imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\be_none.c" />
|
||||
<ClCompile Include="..\..\..\cmdline.c" />
|
||||
<ClCompile Include="..\..\..\cproxy.c" />
|
||||
<ClCompile Include="..\..\..\int64.c" />
|
||||
<ClCompile Include="..\..\..\logging.c" />
|
||||
<ClCompile Include="..\..\..\misc.c" />
|
||||
<ClCompile Include="..\..\..\pinger.c" />
|
||||
<ClCompile Include="..\..\..\portfwd.c" />
|
||||
<ClCompile Include="..\..\..\proxy.c" />
|
||||
<ClCompile Include="..\..\..\psftp.c">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EditAndContinue</DebugInformationFormat>
|
||||
<MinimalRebuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</MinimalRebuild>
|
||||
<ExceptionHandling Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Sync</ExceptionHandling>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\settings.c" />
|
||||
<ClCompile Include="..\..\..\sftp.c" />
|
||||
<ClCompile Include="..\..\..\ssh.c">
|
||||
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshaes.c" />
|
||||
<ClCompile Include="..\..\..\ssharcf.c" />
|
||||
<ClCompile Include="..\..\..\sshblowf.c" />
|
||||
<ClCompile Include="..\..\..\sshbn.c" />
|
||||
<ClCompile Include="..\..\..\sshcrc.c" />
|
||||
<ClCompile Include="..\..\..\sshcrcda.c" />
|
||||
<ClCompile Include="..\..\..\sshdes.c" />
|
||||
<ClCompile Include="..\..\..\sshdh.c" />
|
||||
<ClCompile Include="..\..\..\sshdss.c" />
|
||||
<ClCompile Include="..\..\..\sshmd5.c" />
|
||||
<ClCompile Include="..\..\..\sshpubk.c" />
|
||||
<ClCompile Include="..\..\..\sshrand.c" />
|
||||
<ClCompile Include="..\..\..\sshrsa.c" />
|
||||
<ClCompile Include="..\..\..\sshsh256.c" />
|
||||
<ClCompile Include="..\..\..\sshsh512.c" />
|
||||
<ClCompile Include="..\..\..\sshsha.c" />
|
||||
<ClCompile Include="..\..\..\sshzlib.c" />
|
||||
<ClCompile Include="..\..\..\timing.c" />
|
||||
<ClCompile Include="..\..\..\tree234.c" />
|
||||
<ClCompile Include="..\..\..\version.c" />
|
||||
<ClCompile Include="..\..\..\wildcard.c" />
|
||||
<ClCompile Include="..\..\wincons.c" />
|
||||
<ClCompile Include="..\..\windefs.c" />
|
||||
<ClCompile Include="..\..\winhandl.c" />
|
||||
<ClCompile Include="..\..\winmisc.c" />
|
||||
<ClCompile Include="..\..\winnet.c" />
|
||||
<ClCompile Include="..\..\winnoise.c" />
|
||||
<ClCompile Include="..\..\winpgntc.c" />
|
||||
<ClCompile Include="..\..\winproxy.c" />
|
||||
<ClCompile Include="..\..\winsftp.c" />
|
||||
<ClCompile Include="..\..\winstore.c" />
|
||||
<ClCompile Include="..\..\wintime.c" />
|
||||
<ClCompile Include="..\..\..\x11fwd.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\charset\charset.h" />
|
||||
<ClInclude Include="..\..\..\int64.h" />
|
||||
<ClInclude Include="..\..\..\mac\macstuff.h" />
|
||||
<ClInclude Include="..\..\..\macosx\osx.h" />
|
||||
<ClInclude Include="..\..\..\misc.h" />
|
||||
<ClInclude Include="..\..\..\network.h" />
|
||||
<ClInclude Include="..\..\..\proxy.h" />
|
||||
<ClInclude Include="..\..\..\psftp.h" />
|
||||
<ClInclude Include="..\..\..\putty.h" />
|
||||
<ClInclude Include="..\..\..\puttymem.h" />
|
||||
<ClInclude Include="..\..\..\puttyps.h" />
|
||||
<ClInclude Include="..\..\..\sftp.h" />
|
||||
<ClInclude Include="..\..\..\ssh.h" />
|
||||
<ClInclude Include="..\..\..\storage.h" />
|
||||
<ClInclude Include="..\..\..\tree234.h" />
|
||||
<ClInclude Include="..\..\..\unix\unix.h" />
|
||||
<ClInclude Include="..\..\rcstuff.h" />
|
||||
<ClInclude Include="..\..\winhelp.h" />
|
||||
<ClInclude Include="..\..\winstuff.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\pscp.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\psftp.rc">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\Users\Administrator\Documents\Visual Studio 2010\Projects\puttysrc\windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\Users\Administrator\Documents\Visual Studio 2010\Projects\puttysrc\windows;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
226
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj.filters
Normal file
226
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj.filters
Normal file
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{84c2839c-301d-4e71-9c85-205c8a158cea}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{c9ba2af2-8fde-44a0-b64c-4267eeca332c}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{c604c669-3670-4b54-bb27-56b066b5ad4b}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\be_none.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\cmdline.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\cproxy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\int64.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\logging.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\misc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\pinger.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\portfwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\proxy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\psftp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\settings.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sftp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\ssh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshaes.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\ssharcf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshblowf.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshbn.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshcrc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshcrcda.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshdes.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshdh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshdss.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshmd5.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshpubk.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshrand.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshrsa.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshsh256.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshsh512.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshsha.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\sshzlib.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\timing.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\tree234.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\version.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\wildcard.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\wincons.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\windefs.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winhandl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winmisc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winnet.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winnoise.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winpgntc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winproxy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winsftp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\winstore.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\wintime.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\x11fwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\charset\charset.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\int64.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\mac\macstuff.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\macosx\osx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\misc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\network.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\proxy.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\psftp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\putty.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\puttymem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\puttyps.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\sftp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\ssh.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\storage.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\tree234.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\unix\unix.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\rcstuff.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\winhelp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\winstuff.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\psftp.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\pscp.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
3
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj.user
Normal file
3
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj.user
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
10
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj.vspscc
Normal file
10
sFTPlugins/psftp/WINDOWS/MSVC/PSFTP/psftp.vcxproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
BIN
sFTPlugins/psftp/WINDOWS/PSCP.ICO
Normal file
BIN
sFTPlugins/psftp/WINDOWS/PSCP.ICO
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
8
sFTPlugins/psftp/WINDOWS/PSFTP.RC
Normal file
8
sFTPlugins/psftp/WINDOWS/PSFTP.RC
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "rcstuff.h"
|
||||
|
||||
#define APPNAME "PSFTP"
|
||||
#define APPDESC "Command-line interactive SFTP client"
|
||||
|
||||
200 ICON "pscp.ico"
|
||||
|
||||
#include "version.rc2"
|
||||
50
sFTPlugins/psftp/WINDOWS/RCSTUFF.H
Normal file
50
sFTPlugins/psftp/WINDOWS/RCSTUFF.H
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Miscellaneous stuff to include in all .rc files.
|
||||
*/
|
||||
|
||||
#ifndef PUTTY_RCSTUFF_H
|
||||
#define PUTTY_RCSTUFF_H
|
||||
|
||||
#ifdef __LCC__
|
||||
#include <win.h>
|
||||
#else
|
||||
|
||||
/* Some compilers, like Borland, don't have winresrc.h */
|
||||
#ifndef NO_WINRESRC_H
|
||||
#ifndef MSVC4
|
||||
#include <winresrc.h>
|
||||
#else
|
||||
#include <winres.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* end #ifdef __LCC__ */
|
||||
|
||||
/* Some systems don't define this, so I do it myself if necessary */
|
||||
#ifndef TCS_MULTILINE
|
||||
#define TCS_MULTILINE 0x0200
|
||||
#endif
|
||||
|
||||
/* Likewise */
|
||||
#ifndef RT_MANIFEST
|
||||
#define RT_MANIFEST 24
|
||||
#endif
|
||||
|
||||
/* LCC is the offender here. */
|
||||
#ifndef VS_FF_DEBUG
|
||||
#define VS_FF_DEBUG 1
|
||||
#endif
|
||||
#ifndef VS_FF_PRERELEASE
|
||||
#define VS_FF_PRERELEASE 2
|
||||
#endif
|
||||
#ifndef VS_FF_PRIVATEBUILD
|
||||
#define VS_FF_PRIVATEBUILD 8
|
||||
#endif
|
||||
#ifndef VOS__WINDOWS32
|
||||
#define VOS__WINDOWS32 4
|
||||
#endif
|
||||
#ifndef VFT_APP
|
||||
#define VFT_APP 1
|
||||
#endif
|
||||
|
||||
#endif /* PUTTY_RCSTUFF_H */
|
||||
134
sFTPlugins/psftp/WINDOWS/VERSION.RC2
Normal file
134
sFTPlugins/psftp/WINDOWS/VERSION.RC2
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Standard Windows version information.
|
||||
* (For inclusion in other .rc files with appropriate macro definitions.)
|
||||
* FIXME: This file is called '.rc2' rather than '.rc' to avoid MSVC trying
|
||||
* to compile it on its own when using the project files. Nicer solutions
|
||||
* welcome.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Binary versions in Windows are major.minor.build.revision. Each
|
||||
* component is 16-bit.
|
||||
* Here we have:
|
||||
* major.minor
|
||||
* PuTTY version number (e.g. 0.58). (We've made a policy decision
|
||||
* that these will be numeric from now on.)
|
||||
* Present in releases and snapshots (for the sake of monotonicity
|
||||
* in version numbers).
|
||||
* build
|
||||
* In releases, always 0.
|
||||
* In snapshots, nearest Subversion revision. (It shouldn't be
|
||||
* assumed that only one binary will have a given build number, of
|
||||
* course.)
|
||||
* revision
|
||||
* Reserved; always 0.
|
||||
*
|
||||
* Examples of these version numbers:
|
||||
* Release: 0.58.0.0 (but 0.58 didn't have a VERSIONINFO resource)
|
||||
* Snapshot: 0.58.6356.0 (between 0.58 and the next release)
|
||||
* Local: 0.0.0.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* Mechanics of version naming/numbering.
|
||||
* (This is a ripoff of ../version.c.)
|
||||
*/
|
||||
|
||||
#define STR1(x) #x
|
||||
#define STR(x) STR1(x)
|
||||
|
||||
/* We keep this around even for snapshots, for monotonicity of version
|
||||
* numbering. It needs to be kept up to date. NB _comma_-separated. */
|
||||
#define BASE_VERSION 0,60
|
||||
|
||||
#if defined SNAPSHOT
|
||||
|
||||
/* Make SVN_REV mandatory for snapshots, to avoid issuing binary
|
||||
* version numbers that look like full releases. */
|
||||
#ifndef SVN_REV
|
||||
#error SVN_REV not defined/nonzero for snapshot build
|
||||
#endif
|
||||
|
||||
#define VERSION_TEXT "Development snapshot " STR(SNAPSHOT) ":r" STR(SVN_REV)
|
||||
#ifdef MODIFIED
|
||||
#define BINARY_VERSION 0,0,0,0
|
||||
#else
|
||||
#define BINARY_VERSION BASE_VERSION,SVN_REV,0
|
||||
#endif
|
||||
|
||||
#elif defined RELEASE
|
||||
|
||||
#define VERSION_TEXT "Release " STR(RELEASE)
|
||||
#define BINARY_VERSION BASE_VERSION,0,0
|
||||
|
||||
#elif defined SVN_REV
|
||||
|
||||
#define VERSION_TEXT "Custom build r" STR(SVN_REV)
|
||||
#ifdef MODIFIED
|
||||
#define BINARY_VERSION 0,0,0,0
|
||||
#else
|
||||
#define BINARY_VERSION BASE_VERSION,SVN_REV,0
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/* We can't reliably get the same date and time as version.c, so
|
||||
* we won't bother trying. */
|
||||
#define VERSION_TEXT "Unidentified build"
|
||||
#define BINARY_VERSION 0,0,0,0
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The actual VERSIONINFO resource.
|
||||
*/
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
/* (None of this "fixed" info appears to be trivially user-visible on
|
||||
* Win98SE. The binary version does show up on Win2K.) */
|
||||
FILEVERSION BINARY_VERSION
|
||||
PRODUCTVERSION BINARY_VERSION /* version of whole suite */
|
||||
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PRIVATEBUILD
|
||||
FILEFLAGS 0x0L
|
||||
#if defined DEBUG
|
||||
| VS_FF_DEBUG
|
||||
#endif
|
||||
#if defined SNAPSHOT
|
||||
| VS_FF_PRERELEASE
|
||||
#elif !defined RELEASE
|
||||
| VS_FF_PRIVATEBUILD
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE 0x0L /* n/a for VFT_APP */
|
||||
BEGIN
|
||||
/* (On Win98SE and Win2K, we can see most of this on the Version tab
|
||||
* in the file properties in Explorer.) */
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
/* "lang-charset" LLLLCCCC = (UK English, Unicode) */
|
||||
BLOCK "080904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Simon Tatham" /* required :/ */
|
||||
VALUE "ProductName", "PuTTY suite"
|
||||
VALUE "FileDescription", APPDESC
|
||||
VALUE "InternalName", APPNAME
|
||||
VALUE "OriginalFilename", APPNAME
|
||||
VALUE "FileVersion", VERSION_TEXT
|
||||
VALUE "ProductVersion", VERSION_TEXT
|
||||
VALUE "LegalCopyright", "Copyright \251 1997-2007 Simon Tatham."
|
||||
#if (!defined SNAPSHOT) && (!defined RELEASE)
|
||||
/* Only if VS_FF_PRIVATEBUILD. */
|
||||
VALUE "PrivateBuild", VERSION_TEXT /* NBI */
|
||||
#endif
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
/* Once again -- same meanings -- apparently necessary */
|
||||
VALUE "Translation", 0x809, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#undef VERSION_TEXT
|
||||
#undef BASE_VERSION
|
||||
#undef BINARY_VERSION
|
||||
397
sFTPlugins/psftp/WINDOWS/WINCONS.C
Normal file
397
sFTPlugins/psftp/WINDOWS/WINCONS.C
Normal file
@@ -0,0 +1,397 @@
|
||||
/*
|
||||
* wincons.c - various interactive-prompt routines shared between
|
||||
* the Windows console PuTTY tools
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "putty.h"
|
||||
#include "storage.h"
|
||||
#include "ssh.h"
|
||||
|
||||
int console_batch_mode = FALSE;
|
||||
|
||||
static void *console_logctx = NULL;
|
||||
|
||||
/*
|
||||
* Clean up and exit.
|
||||
*/
|
||||
void cleanup_exit(int code)
|
||||
{
|
||||
/*
|
||||
* Clean up.
|
||||
*/
|
||||
sk_cleanup();
|
||||
|
||||
random_save_seed();
|
||||
#ifdef MSCRYPTOAPI
|
||||
crypto_wrapup();
|
||||
#endif
|
||||
|
||||
exit(code);
|
||||
}
|
||||
|
||||
void set_busy_status(void *frontend, int status)
|
||||
{
|
||||
}
|
||||
|
||||
void notify_remote_exit(void *frontend)
|
||||
{
|
||||
}
|
||||
|
||||
void timer_change_notify(long next)
|
||||
{
|
||||
}
|
||||
|
||||
int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
char *keystr, char *fingerprint,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
int ret;
|
||||
HANDLE hin;
|
||||
DWORD savemode, i;
|
||||
|
||||
static const char absentmsg_batch[] =
|
||||
"The server's host key is not cached in the registry. You\n"
|
||||
"have no guarantee that the server is the computer you\n"
|
||||
"think it is.\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char absentmsg[] =
|
||||
"The server's host key is not cached in the registry. You\n"
|
||||
"have no guarantee that the server is the computer you\n"
|
||||
"think it is.\n"
|
||||
"The server's %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you trust this host, enter \"y\" to add the key to\n"
|
||||
"PuTTY's cache and carry on connecting.\n"
|
||||
"If you want to carry on connecting just once, without\n"
|
||||
"adding the key to the cache, enter \"n\".\n"
|
||||
"If you do not trust this host, press Return to abandon the\n"
|
||||
"connection.\n"
|
||||
"Store key in cache? (y/n) ";
|
||||
|
||||
static const char wrongmsg_batch[] =
|
||||
"WARNING - POTENTIAL SECURITY BREACH!\n"
|
||||
"The server's host key does not match the one PuTTY has\n"
|
||||
"cached in the registry. This means that either the\n"
|
||||
"server administrator has changed the host key, or you\n"
|
||||
"have actually connected to another computer pretending\n"
|
||||
"to be the server.\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char wrongmsg[] =
|
||||
"WARNING - POTENTIAL SECURITY BREACH!\n"
|
||||
"The server's host key does not match the one PuTTY has\n"
|
||||
"cached in the registry. This means that either the\n"
|
||||
"server administrator has changed the host key, or you\n"
|
||||
"have actually connected to another computer pretending\n"
|
||||
"to be the server.\n"
|
||||
"The new %s key fingerprint is:\n"
|
||||
"%s\n"
|
||||
"If you were expecting this change and trust the new key,\n"
|
||||
"enter \"y\" to update PuTTY's cache and continue connecting.\n"
|
||||
"If you want to carry on connecting but without updating\n"
|
||||
"the cache, enter \"n\".\n"
|
||||
"If you want to abandon the connection completely, press\n"
|
||||
"Return to cancel. Pressing Return is the ONLY guaranteed\n"
|
||||
"safe choice.\n"
|
||||
"Update cached key? (y/n, Return cancels connection) ";
|
||||
|
||||
static const char abandoned[] = "Connection abandoned.\n";
|
||||
|
||||
char line[32];
|
||||
|
||||
/*
|
||||
* Verify the key against the registry.
|
||||
*/
|
||||
ret = verify_host_key(host, port, keytype, keystr);
|
||||
|
||||
if (ret == 0) /* success - key matched OK */
|
||||
return 1;
|
||||
|
||||
/* Added by DR - Start*/
|
||||
store_host_key(host, port, keytype, keystr);
|
||||
return 1;
|
||||
/* Added by DR - End*/
|
||||
|
||||
if (ret == 2) { /* key was different */
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, wrongmsg_batch, keytype, fingerprint);
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, wrongmsg, keytype, fingerprint);
|
||||
fflush(stderr);
|
||||
}
|
||||
if (ret == 1) { /* key was absent */
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, absentmsg_batch, keytype, fingerprint);
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, absentmsg, keytype, fingerprint);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
hin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
GetConsoleMode(hin, &savemode);
|
||||
SetConsoleMode(hin, (savemode | ENABLE_ECHO_INPUT |
|
||||
ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT));
|
||||
ReadFile(hin, line, sizeof(line) - 1, &i, NULL);
|
||||
SetConsoleMode(hin, savemode);
|
||||
|
||||
if (line[0] != '\0' && line[0] != '\r' && line[0] != '\n') {
|
||||
if (line[0] == 'y' || line[0] == 'Y')
|
||||
store_host_key(host, port, keytype, keystr);
|
||||
return 1;
|
||||
} else {
|
||||
fprintf(stderr, abandoned);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void update_specials_menu(void *frontend)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Ask whether the selected algorithm is acceptable (since it was
|
||||
* below the configured 'warn' threshold).
|
||||
*/
|
||||
int askalg(void *frontend, const char *algtype, const char *algname,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
HANDLE hin;
|
||||
DWORD savemode, i;
|
||||
|
||||
static const char msg[] =
|
||||
"The first %s supported by the server is\n"
|
||||
"%s, which is below the configured warning threshold.\n"
|
||||
"Continue with connection? (y/n) ";
|
||||
static const char msg_batch[] =
|
||||
"The first %s supported by the server is\n"
|
||||
"%s, which is below the configured warning threshold.\n"
|
||||
"Connection abandoned.\n";
|
||||
static const char abandoned[] = "Connection abandoned.\n";
|
||||
|
||||
char line[32];
|
||||
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, msg_batch, algtype, algname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, msg, algtype, algname);
|
||||
fflush(stderr);
|
||||
|
||||
hin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
GetConsoleMode(hin, &savemode);
|
||||
SetConsoleMode(hin, (savemode | ENABLE_ECHO_INPUT |
|
||||
ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT));
|
||||
ReadFile(hin, line, sizeof(line) - 1, &i, NULL);
|
||||
SetConsoleMode(hin, savemode);
|
||||
|
||||
if (line[0] == 'y' || line[0] == 'Y') {
|
||||
return 1;
|
||||
} else {
|
||||
fprintf(stderr, abandoned);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Ask whether to wipe a session log file before writing to it.
|
||||
* Returns 2 for wipe, 1 for append, 0 for cancel (don't log).
|
||||
*/
|
||||
int askappend(void *frontend, Filename filename,
|
||||
void (*callback)(void *ctx, int result), void *ctx)
|
||||
{
|
||||
HANDLE hin;
|
||||
DWORD savemode, i;
|
||||
|
||||
static const char msgtemplate[] =
|
||||
"The session log file \"%.*s\" already exists.\n"
|
||||
"You can overwrite it with a new session log,\n"
|
||||
"append your session log to the end of it,\n"
|
||||
"or disable session logging for this session.\n"
|
||||
"Enter \"y\" to wipe the file, \"n\" to append to it,\n"
|
||||
"or just press Return to disable logging.\n"
|
||||
"Wipe the log file? (y/n, Return cancels logging) ";
|
||||
|
||||
static const char msgtemplate_batch[] =
|
||||
"The session log file \"%.*s\" already exists.\n"
|
||||
"Logging will not be enabled.\n";
|
||||
|
||||
char line[32];
|
||||
|
||||
if (console_batch_mode) {
|
||||
fprintf(stderr, msgtemplate_batch, FILENAME_MAX, filename.path);
|
||||
fflush(stderr);
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, msgtemplate, FILENAME_MAX, filename.path);
|
||||
fflush(stderr);
|
||||
|
||||
hin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
GetConsoleMode(hin, &savemode);
|
||||
SetConsoleMode(hin, (savemode | ENABLE_ECHO_INPUT |
|
||||
ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT));
|
||||
ReadFile(hin, line, sizeof(line) - 1, &i, NULL);
|
||||
SetConsoleMode(hin, savemode);
|
||||
|
||||
if (line[0] == 'y' || line[0] == 'Y')
|
||||
return 2;
|
||||
else if (line[0] == 'n' || line[0] == 'N')
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Warn about the obsolescent key file format.
|
||||
*
|
||||
* Uniquely among these functions, this one does _not_ expect a
|
||||
* frontend handle. This means that if PuTTY is ported to a
|
||||
* platform which requires frontend handles, this function will be
|
||||
* an anomaly. Fortunately, the problem it addresses will not have
|
||||
* been present on that platform, so it can plausibly be
|
||||
* implemented as an empty function.
|
||||
*/
|
||||
void old_keyfile_warning(void)
|
||||
{
|
||||
static const char message[] =
|
||||
"You are loading an SSH-2 private key which has an\n"
|
||||
"old version of the file format. This means your key\n"
|
||||
"file is not fully tamperproof. Future versions of\n"
|
||||
"PuTTY may stop supporting this private key format,\n"
|
||||
"so we recommend you convert your key to the new\n"
|
||||
"format.\n"
|
||||
"\n"
|
||||
"Once the key is loaded into PuTTYgen, you can perform\n"
|
||||
"this conversion simply by saving it again.\n";
|
||||
|
||||
fputs(message, stderr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the fingerprints of the PGP Master Keys to the user.
|
||||
*/
|
||||
void pgp_fingerprints(void)
|
||||
{
|
||||
fputs("These are the fingerprints of the PuTTY PGP Master Keys. They can\n"
|
||||
"be used to establish a trust path from this executable to another\n"
|
||||
"one. See the manual for more information.\n"
|
||||
"(Note: these fingerprints have nothing to do with SSH!)\n"
|
||||
"\n"
|
||||
"PuTTY Master Key (RSA), 1024-bit:\n"
|
||||
" " PGP_RSA_MASTER_KEY_FP "\n"
|
||||
"PuTTY Master Key (DSA), 1024-bit:\n"
|
||||
" " PGP_DSA_MASTER_KEY_FP "\n", stdout);
|
||||
}
|
||||
|
||||
void console_provide_logctx(void *logctx)
|
||||
{
|
||||
console_logctx = logctx;
|
||||
}
|
||||
|
||||
void logevent(void *frontend, const char *string)
|
||||
{
|
||||
log_eventlog(console_logctx, string);
|
||||
}
|
||||
|
||||
static void console_data_untrusted(HANDLE hout, const char *data, int len)
|
||||
{
|
||||
DWORD dummy;
|
||||
/* FIXME: control-character filtering */
|
||||
WriteFile(hout, data, len, &dummy, NULL);
|
||||
}
|
||||
|
||||
int console_get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
|
||||
{
|
||||
HANDLE hin, hout;
|
||||
size_t curr_prompt;
|
||||
|
||||
/*
|
||||
* Zero all the results, in case we abort half-way through.
|
||||
*/
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < (int)p->n_prompts; i++)
|
||||
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
|
||||
}
|
||||
|
||||
if (console_batch_mode)
|
||||
return 0;
|
||||
|
||||
hin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
hout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
if (hin == INVALID_HANDLE_VALUE || hout == INVALID_HANDLE_VALUE) {
|
||||
fprintf(stderr, "Cannot get standard input/output handles\n");
|
||||
cleanup_exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Preamble.
|
||||
*/
|
||||
/* We only print the `name' caption if we have to... */
|
||||
if (p->name_reqd && p->name) {
|
||||
size_t l = strlen(p->name);
|
||||
console_data_untrusted(hout, p->name, l);
|
||||
if (p->name[l-1] != '\n')
|
||||
console_data_untrusted(hout, "\n", 1);
|
||||
}
|
||||
/* ...but we always print any `instruction'. */
|
||||
if (p->instruction) {
|
||||
size_t l = strlen(p->instruction);
|
||||
console_data_untrusted(hout, p->instruction, l);
|
||||
if (p->instruction[l-1] != '\n')
|
||||
console_data_untrusted(hout, "\n", 1);
|
||||
}
|
||||
|
||||
for (curr_prompt = 0; curr_prompt < p->n_prompts; curr_prompt++) {
|
||||
|
||||
DWORD savemode, newmode, i = 0;
|
||||
prompt_t *pr = p->prompts[curr_prompt];
|
||||
BOOL r;
|
||||
|
||||
GetConsoleMode(hin, &savemode);
|
||||
newmode = savemode | ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT;
|
||||
if (!pr->echo)
|
||||
newmode &= ~ENABLE_ECHO_INPUT;
|
||||
else
|
||||
newmode |= ENABLE_ECHO_INPUT;
|
||||
SetConsoleMode(hin, newmode);
|
||||
|
||||
console_data_untrusted(hout, pr->prompt, strlen(pr->prompt));
|
||||
|
||||
r = ReadFile(hin, pr->result, pr->result_len - 1, &i, NULL);
|
||||
|
||||
SetConsoleMode(hin, savemode);
|
||||
|
||||
if ((int) i > pr->result_len)
|
||||
i = pr->result_len - 1;
|
||||
else
|
||||
i = i - 2;
|
||||
pr->result[i] = '\0';
|
||||
|
||||
if (!pr->echo) {
|
||||
DWORD dummy;
|
||||
WriteFile(hout, "\r\n", 2, &dummy, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 1; /* success */
|
||||
|
||||
}
|
||||
|
||||
void frontend_keypress(void *handle)
|
||||
{
|
||||
/*
|
||||
* This is nothing but a stub, in console code.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
43
sFTPlugins/psftp/WINDOWS/WINDEFS.C
Normal file
43
sFTPlugins/psftp/WINDOWS/WINDEFS.C
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* windefs.c: default settings that are specific to Windows.
|
||||
*/
|
||||
|
||||
#include "putty.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
FontSpec platform_default_fontspec(const char *name)
|
||||
{
|
||||
FontSpec ret;
|
||||
if (!strcmp(name, "Font")) {
|
||||
strcpy(ret.name, "Courier New");
|
||||
ret.isbold = 0;
|
||||
ret.charset = ANSI_CHARSET;
|
||||
ret.height = 10;
|
||||
} else {
|
||||
ret.name[0] = '\0';
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Filename platform_default_filename(const char *name)
|
||||
{
|
||||
Filename ret;
|
||||
if (!strcmp(name, "LogFileName"))
|
||||
strcpy(ret.path, "putty.log");
|
||||
else
|
||||
*ret.path = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *platform_default_s(const char *name)
|
||||
{
|
||||
if (!strcmp(name, "SerialLine"))
|
||||
return dupstr("COM1");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int platform_default_i(const char *name, int def)
|
||||
{
|
||||
return def;
|
||||
}
|
||||
587
sFTPlugins/psftp/WINDOWS/WINHANDL.C
Normal file
587
sFTPlugins/psftp/WINDOWS/WINHANDL.C
Normal file
@@ -0,0 +1,587 @@
|
||||
/*
|
||||
* winhandl.c: Module to give Windows front ends the general
|
||||
* ability to deal with consoles, pipes, serial ports, or any other
|
||||
* type of data stream accessed through a Windows API HANDLE rather
|
||||
* than a WinSock SOCKET.
|
||||
*
|
||||
* We do this by spawning a subthread to continuously try to read
|
||||
* from the handle. Every time a read successfully returns some
|
||||
* data, the subthread sets an event object which is picked up by
|
||||
* the main thread, and the main thread then sets an event in
|
||||
* return to instruct the subthread to resume reading.
|
||||
*
|
||||
* Output works precisely the other way round, in a second
|
||||
* subthread. The output subthread should not be attempting to
|
||||
* write all the time, because it hasn't always got data _to_
|
||||
* write; so the output thread waits for an event object notifying
|
||||
* it to _attempt_ a write, and then it sets an event in return
|
||||
* when one completes.
|
||||
*
|
||||
* (It's terribly annoying having to spawn a subthread for each
|
||||
* direction of each handle. Technically it isn't necessary for
|
||||
* serial ports, since we could use overlapped I/O within the main
|
||||
* thread and wait directly on the event objects in the OVERLAPPED
|
||||
* structures. However, we can't use this trick for some types of
|
||||
* file handle at all - for some reason Windows restricts use of
|
||||
* OVERLAPPED to files which were opened with the overlapped flag -
|
||||
* and so we must use threads for those. This being the case, it's
|
||||
* simplest just to use threads for everything rather than trying
|
||||
* to keep track of multiple completely separate mechanisms.)
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "putty.h"
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Generic definitions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Maximum amount of backlog we will allow to build up on an input
|
||||
* handle before we stop reading from it.
|
||||
*/
|
||||
#define MAX_BACKLOG 32768
|
||||
|
||||
struct handle_generic {
|
||||
/*
|
||||
* Initial fields common to both handle_input and handle_output
|
||||
* structures.
|
||||
*
|
||||
* The three HANDLEs are set up at initialisation time and are
|
||||
* thereafter read-only to both main thread and subthread.
|
||||
* `moribund' is only used by the main thread; `done' is
|
||||
* written by the main thread before signalling to the
|
||||
* subthread. `defunct' and `busy' are used only by the main
|
||||
* thread.
|
||||
*/
|
||||
HANDLE h; /* the handle itself */
|
||||
HANDLE ev_to_main; /* event used to signal main thread */
|
||||
HANDLE ev_from_main; /* event used to signal back to us */
|
||||
int moribund; /* are we going to kill this soon? */
|
||||
int done; /* request subthread to terminate */
|
||||
int defunct; /* has the subthread already gone? */
|
||||
int busy; /* operation currently in progress? */
|
||||
void *privdata; /* for client to remember who they are */
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Input threads.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Data required by an input thread.
|
||||
*/
|
||||
struct handle_input {
|
||||
/*
|
||||
* Copy of the handle_generic structure.
|
||||
*/
|
||||
HANDLE h; /* the handle itself */
|
||||
HANDLE ev_to_main; /* event used to signal main thread */
|
||||
HANDLE ev_from_main; /* event used to signal back to us */
|
||||
int moribund; /* are we going to kill this soon? */
|
||||
int done; /* request subthread to terminate */
|
||||
int defunct; /* has the subthread already gone? */
|
||||
int busy; /* operation currently in progress? */
|
||||
void *privdata; /* for client to remember who they are */
|
||||
|
||||
/*
|
||||
* Data set at initialisation and then read-only.
|
||||
*/
|
||||
int flags;
|
||||
|
||||
/*
|
||||
* Data set by the input thread before signalling ev_to_main,
|
||||
* and read by the main thread after receiving that signal.
|
||||
*/
|
||||
char buffer[4096]; /* the data read from the handle */
|
||||
DWORD len; /* how much data that was */
|
||||
int readerr; /* lets us know about read errors */
|
||||
|
||||
/*
|
||||
* Callback function called by this module when data arrives on
|
||||
* an input handle.
|
||||
*/
|
||||
handle_inputfn_t gotdata;
|
||||
};
|
||||
|
||||
/*
|
||||
* The actual thread procedure for an input thread.
|
||||
*/
|
||||
static DWORD WINAPI handle_input_threadfunc(void *param)
|
||||
{
|
||||
struct handle_input *ctx = (struct handle_input *) param;
|
||||
OVERLAPPED ovl, *povl;
|
||||
HANDLE oev;
|
||||
int readret, readlen;
|
||||
|
||||
if (ctx->flags & HANDLE_FLAG_OVERLAPPED) {
|
||||
povl = &ovl;
|
||||
oev = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
} else {
|
||||
povl = NULL;
|
||||
}
|
||||
|
||||
if (ctx->flags & HANDLE_FLAG_UNITBUFFER)
|
||||
readlen = 1;
|
||||
else
|
||||
readlen = sizeof(ctx->buffer);
|
||||
|
||||
while (1) {
|
||||
if (povl) {
|
||||
memset(povl, 0, sizeof(OVERLAPPED));
|
||||
povl->hEvent = oev;
|
||||
}
|
||||
readret = ReadFile(ctx->h, ctx->buffer,readlen, &ctx->len, povl);
|
||||
if (!readret)
|
||||
ctx->readerr = GetLastError();
|
||||
else
|
||||
ctx->readerr = 0;
|
||||
if (povl && !readret && ctx->readerr == ERROR_IO_PENDING) {
|
||||
WaitForSingleObject(povl->hEvent, INFINITE);
|
||||
readret = GetOverlappedResult(ctx->h, povl, &ctx->len, FALSE);
|
||||
if (!readret)
|
||||
ctx->readerr = GetLastError();
|
||||
else
|
||||
ctx->readerr = 0;
|
||||
}
|
||||
|
||||
if (!readret) {
|
||||
/*
|
||||
* Windows apparently sends ERROR_BROKEN_PIPE when a
|
||||
* pipe we're reading from is closed normally from the
|
||||
* writing end. This is ludicrous; if that situation
|
||||
* isn't a natural EOF, _nothing_ is. So if we get that
|
||||
* particular error, we pretend it's EOF.
|
||||
*/
|
||||
if (ctx->readerr == ERROR_BROKEN_PIPE)
|
||||
ctx->readerr = 0;
|
||||
ctx->len = 0;
|
||||
}
|
||||
|
||||
if (readret && ctx->len == 0 &&
|
||||
(ctx->flags & HANDLE_FLAG_IGNOREEOF))
|
||||
continue;
|
||||
|
||||
SetEvent(ctx->ev_to_main);
|
||||
|
||||
if (!ctx->len)
|
||||
break;
|
||||
|
||||
WaitForSingleObject(ctx->ev_from_main, INFINITE);
|
||||
if (ctx->done)
|
||||
break; /* main thread told us to shut down */
|
||||
}
|
||||
|
||||
if (povl)
|
||||
CloseHandle(oev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is called after a succcessful read, or from the
|
||||
* `unthrottle' function. It decides whether or not to begin a new
|
||||
* read operation.
|
||||
*/
|
||||
static void handle_throttle(struct handle_input *ctx, int backlog)
|
||||
{
|
||||
if (ctx->defunct)
|
||||
return;
|
||||
|
||||
/*
|
||||
* If there's a read operation already in progress, do nothing:
|
||||
* when that completes, we'll come back here and be in a
|
||||
* position to make a better decision.
|
||||
*/
|
||||
if (ctx->busy)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Otherwise, we must decide whether to start a new read based
|
||||
* on the size of the backlog.
|
||||
*/
|
||||
if (backlog < MAX_BACKLOG) {
|
||||
SetEvent(ctx->ev_from_main);
|
||||
ctx->busy = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Output threads.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Data required by an output thread.
|
||||
*/
|
||||
struct handle_output {
|
||||
/*
|
||||
* Copy of the handle_generic structure.
|
||||
*/
|
||||
HANDLE h; /* the handle itself */
|
||||
HANDLE ev_to_main; /* event used to signal main thread */
|
||||
HANDLE ev_from_main; /* event used to signal back to us */
|
||||
int moribund; /* are we going to kill this soon? */
|
||||
int done; /* request subthread to terminate */
|
||||
int defunct; /* has the subthread already gone? */
|
||||
int busy; /* operation currently in progress? */
|
||||
void *privdata; /* for client to remember who they are */
|
||||
|
||||
/*
|
||||
* Data set at initialisation and then read-only.
|
||||
*/
|
||||
int flags;
|
||||
|
||||
/*
|
||||
* Data set by the main thread before signalling ev_from_main,
|
||||
* and read by the input thread after receiving that signal.
|
||||
*/
|
||||
char *buffer; /* the data to write */
|
||||
DWORD len; /* how much data there is */
|
||||
|
||||
/*
|
||||
* Data set by the input thread before signalling ev_to_main,
|
||||
* and read by the main thread after receiving that signal.
|
||||
*/
|
||||
DWORD lenwritten; /* how much data we actually wrote */
|
||||
int writeerr; /* return value from WriteFile */
|
||||
|
||||
/*
|
||||
* Data only ever read or written by the main thread.
|
||||
*/
|
||||
bufchain queued_data; /* data still waiting to be written */
|
||||
|
||||
/*
|
||||
* Callback function called when the backlog in the bufchain
|
||||
* drops.
|
||||
*/
|
||||
handle_outputfn_t sentdata;
|
||||
};
|
||||
|
||||
static DWORD WINAPI handle_output_threadfunc(void *param)
|
||||
{
|
||||
struct handle_output *ctx = (struct handle_output *) param;
|
||||
OVERLAPPED ovl, *povl;
|
||||
int writeret;
|
||||
|
||||
if (ctx->flags & HANDLE_FLAG_OVERLAPPED)
|
||||
povl = &ovl;
|
||||
else
|
||||
povl = NULL;
|
||||
|
||||
while (1) {
|
||||
WaitForSingleObject(ctx->ev_from_main, INFINITE);
|
||||
if (ctx->done) {
|
||||
SetEvent(ctx->ev_to_main);
|
||||
break;
|
||||
}
|
||||
if (povl)
|
||||
memset(povl, 0, sizeof(OVERLAPPED));
|
||||
writeret = WriteFile(ctx->h, ctx->buffer, ctx->len,
|
||||
&ctx->lenwritten, povl);
|
||||
if (!writeret)
|
||||
ctx->writeerr = GetLastError();
|
||||
else
|
||||
ctx->writeerr = 0;
|
||||
if (povl && !writeret && GetLastError() == ERROR_IO_PENDING) {
|
||||
writeret = GetOverlappedResult(ctx->h, povl,
|
||||
&ctx->lenwritten, TRUE);
|
||||
if (!writeret)
|
||||
ctx->writeerr = GetLastError();
|
||||
else
|
||||
ctx->writeerr = 0;
|
||||
}
|
||||
|
||||
SetEvent(ctx->ev_to_main);
|
||||
if (!writeret)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void handle_try_output(struct handle_output *ctx)
|
||||
{
|
||||
void *senddata;
|
||||
int sendlen;
|
||||
|
||||
if (!ctx->busy && bufchain_size(&ctx->queued_data)) {
|
||||
bufchain_prefix(&ctx->queued_data, &senddata, &sendlen);
|
||||
ctx->buffer = senddata;
|
||||
ctx->len = sendlen;
|
||||
SetEvent(ctx->ev_from_main);
|
||||
ctx->busy = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Unified code handling both input and output threads.
|
||||
*/
|
||||
|
||||
struct handle {
|
||||
int output;
|
||||
union {
|
||||
struct handle_generic g;
|
||||
struct handle_input i;
|
||||
struct handle_output o;
|
||||
} u;
|
||||
};
|
||||
|
||||
static tree234 *handles_by_evtomain;
|
||||
|
||||
static int handle_cmp_evtomain(void *av, void *bv)
|
||||
{
|
||||
struct handle *a = (struct handle *)av;
|
||||
struct handle *b = (struct handle *)bv;
|
||||
|
||||
if ((unsigned)a->u.g.ev_to_main < (unsigned)b->u.g.ev_to_main)
|
||||
return -1;
|
||||
else if ((unsigned)a->u.g.ev_to_main > (unsigned)b->u.g.ev_to_main)
|
||||
return +1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_find_evtomain(void *av, void *bv)
|
||||
{
|
||||
HANDLE *a = (HANDLE *)av;
|
||||
struct handle *b = (struct handle *)bv;
|
||||
|
||||
if ((unsigned)*a < (unsigned)b->u.g.ev_to_main)
|
||||
return -1;
|
||||
else if ((unsigned)*a > (unsigned)b->u.g.ev_to_main)
|
||||
return +1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
|
||||
void *privdata, int flags)
|
||||
{
|
||||
struct handle *h = snew(struct handle);
|
||||
DWORD in_threadid; /* required for Win9x */
|
||||
|
||||
h->output = FALSE;
|
||||
h->u.i.h = handle;
|
||||
h->u.i.ev_to_main = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
h->u.i.ev_from_main = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
h->u.i.gotdata = gotdata;
|
||||
h->u.i.defunct = FALSE;
|
||||
h->u.i.moribund = FALSE;
|
||||
h->u.i.done = FALSE;
|
||||
h->u.i.privdata = privdata;
|
||||
h->u.i.flags = flags;
|
||||
|
||||
if (!handles_by_evtomain)
|
||||
handles_by_evtomain = newtree234(handle_cmp_evtomain);
|
||||
add234(handles_by_evtomain, h);
|
||||
|
||||
CreateThread(NULL, 0, handle_input_threadfunc,
|
||||
&h->u.i, 0, &in_threadid);
|
||||
h->u.i.busy = TRUE;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
struct handle *handle_output_new(HANDLE handle, handle_outputfn_t sentdata,
|
||||
void *privdata, int flags)
|
||||
{
|
||||
struct handle *h = snew(struct handle);
|
||||
DWORD out_threadid; /* required for Win9x */
|
||||
|
||||
h->output = TRUE;
|
||||
h->u.o.h = handle;
|
||||
h->u.o.ev_to_main = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
h->u.o.ev_from_main = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
h->u.o.busy = FALSE;
|
||||
h->u.o.defunct = FALSE;
|
||||
h->u.o.moribund = FALSE;
|
||||
h->u.o.done = FALSE;
|
||||
h->u.o.privdata = privdata;
|
||||
bufchain_init(&h->u.o.queued_data);
|
||||
h->u.o.sentdata = sentdata;
|
||||
h->u.o.flags = flags;
|
||||
|
||||
if (!handles_by_evtomain)
|
||||
handles_by_evtomain = newtree234(handle_cmp_evtomain);
|
||||
add234(handles_by_evtomain, h);
|
||||
|
||||
CreateThread(NULL, 0, handle_output_threadfunc,
|
||||
&h->u.i, 0, &out_threadid);
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
int handle_write(struct handle *h, const void *data, int len)
|
||||
{
|
||||
assert(h->output);
|
||||
bufchain_add(&h->u.o.queued_data, data, len);
|
||||
handle_try_output(&h->u.o);
|
||||
return bufchain_size(&h->u.o.queued_data);
|
||||
}
|
||||
|
||||
HANDLE *handle_get_events(int *nevents)
|
||||
{
|
||||
HANDLE *ret;
|
||||
struct handle *h;
|
||||
int i, n, size;
|
||||
|
||||
/*
|
||||
* Go through our tree counting the handle objects currently
|
||||
* engaged in useful activity.
|
||||
*/
|
||||
ret = NULL;
|
||||
n = size = 0;
|
||||
if (handles_by_evtomain) {
|
||||
for (i = 0; (h = index234(handles_by_evtomain, i)) != NULL; i++) {
|
||||
if (h->u.g.busy) {
|
||||
if (n >= size) {
|
||||
size += 32;
|
||||
ret = sresize(ret, size, HANDLE);
|
||||
}
|
||||
ret[n++] = h->u.g.ev_to_main;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*nevents = n;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void handle_destroy(struct handle *h)
|
||||
{
|
||||
if (h->output)
|
||||
bufchain_clear(&h->u.o.queued_data);
|
||||
CloseHandle(h->u.g.ev_from_main);
|
||||
CloseHandle(h->u.g.ev_to_main);
|
||||
del234(handles_by_evtomain, h);
|
||||
sfree(h);
|
||||
}
|
||||
|
||||
void handle_free(struct handle *h)
|
||||
{
|
||||
/*
|
||||
* If the handle is currently busy, we cannot immediately free
|
||||
* it. Instead we must wait until it's finished its current
|
||||
* operation, because otherwise the subthread will write to
|
||||
* invalid memory after we free its context from under it.
|
||||
*/
|
||||
assert(h && !h->u.g.moribund);
|
||||
if (h->u.g.busy) {
|
||||
/*
|
||||
* Just set the moribund flag, which will be noticed next
|
||||
* time an operation completes.
|
||||
*/
|
||||
h->u.g.moribund = TRUE;
|
||||
} else if (h->u.g.defunct) {
|
||||
/*
|
||||
* There isn't even a subthread; we can go straight to
|
||||
* handle_destroy.
|
||||
*/
|
||||
handle_destroy(h);
|
||||
} else {
|
||||
/*
|
||||
* The subthread is alive but not busy, so we now signal it
|
||||
* to die. Set the moribund flag to indicate that it will
|
||||
* want destroying after that.
|
||||
*/
|
||||
h->u.g.moribund = TRUE;
|
||||
h->u.g.done = TRUE;
|
||||
h->u.g.busy = TRUE;
|
||||
SetEvent(h->u.g.ev_from_main);
|
||||
}
|
||||
}
|
||||
|
||||
void handle_got_event(HANDLE event)
|
||||
{
|
||||
struct handle *h;
|
||||
|
||||
assert(handles_by_evtomain);
|
||||
h = find234(handles_by_evtomain, &event, handle_find_evtomain);
|
||||
if (!h) {
|
||||
/*
|
||||
* This isn't an error condition. If two or more event
|
||||
* objects were signalled during the same select operation,
|
||||
* and processing of the first caused the second handle to
|
||||
* be closed, then it will sometimes happen that we receive
|
||||
* an event notification here for a handle which is already
|
||||
* deceased. In that situation we simply do nothing.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
if (h->u.g.moribund) {
|
||||
/*
|
||||
* A moribund handle is already treated as dead from the
|
||||
* external user's point of view, so do nothing with the
|
||||
* actual event. Just signal the thread to die if
|
||||
* necessary, or destroy the handle if not.
|
||||
*/
|
||||
if (h->u.g.done) {
|
||||
handle_destroy(h);
|
||||
} else {
|
||||
h->u.g.done = TRUE;
|
||||
h->u.g.busy = TRUE;
|
||||
SetEvent(h->u.g.ev_from_main);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!h->output) {
|
||||
int backlog;
|
||||
|
||||
h->u.i.busy = FALSE;
|
||||
|
||||
/*
|
||||
* A signal on an input handle means data has arrived.
|
||||
*/
|
||||
if (h->u.i.len == 0) {
|
||||
/*
|
||||
* EOF, or (nearly equivalently) read error.
|
||||
*/
|
||||
h->u.i.gotdata(h, NULL, -h->u.i.readerr);
|
||||
h->u.i.defunct = TRUE;
|
||||
} else {
|
||||
backlog = h->u.i.gotdata(h, h->u.i.buffer, h->u.i.len);
|
||||
handle_throttle(&h->u.i, backlog);
|
||||
}
|
||||
} else {
|
||||
h->u.o.busy = FALSE;
|
||||
|
||||
/*
|
||||
* A signal on an output handle means we have completed a
|
||||
* write. Call the callback to indicate that the output
|
||||
* buffer size has decreased, or to indicate an error.
|
||||
*/
|
||||
if (h->u.o.writeerr) {
|
||||
/*
|
||||
* Write error. Send a negative value to the callback,
|
||||
* and mark the thread as defunct (because the output
|
||||
* thread is terminating by now).
|
||||
*/
|
||||
h->u.o.sentdata(h, -h->u.o.writeerr);
|
||||
h->u.o.defunct = TRUE;
|
||||
} else {
|
||||
bufchain_consume(&h->u.o.queued_data, h->u.o.lenwritten);
|
||||
h->u.o.sentdata(h, bufchain_size(&h->u.o.queued_data));
|
||||
handle_try_output(&h->u.o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void handle_unthrottle(struct handle *h, int backlog)
|
||||
{
|
||||
assert(!h->output);
|
||||
handle_throttle(&h->u.i, backlog);
|
||||
}
|
||||
|
||||
int handle_backlog(struct handle *h)
|
||||
{
|
||||
assert(h->output);
|
||||
return bufchain_size(&h->u.o.queued_data);
|
||||
}
|
||||
|
||||
void *handle_get_privdata(struct handle *h)
|
||||
{
|
||||
return h->u.g.privdata;
|
||||
}
|
||||
140
sFTPlugins/psftp/WINDOWS/WINHELP.C
Normal file
140
sFTPlugins/psftp/WINDOWS/WINHELP.C
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* winhelp.c: centralised functions to launch Windows help files,
|
||||
* and to decide whether to use .HLP or .CHM help in any given
|
||||
* situation.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "putty.h"
|
||||
|
||||
#ifndef NO_HTMLHELP
|
||||
#include <htmlhelp.h>
|
||||
#endif /* NO_HTMLHELP */
|
||||
|
||||
static int requested_help;
|
||||
static char *help_path;
|
||||
static int help_has_contents;
|
||||
#ifndef NO_HTMLHELP
|
||||
typedef HWND (CALLBACK *htmlhelp_t)(HWND, LPCSTR, UINT, DWORD);
|
||||
static char *chm_path;
|
||||
static htmlhelp_t htmlhelp;
|
||||
#endif /* NO_HTMLHELP */
|
||||
|
||||
void init_help(void)
|
||||
{
|
||||
char b[2048], *p, *q, *r;
|
||||
FILE *fp;
|
||||
|
||||
GetModuleFileName(NULL, b, sizeof(b) - 1);
|
||||
r = b;
|
||||
p = strrchr(b, '\\');
|
||||
if (p && p >= r) r = p+1;
|
||||
q = strrchr(b, ':');
|
||||
if (q && q >= r) r = q+1;
|
||||
strcpy(r, PUTTY_HELP_FILE);
|
||||
if ( (fp = fopen(b, "r")) != NULL) {
|
||||
help_path = dupstr(b);
|
||||
fclose(fp);
|
||||
} else
|
||||
help_path = NULL;
|
||||
strcpy(r, PUTTY_HELP_CONTENTS);
|
||||
if ( (fp = fopen(b, "r")) != NULL) {
|
||||
help_has_contents = TRUE;
|
||||
fclose(fp);
|
||||
} else
|
||||
help_has_contents = FALSE;
|
||||
|
||||
#ifndef NO_HTMLHELP
|
||||
strcpy(r, PUTTY_CHM_FILE);
|
||||
if ( (fp = fopen(b, "r")) != NULL) {
|
||||
chm_path = dupstr(b);
|
||||
fclose(fp);
|
||||
} else
|
||||
chm_path = NULL;
|
||||
if (chm_path) {
|
||||
HINSTANCE dllHH = LoadLibrary("hhctrl.ocx");
|
||||
if (dllHH) {
|
||||
htmlhelp = (htmlhelp_t)GetProcAddress(dllHH, "HtmlHelpA");
|
||||
if (!htmlhelp)
|
||||
FreeLibrary(dllHH);
|
||||
}
|
||||
if (!htmlhelp)
|
||||
chm_path = NULL;
|
||||
}
|
||||
#endif /* NO_HTMLHELP */
|
||||
}
|
||||
|
||||
void shutdown_help(void)
|
||||
{
|
||||
/* Nothing to do currently.
|
||||
* (If we were running HTML Help single-threaded, this is where we'd
|
||||
* call HH_UNINITIALIZE.) */
|
||||
}
|
||||
|
||||
int has_help(void)
|
||||
{
|
||||
/*
|
||||
* FIXME: it would be nice here to disregard help_path on
|
||||
* platforms that didn't have WINHLP32. But that's probably
|
||||
* unrealistic, since even Vista will have it if the user
|
||||
* specifically downloads it.
|
||||
*/
|
||||
return (help_path
|
||||
#ifndef NO_HTMLHELP
|
||||
|| chm_path
|
||||
#endif /* NO_HTMLHELP */
|
||||
);
|
||||
}
|
||||
|
||||
void launch_help(HWND hwnd, const char *topic)
|
||||
{
|
||||
if (topic) {
|
||||
int colonpos = strcspn(topic, ":");
|
||||
|
||||
#ifndef NO_HTMLHELP
|
||||
if (chm_path) {
|
||||
char *fname;
|
||||
assert(topic[colonpos] != '\0');
|
||||
fname = dupprintf("%s::/%s.html>main", chm_path,
|
||||
topic + colonpos + 1);
|
||||
htmlhelp(hwnd, fname, HH_DISPLAY_TOPIC, 0);
|
||||
sfree(fname);
|
||||
} else
|
||||
#endif /* NO_HTMLHELP */
|
||||
if (help_path) {
|
||||
char *cmd = dupprintf("JI(`',`%.*s')", colonpos, topic);
|
||||
WinHelp(hwnd, help_path, HELP_COMMAND, (DWORD)cmd);
|
||||
sfree(cmd);
|
||||
}
|
||||
} else {
|
||||
#ifndef NO_HTMLHELP
|
||||
if (chm_path) {
|
||||
htmlhelp(hwnd, chm_path, HH_DISPLAY_TOPIC, 0);
|
||||
} else
|
||||
#endif /* NO_HTMLHELP */
|
||||
if (help_path) {
|
||||
WinHelp(hwnd, help_path,
|
||||
help_has_contents ? HELP_FINDER : HELP_CONTENTS, 0);
|
||||
}
|
||||
}
|
||||
requested_help = TRUE;
|
||||
}
|
||||
|
||||
void quit_help(HWND hwnd)
|
||||
{
|
||||
if (requested_help) {
|
||||
#ifndef NO_HTMLHELP
|
||||
if (chm_path) {
|
||||
htmlhelp(NULL, NULL, HH_CLOSE_ALL, 0);
|
||||
} else
|
||||
#endif /* NO_HTMLHELP */
|
||||
if (help_path) {
|
||||
WinHelp(hwnd, help_path, HELP_QUIT, 0);
|
||||
}
|
||||
requested_help = FALSE;
|
||||
}
|
||||
}
|
||||
173
sFTPlugins/psftp/WINDOWS/WINHELP.H
Normal file
173
sFTPlugins/psftp/WINDOWS/WINHELP.H
Normal file
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* winhelp.h - define Windows Help context names. These match up with
|
||||
* the \cfg{winhelp-topic} directives in the Halibut source.
|
||||
*/
|
||||
|
||||
/* Maximum length for WINHELP_CTX_foo strings */
|
||||
#define WINHELP_CTX_MAXLEN 80
|
||||
|
||||
/* These are used in the cross-platform configuration dialog code. */
|
||||
|
||||
#define HELPCTX(x) P(WINHELP_CTX_ ## x)
|
||||
|
||||
#define WINHELP_CTX_no_help NULL
|
||||
|
||||
#define WINHELP_CTX_session_hostname "session.hostname:config-hostname"
|
||||
#define WINHELP_CTX_session_saved "session.saved:config-saving"
|
||||
#define WINHELP_CTX_session_coe "session.coe:config-closeonexit"
|
||||
#define WINHELP_CTX_logging_main "logging.main:config-logging"
|
||||
#define WINHELP_CTX_logging_filename "logging.filename:config-logfilename"
|
||||
#define WINHELP_CTX_logging_exists "logging.exists:config-logfileexists"
|
||||
#define WINHELP_CTX_logging_flush "logging.flush:config-logflush"
|
||||
#define WINHELP_CTX_logging_ssh_omit_password "logging.ssh.omitpassword:config-logssh"
|
||||
#define WINHELP_CTX_logging_ssh_omit_data "logging.ssh.omitdata:config-logssh"
|
||||
#define WINHELP_CTX_keyboard_backspace "keyboard.backspace:config-backspace"
|
||||
#define WINHELP_CTX_keyboard_homeend "keyboard.homeend:config-homeend"
|
||||
#define WINHELP_CTX_keyboard_funkeys "keyboard.funkeys:config-funkeys"
|
||||
#define WINHELP_CTX_keyboard_appkeypad "keyboard.appkeypad:config-appkeypad"
|
||||
#define WINHELP_CTX_keyboard_appcursor "keyboard.appcursor:config-appcursor"
|
||||
#define WINHELP_CTX_keyboard_nethack "keyboard.nethack:config-nethack"
|
||||
#define WINHELP_CTX_keyboard_compose "keyboard.compose:config-compose"
|
||||
#define WINHELP_CTX_keyboard_ctrlalt "keyboard.ctrlalt:config-ctrlalt"
|
||||
#define WINHELP_CTX_features_application "features.application:config-features-application"
|
||||
#define WINHELP_CTX_features_mouse "features.mouse:config-features-mouse"
|
||||
#define WINHELP_CTX_features_resize "features.resize:config-features-resize"
|
||||
#define WINHELP_CTX_features_altscreen "features.altscreen:config-features-altscreen"
|
||||
#define WINHELP_CTX_features_retitle "features.retitle:config-features-retitle"
|
||||
#define WINHELP_CTX_features_qtitle "features.qtitle:config-features-qtitle"
|
||||
#define WINHELP_CTX_features_dbackspace "features.dbackspace:config-features-dbackspace"
|
||||
#define WINHELP_CTX_features_charset "features.charset:config-features-charset"
|
||||
#define WINHELP_CTX_features_arabicshaping "features.arabicshaping:config-features-shaping"
|
||||
#define WINHELP_CTX_features_bidi "features.bidi:config-features-bidi"
|
||||
#define WINHELP_CTX_terminal_autowrap "terminal.autowrap:config-autowrap"
|
||||
#define WINHELP_CTX_terminal_decom "terminal.decom:config-decom"
|
||||
#define WINHELP_CTX_terminal_lfhascr "terminal.lfhascr:config-crlf"
|
||||
#define WINHELP_CTX_terminal_bce "terminal.bce:config-erase"
|
||||
#define WINHELP_CTX_terminal_blink "terminal.blink:config-blink"
|
||||
#define WINHELP_CTX_terminal_answerback "terminal.answerback:config-answerback"
|
||||
#define WINHELP_CTX_terminal_localecho "terminal.localecho:config-localecho"
|
||||
#define WINHELP_CTX_terminal_localedit "terminal.localedit:config-localedit"
|
||||
#define WINHELP_CTX_terminal_printing "terminal.printing:config-printing"
|
||||
#define WINHELP_CTX_bell_style "bell.style:config-bellstyle"
|
||||
#define WINHELP_CTX_bell_taskbar "bell.taskbar:config-belltaskbar"
|
||||
#define WINHELP_CTX_bell_overload "bell.overload:config-bellovl"
|
||||
#define WINHELP_CTX_window_size "window.size:config-winsize"
|
||||
#define WINHELP_CTX_window_resize "window.resize:config-winsizelock"
|
||||
#define WINHELP_CTX_window_scrollback "window.scrollback:config-scrollback"
|
||||
#define WINHELP_CTX_window_erased "window.erased:config-erasetoscrollback"
|
||||
#define WINHELP_CTX_behaviour_closewarn "behaviour.closewarn:config-warnonclose"
|
||||
#define WINHELP_CTX_behaviour_altf4 "behaviour.altf4:config-altf4"
|
||||
#define WINHELP_CTX_behaviour_altspace "behaviour.altspace:config-altspace"
|
||||
#define WINHELP_CTX_behaviour_altonly "behaviour.altonly:config-altonly"
|
||||
#define WINHELP_CTX_behaviour_alwaysontop "behaviour.alwaysontop:config-alwaysontop"
|
||||
#define WINHELP_CTX_behaviour_altenter "behaviour.altenter:config-fullscreen"
|
||||
#define WINHELP_CTX_appearance_cursor "appearance.cursor:config-cursor"
|
||||
#define WINHELP_CTX_appearance_font "appearance.font:config-font"
|
||||
#define WINHELP_CTX_appearance_title "appearance.title:config-title"
|
||||
#define WINHELP_CTX_appearance_hidemouse "appearance.hidemouse:config-mouseptr"
|
||||
#define WINHELP_CTX_appearance_border "appearance.border:config-winborder"
|
||||
#define WINHELP_CTX_connection_termtype "connection.termtype:config-termtype"
|
||||
#define WINHELP_CTX_connection_termspeed "connection.termspeed:config-termspeed"
|
||||
#define WINHELP_CTX_connection_username "connection.username:config-username"
|
||||
#define WINHELP_CTX_connection_keepalive "connection.keepalive:config-keepalive"
|
||||
#define WINHELP_CTX_connection_nodelay "connection.nodelay:config-nodelay"
|
||||
#define WINHELP_CTX_connection_ipversion "connection.ipversion:config-address-family"
|
||||
#define WINHELP_CTX_connection_tcpkeepalive "connection.tcpkeepalive:config-tcp-keepalives"
|
||||
#define WINHELP_CTX_proxy_type "proxy.type:config-proxy-type"
|
||||
#define WINHELP_CTX_proxy_main "proxy.main:config-proxy"
|
||||
#define WINHELP_CTX_proxy_exclude "proxy.exclude:config-proxy-exclude"
|
||||
#define WINHELP_CTX_proxy_dns "proxy.dns:config-proxy-dns"
|
||||
#define WINHELP_CTX_proxy_auth "proxy.auth:config-proxy-auth"
|
||||
#define WINHELP_CTX_proxy_command "proxy.command:config-proxy-command"
|
||||
#define WINHELP_CTX_telnet_environ "telnet.environ:config-environ"
|
||||
#define WINHELP_CTX_telnet_oldenviron "telnet.oldenviron:config-oldenviron"
|
||||
#define WINHELP_CTX_telnet_passive "telnet.passive:config-ptelnet"
|
||||
#define WINHELP_CTX_telnet_specialkeys "telnet.specialkeys:config-telnetkey"
|
||||
#define WINHELP_CTX_telnet_newline "telnet.newline:config-telnetnl"
|
||||
#define WINHELP_CTX_rlogin_localuser "rlogin.localuser:config-rlogin-localuser"
|
||||
#define WINHELP_CTX_ssh_nopty "ssh.nopty:config-ssh-pty"
|
||||
#define WINHELP_CTX_ssh_ttymodes "ssh.ttymodes:config-ttymodes"
|
||||
#define WINHELP_CTX_ssh_noshell "ssh.noshell:config-ssh-noshell"
|
||||
#define WINHELP_CTX_ssh_ciphers "ssh.ciphers:config-ssh-encryption"
|
||||
#define WINHELP_CTX_ssh_protocol "ssh.protocol:config-ssh-prot"
|
||||
#define WINHELP_CTX_ssh_command "ssh.command:config-command"
|
||||
#define WINHELP_CTX_ssh_compress "ssh.compress:config-ssh-comp"
|
||||
#define WINHELP_CTX_ssh_kexlist "ssh.kex.order:config-ssh-kex-order"
|
||||
#define WINHELP_CTX_ssh_kex_repeat "ssh.kex.repeat:config-ssh-kex-rekey"
|
||||
#define WINHELP_CTX_ssh_auth_bypass "ssh.auth.bypass:config-ssh-noauth"
|
||||
#define WINHELP_CTX_ssh_auth_privkey "ssh.auth.privkey:config-ssh-privkey"
|
||||
#define WINHELP_CTX_ssh_auth_agentfwd "ssh.auth.agentfwd:config-ssh-agentfwd"
|
||||
#define WINHELP_CTX_ssh_auth_changeuser "ssh.auth.changeuser:config-ssh-changeuser"
|
||||
#define WINHELP_CTX_ssh_auth_pageant "ssh.auth.pageant:config-ssh-tryagent"
|
||||
#define WINHELP_CTX_ssh_auth_tis "ssh.auth.tis:config-ssh-tis"
|
||||
#define WINHELP_CTX_ssh_auth_ki "ssh.auth.ki:config-ssh-ki"
|
||||
#define WINHELP_CTX_selection_buttons "selection.buttons:config-mouse"
|
||||
#define WINHELP_CTX_selection_shiftdrag "selection.shiftdrag:config-mouseshift"
|
||||
#define WINHELP_CTX_selection_rect "selection.rect:config-rectselect"
|
||||
#define WINHELP_CTX_selection_charclasses "selection.charclasses:config-charclasses"
|
||||
#define WINHELP_CTX_selection_linedraw "selection.linedraw:config-linedrawpaste"
|
||||
#define WINHELP_CTX_selection_rtf "selection.rtf:config-rtfpaste"
|
||||
#define WINHELP_CTX_colours_ansi "colours.ansi:config-ansicolour"
|
||||
#define WINHELP_CTX_colours_xterm256 "colours.xterm256:config-xtermcolour"
|
||||
#define WINHELP_CTX_colours_bold "colours.bold:config-boldcolour"
|
||||
#define WINHELP_CTX_colours_system "colours.system:config-syscolour"
|
||||
#define WINHELP_CTX_colours_logpal "colours.logpal:config-logpalette"
|
||||
#define WINHELP_CTX_colours_config "colours.config:config-colourcfg"
|
||||
#define WINHELP_CTX_translation_codepage "translation.codepage:config-charset"
|
||||
#define WINHELP_CTX_translation_cjk_ambig_wide "translation.cjkambigwide:config-cjk-ambig-wide"
|
||||
#define WINHELP_CTX_translation_cyrillic "translation.cyrillic:config-cyr"
|
||||
#define WINHELP_CTX_translation_linedraw "translation.linedraw:config-linedraw"
|
||||
#define WINHELP_CTX_ssh_tunnels_x11 "ssh.tunnels.x11:config-ssh-x11"
|
||||
#define WINHELP_CTX_ssh_tunnels_x11auth "ssh.tunnels.x11auth:config-ssh-x11auth"
|
||||
#define WINHELP_CTX_ssh_tunnels_portfwd "ssh.tunnels.portfwd:config-ssh-portfwd"
|
||||
#define WINHELP_CTX_ssh_tunnels_portfwd_localhost "ssh.tunnels.portfwd.localhost:config-ssh-portfwd-localhost"
|
||||
#define WINHELP_CTX_ssh_tunnels_portfwd_ipversion "ssh.tunnels.portfwd.ipversion:config-ssh-portfwd-address-family"
|
||||
#define WINHELP_CTX_ssh_bugs_ignore1 "ssh.bugs.ignore1:config-ssh-bug-ignore1"
|
||||
#define WINHELP_CTX_ssh_bugs_plainpw1 "ssh.bugs.plainpw1:config-ssh-bug-plainpw1"
|
||||
#define WINHELP_CTX_ssh_bugs_rsa1 "ssh.bugs.rsa1:config-ssh-bug-rsa1"
|
||||
#define WINHELP_CTX_ssh_bugs_hmac2 "ssh.bugs.hmac2:config-ssh-bug-hmac2"
|
||||
#define WINHELP_CTX_ssh_bugs_derivekey2 "ssh.bugs.derivekey2:config-ssh-bug-derivekey2"
|
||||
#define WINHELP_CTX_ssh_bugs_rsapad2 "ssh.bugs.rsapad2:config-ssh-bug-sig"
|
||||
#define WINHELP_CTX_ssh_bugs_pksessid2 "ssh.bugs.pksessid2:config-ssh-bug-pksessid2"
|
||||
#define WINHELP_CTX_ssh_bugs_rekey2 "ssh.bugs.rekey2:config-ssh-bug-rekey"
|
||||
#define WINHELP_CTX_serial_line "serial.line:config-serial-line"
|
||||
#define WINHELP_CTX_serial_speed "serial.speed:config-serial-speed"
|
||||
#define WINHELP_CTX_serial_databits "serial.databits:config-serial-databits"
|
||||
#define WINHELP_CTX_serial_stopbits "serial.stopbits:config-serial-stopbits"
|
||||
#define WINHELP_CTX_serial_parity "serial.parity:config-serial-parity"
|
||||
#define WINHELP_CTX_serial_flow "serial.flow:config-serial-flow"
|
||||
|
||||
#define WINHELP_CTX_pageant_general "pageant.general:pageant"
|
||||
#define WINHELP_CTX_pageant_keylist "pageant.keylist:pageant-mainwin-keylist"
|
||||
#define WINHELP_CTX_pageant_addkey "pageant.addkey:pageant-mainwin-addkey"
|
||||
#define WINHELP_CTX_pageant_remkey "pageant.remkey:pageant-mainwin-remkey"
|
||||
#define WINHELP_CTX_pgpfingerprints "pgpfingerprints:pgpkeys"
|
||||
#define WINHELP_CTX_puttygen_general "puttygen.general:pubkey-puttygen"
|
||||
#define WINHELP_CTX_puttygen_keytype "puttygen.keytype:puttygen-keytype"
|
||||
#define WINHELP_CTX_puttygen_bits "puttygen.bits:puttygen-strength"
|
||||
#define WINHELP_CTX_puttygen_generate "puttygen.generate:puttygen-generate"
|
||||
#define WINHELP_CTX_puttygen_fingerprint "puttygen.fingerprint:puttygen-fingerprint"
|
||||
#define WINHELP_CTX_puttygen_comment "puttygen.comment:puttygen-comment"
|
||||
#define WINHELP_CTX_puttygen_passphrase "puttygen.passphrase:puttygen-passphrase"
|
||||
#define WINHELP_CTX_puttygen_savepriv "puttygen.savepriv:puttygen-savepriv"
|
||||
#define WINHELP_CTX_puttygen_savepub "puttygen.savepub:puttygen-savepub"
|
||||
#define WINHELP_CTX_puttygen_pastekey "puttygen.pastekey:puttygen-pastekey"
|
||||
#define WINHELP_CTX_puttygen_load "puttygen.load:puttygen-load"
|
||||
#define WINHELP_CTX_puttygen_conversions "puttygen.conversions:puttygen-conversions"
|
||||
|
||||
/* These are used in Windows-specific bits of the frontend.
|
||||
* We (ab)use "help context identifiers" (dwContextId) to identify them. */
|
||||
|
||||
#define HELPCTXID(x) WINHELP_CTXID_ ## x
|
||||
|
||||
#define WINHELP_CTXID_no_help 0
|
||||
#define WINHELP_CTX_errors_hostkey_absent "errors.hostkey.absent:errors-hostkey-absent"
|
||||
#define WINHELP_CTXID_errors_hostkey_absent 1
|
||||
#define WINHELP_CTX_errors_hostkey_changed "errors.hostkey.changed:errors-hostkey-wrong"
|
||||
#define WINHELP_CTXID_errors_hostkey_changed 2
|
||||
#define WINHELP_CTX_errors_cantloadkey "errors.cantloadkey:errors-cant-load-key"
|
||||
#define WINHELP_CTXID_errors_cantloadkey 3
|
||||
#define WINHELP_CTX_option_cleanup "options.cleanup:using-cleanup"
|
||||
#define WINHELP_CTXID_option_cleanup 4
|
||||
#define WINHELP_CTX_pgp_fingerprints "pgpfingerprints:pgpkeys"
|
||||
#define WINHELP_CTXID_pgp_fingerprints 5
|
||||
321
sFTPlugins/psftp/WINDOWS/WINMISC.C
Normal file
321
sFTPlugins/psftp/WINDOWS/WINMISC.C
Normal file
@@ -0,0 +1,321 @@
|
||||
/*
|
||||
* winmisc.c: miscellaneous Windows-specific things
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "putty.h"
|
||||
|
||||
OSVERSIONINFO osVersion;
|
||||
|
||||
void platform_get_x11_auth(char *display, int *proto,
|
||||
unsigned char *data, int *datalen)
|
||||
{
|
||||
/* We don't support this at all under Windows. */
|
||||
}
|
||||
|
||||
const char platform_x11_best_transport[] = "localhost";
|
||||
|
||||
char *platform_get_x_display(void) {
|
||||
/* We may as well check for DISPLAY in case it's useful. */
|
||||
return dupstr(getenv("DISPLAY"));
|
||||
}
|
||||
|
||||
Filename filename_from_str(const char *str)
|
||||
{
|
||||
Filename ret;
|
||||
strncpy(ret.path, str, sizeof(ret.path));
|
||||
ret.path[sizeof(ret.path)-1] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *filename_to_str(const Filename *fn)
|
||||
{
|
||||
return fn->path;
|
||||
}
|
||||
|
||||
int filename_equal(Filename f1, Filename f2)
|
||||
{
|
||||
return !strcmp(f1.path, f2.path);
|
||||
}
|
||||
|
||||
int filename_is_null(Filename fn)
|
||||
{
|
||||
return !*fn.path;
|
||||
}
|
||||
|
||||
char *get_username(void)
|
||||
{
|
||||
DWORD namelen;
|
||||
char *user;
|
||||
|
||||
namelen = 0;
|
||||
if (GetUserName(NULL, &namelen) == FALSE) {
|
||||
/*
|
||||
* Apparently this doesn't work at least on Windows XP SP2.
|
||||
* Thus assume a maximum of 256. It will fail again if it
|
||||
* doesn't fit.
|
||||
*/
|
||||
namelen = 256;
|
||||
}
|
||||
|
||||
user = snewn(namelen, char);
|
||||
GetUserName(user, &namelen);
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
BOOL init_winver(void)
|
||||
{
|
||||
ZeroMemory(&osVersion, sizeof(osVersion));
|
||||
osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
|
||||
return GetVersionEx ( (OSVERSIONINFO *) &osVersion);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static FILE *debug_fp = NULL;
|
||||
static HANDLE debug_hdl = INVALID_HANDLE_VALUE;
|
||||
static int debug_got_console = 0;
|
||||
|
||||
void dputs(char *buf)
|
||||
{
|
||||
DWORD dw;
|
||||
|
||||
if (!debug_got_console) {
|
||||
if (AllocConsole()) {
|
||||
debug_got_console = 1;
|
||||
debug_hdl = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
}
|
||||
}
|
||||
if (!debug_fp) {
|
||||
debug_fp = fopen("debug.log", "w");
|
||||
}
|
||||
|
||||
if (debug_hdl != INVALID_HANDLE_VALUE) {
|
||||
WriteFile(debug_hdl, buf, strlen(buf), &dw, NULL);
|
||||
}
|
||||
fputs(buf, debug_fp);
|
||||
fflush(debug_fp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MINEFIELD
|
||||
/*
|
||||
* Minefield - a Windows equivalent for Electric Fence
|
||||
*/
|
||||
|
||||
#define PAGESIZE 4096
|
||||
|
||||
/*
|
||||
* Design:
|
||||
*
|
||||
* We start by reserving as much virtual address space as Windows
|
||||
* will sensibly (or not sensibly) let us have. We flag it all as
|
||||
* invalid memory.
|
||||
*
|
||||
* Any allocation attempt is satisfied by committing one or more
|
||||
* pages, with an uncommitted page on either side. The returned
|
||||
* memory region is jammed up against the _end_ of the pages.
|
||||
*
|
||||
* Freeing anything causes instantaneous decommitment of the pages
|
||||
* involved, so stale pointers are caught as soon as possible.
|
||||
*/
|
||||
|
||||
static int minefield_initialised = 0;
|
||||
static void *minefield_region = NULL;
|
||||
static long minefield_size = 0;
|
||||
static long minefield_npages = 0;
|
||||
static long minefield_curpos = 0;
|
||||
static unsigned short *minefield_admin = NULL;
|
||||
static void *minefield_pages = NULL;
|
||||
|
||||
static void minefield_admin_hide(int hide)
|
||||
{
|
||||
int access = hide ? PAGE_NOACCESS : PAGE_READWRITE;
|
||||
VirtualProtect(minefield_admin, minefield_npages * 2, access, NULL);
|
||||
}
|
||||
|
||||
static void minefield_init(void)
|
||||
{
|
||||
int size;
|
||||
int admin_size;
|
||||
int i;
|
||||
|
||||
for (size = 0x40000000; size > 0; size = ((size >> 3) * 7) & ~0xFFF) {
|
||||
minefield_region = VirtualAlloc(NULL, size,
|
||||
MEM_RESERVE, PAGE_NOACCESS);
|
||||
if (minefield_region)
|
||||
break;
|
||||
}
|
||||
minefield_size = size;
|
||||
|
||||
/*
|
||||
* Firstly, allocate a section of that to be the admin block.
|
||||
* We'll need a two-byte field for each page.
|
||||
*/
|
||||
minefield_admin = minefield_region;
|
||||
minefield_npages = minefield_size / PAGESIZE;
|
||||
admin_size = (minefield_npages * 2 + PAGESIZE - 1) & ~(PAGESIZE - 1);
|
||||
minefield_npages = (minefield_size - admin_size) / PAGESIZE;
|
||||
minefield_pages = (char *) minefield_region + admin_size;
|
||||
|
||||
/*
|
||||
* Commit the admin region.
|
||||
*/
|
||||
VirtualAlloc(minefield_admin, minefield_npages * 2,
|
||||
MEM_COMMIT, PAGE_READWRITE);
|
||||
|
||||
/*
|
||||
* Mark all pages as unused (0xFFFF).
|
||||
*/
|
||||
for (i = 0; i < minefield_npages; i++)
|
||||
minefield_admin[i] = 0xFFFF;
|
||||
|
||||
/*
|
||||
* Hide the admin region.
|
||||
*/
|
||||
minefield_admin_hide(1);
|
||||
|
||||
minefield_initialised = 1;
|
||||
}
|
||||
|
||||
static void minefield_bomb(void)
|
||||
{
|
||||
div(1, *(int *) minefield_pages);
|
||||
}
|
||||
|
||||
static void *minefield_alloc(int size)
|
||||
{
|
||||
int npages;
|
||||
int pos, lim, region_end, region_start;
|
||||
int start;
|
||||
int i;
|
||||
|
||||
npages = (size + PAGESIZE - 1) / PAGESIZE;
|
||||
|
||||
minefield_admin_hide(0);
|
||||
|
||||
/*
|
||||
* Search from current position until we find a contiguous
|
||||
* bunch of npages+2 unused pages.
|
||||
*/
|
||||
pos = minefield_curpos;
|
||||
lim = minefield_npages;
|
||||
while (1) {
|
||||
/* Skip over used pages. */
|
||||
while (pos < lim && minefield_admin[pos] != 0xFFFF)
|
||||
pos++;
|
||||
/* Count unused pages. */
|
||||
start = pos;
|
||||
while (pos < lim && pos - start < npages + 2 &&
|
||||
minefield_admin[pos] == 0xFFFF)
|
||||
pos++;
|
||||
if (pos - start == npages + 2)
|
||||
break;
|
||||
/* If we've reached the limit, reset the limit or stop. */
|
||||
if (pos >= lim) {
|
||||
if (lim == minefield_npages) {
|
||||
/* go round and start again at zero */
|
||||
lim = minefield_curpos;
|
||||
pos = 0;
|
||||
} else {
|
||||
minefield_admin_hide(1);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
minefield_curpos = pos - 1;
|
||||
|
||||
/*
|
||||
* We have npages+2 unused pages starting at start. We leave
|
||||
* the first and last of these alone and use the rest.
|
||||
*/
|
||||
region_end = (start + npages + 1) * PAGESIZE;
|
||||
region_start = region_end - size;
|
||||
/* FIXME: could align here if we wanted */
|
||||
|
||||
/*
|
||||
* Update the admin region.
|
||||
*/
|
||||
for (i = start + 2; i < start + npages + 1; i++)
|
||||
minefield_admin[i] = 0xFFFE; /* used but no region starts here */
|
||||
minefield_admin[start + 1] = region_start % PAGESIZE;
|
||||
|
||||
minefield_admin_hide(1);
|
||||
|
||||
VirtualAlloc((char *) minefield_pages + region_start, size,
|
||||
MEM_COMMIT, PAGE_READWRITE);
|
||||
return (char *) minefield_pages + region_start;
|
||||
}
|
||||
|
||||
static void minefield_free(void *ptr)
|
||||
{
|
||||
int region_start, i, j;
|
||||
|
||||
minefield_admin_hide(0);
|
||||
|
||||
region_start = (char *) ptr - (char *) minefield_pages;
|
||||
i = region_start / PAGESIZE;
|
||||
if (i < 0 || i >= minefield_npages ||
|
||||
minefield_admin[i] != region_start % PAGESIZE)
|
||||
minefield_bomb();
|
||||
for (j = i; j < minefield_npages && minefield_admin[j] != 0xFFFF; j++) {
|
||||
minefield_admin[j] = 0xFFFF;
|
||||
}
|
||||
|
||||
VirtualFree(ptr, j * PAGESIZE - region_start, MEM_DECOMMIT);
|
||||
|
||||
minefield_admin_hide(1);
|
||||
}
|
||||
|
||||
static int minefield_get_size(void *ptr)
|
||||
{
|
||||
int region_start, i, j;
|
||||
|
||||
minefield_admin_hide(0);
|
||||
|
||||
region_start = (char *) ptr - (char *) minefield_pages;
|
||||
i = region_start / PAGESIZE;
|
||||
if (i < 0 || i >= minefield_npages ||
|
||||
minefield_admin[i] != region_start % PAGESIZE)
|
||||
minefield_bomb();
|
||||
for (j = i; j < minefield_npages && minefield_admin[j] != 0xFFFF; j++);
|
||||
|
||||
minefield_admin_hide(1);
|
||||
|
||||
return j * PAGESIZE - region_start;
|
||||
}
|
||||
|
||||
void *minefield_c_malloc(size_t size)
|
||||
{
|
||||
if (!minefield_initialised)
|
||||
minefield_init();
|
||||
return minefield_alloc(size);
|
||||
}
|
||||
|
||||
void minefield_c_free(void *p)
|
||||
{
|
||||
if (!minefield_initialised)
|
||||
minefield_init();
|
||||
minefield_free(p);
|
||||
}
|
||||
|
||||
/*
|
||||
* realloc _always_ moves the chunk, for rapid detection of code
|
||||
* that assumes it won't.
|
||||
*/
|
||||
void *minefield_c_realloc(void *p, size_t size)
|
||||
{
|
||||
size_t oldsize;
|
||||
void *q;
|
||||
if (!minefield_initialised)
|
||||
minefield_init();
|
||||
q = minefield_alloc(size);
|
||||
oldsize = minefield_get_size(p);
|
||||
memcpy(q, p, (oldsize < size ? oldsize : size));
|
||||
minefield_free(p);
|
||||
return q;
|
||||
}
|
||||
|
||||
#endif /* MINEFIELD */
|
||||
1630
sFTPlugins/psftp/WINDOWS/WINNET.C
Normal file
1630
sFTPlugins/psftp/WINDOWS/WINNET.C
Normal file
File diff suppressed because it is too large
Load Diff
128
sFTPlugins/psftp/WINDOWS/WINNOISE.C
Normal file
128
sFTPlugins/psftp/WINDOWS/WINNOISE.C
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Noise generation for PuTTY's cryptographic random number
|
||||
* generator.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "putty.h"
|
||||
#include "ssh.h"
|
||||
#include "storage.h"
|
||||
|
||||
/*
|
||||
* This function is called once, at PuTTY startup, and will do some
|
||||
* seriously silly things like listing directories and getting disk
|
||||
* free space and a process snapshot.
|
||||
*/
|
||||
|
||||
void noise_get_heavy(void (*func) (void *, int))
|
||||
{
|
||||
HANDLE srch;
|
||||
WIN32_FIND_DATA finddata;
|
||||
DWORD pid;
|
||||
char winpath[MAX_PATH + 3];
|
||||
|
||||
GetWindowsDirectory(winpath, sizeof(winpath));
|
||||
strcat(winpath, "\\*");
|
||||
srch = FindFirstFile(winpath, &finddata);
|
||||
if (srch != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
func(&finddata, sizeof(finddata));
|
||||
} while (FindNextFile(srch, &finddata));
|
||||
FindClose(srch);
|
||||
}
|
||||
|
||||
pid = GetCurrentProcessId();
|
||||
func(&pid, sizeof(pid));
|
||||
|
||||
read_random_seed(func);
|
||||
/* Update the seed immediately, in case another instance uses it. */
|
||||
random_save_seed();
|
||||
}
|
||||
|
||||
void random_save_seed(void)
|
||||
{
|
||||
int len;
|
||||
void *data;
|
||||
|
||||
if (random_active) {
|
||||
random_get_savedata(&data, &len);
|
||||
write_random_seed(data, len);
|
||||
sfree(data);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called every time the random pool needs
|
||||
* stirring, and will acquire the system time in all available
|
||||
* forms.
|
||||
*/
|
||||
void noise_get_light(void (*func) (void *, int))
|
||||
{
|
||||
SYSTEMTIME systime;
|
||||
DWORD adjust[2];
|
||||
BOOL rubbish;
|
||||
|
||||
GetSystemTime(&systime);
|
||||
func(&systime, sizeof(systime));
|
||||
|
||||
GetSystemTimeAdjustment(&adjust[0], &adjust[1], &rubbish);
|
||||
func(&adjust, sizeof(adjust));
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called on a timer, and it will monitor
|
||||
* frequently changing quantities such as the state of physical and
|
||||
* virtual memory, the state of the process's message queue, which
|
||||
* window is in the foreground, which owns the clipboard, etc.
|
||||
*/
|
||||
void noise_regular(void)
|
||||
{
|
||||
HWND w;
|
||||
DWORD z;
|
||||
POINT pt;
|
||||
MEMORYSTATUS memstat;
|
||||
FILETIME times[4];
|
||||
|
||||
w = GetForegroundWindow();
|
||||
random_add_noise(&w, sizeof(w));
|
||||
w = GetCapture();
|
||||
random_add_noise(&w, sizeof(w));
|
||||
w = GetClipboardOwner();
|
||||
random_add_noise(&w, sizeof(w));
|
||||
z = GetQueueStatus(QS_ALLEVENTS);
|
||||
random_add_noise(&z, sizeof(z));
|
||||
|
||||
GetCursorPos(&pt);
|
||||
random_add_noise(&pt, sizeof(pt));
|
||||
|
||||
GlobalMemoryStatus(&memstat);
|
||||
random_add_noise(&memstat, sizeof(memstat));
|
||||
|
||||
GetThreadTimes(GetCurrentThread(), times, times + 1, times + 2,
|
||||
times + 3);
|
||||
random_add_noise(×, sizeof(times));
|
||||
GetProcessTimes(GetCurrentProcess(), times, times + 1, times + 2,
|
||||
times + 3);
|
||||
random_add_noise(×, sizeof(times));
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called on every keypress or mouse move, and
|
||||
* will add the current Windows time and performance monitor
|
||||
* counter to the noise pool. It gets the scan code or mouse
|
||||
* position passed in.
|
||||
*/
|
||||
void noise_ultralight(unsigned long data)
|
||||
{
|
||||
DWORD wintime;
|
||||
LARGE_INTEGER perftime;
|
||||
|
||||
random_add_noise(&data, sizeof(DWORD));
|
||||
|
||||
wintime = GetTickCount();
|
||||
random_add_noise(&wintime, sizeof(DWORD));
|
||||
|
||||
if (QueryPerformanceCounter(&perftime))
|
||||
random_add_noise(&perftime, sizeof(perftime));
|
||||
}
|
||||
2181
sFTPlugins/psftp/WINDOWS/WINPGNT.C
Normal file
2181
sFTPlugins/psftp/WINDOWS/WINPGNT.C
Normal file
File diff suppressed because it is too large
Load Diff
138
sFTPlugins/psftp/WINDOWS/WINPGNTC.C
Normal file
138
sFTPlugins/psftp/WINDOWS/WINPGNTC.C
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Pageant client code.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "putty.h"
|
||||
|
||||
#define AGENT_COPYDATA_ID 0x804e50ba /* random goop */
|
||||
#define AGENT_MAX_MSGLEN 8192
|
||||
|
||||
int agent_exists(void)
|
||||
{
|
||||
HWND hwnd;
|
||||
hwnd = FindWindow("Pageant", "Pageant");
|
||||
if (!hwnd)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unfortunately, this asynchronous agent request mechanism doesn't
|
||||
* appear to work terribly well. I'm going to comment it out for
|
||||
* the moment, and see if I can come up with a better one :-/
|
||||
*/
|
||||
#ifdef WINDOWS_ASYNC_AGENT
|
||||
|
||||
struct agent_query_data {
|
||||
COPYDATASTRUCT cds;
|
||||
unsigned char *mapping;
|
||||
HANDLE handle;
|
||||
char *mapname;
|
||||
HWND hwnd;
|
||||
void (*callback)(void *, void *, int);
|
||||
void *callback_ctx;
|
||||
};
|
||||
|
||||
DWORD WINAPI agent_query_thread(LPVOID param)
|
||||
{
|
||||
struct agent_query_data *data = (struct agent_query_data *)param;
|
||||
unsigned char *ret;
|
||||
int id, retlen;
|
||||
|
||||
id = SendMessage(data->hwnd, WM_COPYDATA, (WPARAM) NULL,
|
||||
(LPARAM) &data->cds);
|
||||
ret = NULL;
|
||||
if (id > 0) {
|
||||
retlen = 4 + GET_32BIT(data->mapping);
|
||||
ret = snewn(retlen, unsigned char);
|
||||
if (ret) {
|
||||
memcpy(ret, data->mapping, retlen);
|
||||
}
|
||||
}
|
||||
if (!ret)
|
||||
retlen = 0;
|
||||
UnmapViewOfFile(data->mapping);
|
||||
CloseHandle(data->handle);
|
||||
sfree(data->mapname);
|
||||
|
||||
agent_schedule_callback(data->callback, data->callback_ctx, ret, retlen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int agent_query(void *in, int inlen, void **out, int *outlen,
|
||||
void (*callback)(void *, void *, int), void *callback_ctx)
|
||||
{
|
||||
HWND hwnd;
|
||||
char *mapname;
|
||||
HANDLE filemap;
|
||||
unsigned char *p, *ret;
|
||||
int id, retlen;
|
||||
COPYDATASTRUCT cds;
|
||||
|
||||
*out = NULL;
|
||||
*outlen = 0;
|
||||
|
||||
hwnd = FindWindow("Pageant", "Pageant");
|
||||
if (!hwnd)
|
||||
return 1; /* *out == NULL, so failure */
|
||||
mapname = dupprintf("PageantRequest%08x", (unsigned)GetCurrentThreadId());
|
||||
filemap = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
|
||||
0, AGENT_MAX_MSGLEN, mapname);
|
||||
if (filemap == NULL || filemap == INVALID_HANDLE_VALUE)
|
||||
return 1; /* *out == NULL, so failure */
|
||||
p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0);
|
||||
memcpy(p, in, inlen);
|
||||
cds.dwData = AGENT_COPYDATA_ID;
|
||||
cds.cbData = 1 + strlen(mapname);
|
||||
cds.lpData = mapname;
|
||||
#ifdef WINDOWS_ASYNC_AGENT
|
||||
if (callback != NULL && !(flags & FLAG_SYNCAGENT)) {
|
||||
/*
|
||||
* We need an asynchronous Pageant request. Since I know of
|
||||
* no way to stop SendMessage from blocking the thread it's
|
||||
* called in, I see no option but to start a fresh thread.
|
||||
* When we're done we'll PostMessage the result back to our
|
||||
* main window, so that the callback is done in the primary
|
||||
* thread to avoid concurrency.
|
||||
*/
|
||||
struct agent_query_data *data = snew(struct agent_query_data);
|
||||
DWORD threadid;
|
||||
data->mapping = p;
|
||||
data->handle = filemap;
|
||||
data->mapname = mapname;
|
||||
data->callback = callback;
|
||||
data->callback_ctx = callback_ctx;
|
||||
data->cds = cds; /* structure copy */
|
||||
data->hwnd = hwnd;
|
||||
if (CreateThread(NULL, 0, agent_query_thread, data, 0, &threadid))
|
||||
return 0;
|
||||
sfree(data);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The user either passed a null callback (indicating that the
|
||||
* query is required to be synchronous) or CreateThread failed.
|
||||
* Either way, we need a synchronous request.
|
||||
*/
|
||||
id = SendMessage(hwnd, WM_COPYDATA, (WPARAM) NULL, (LPARAM) &cds);
|
||||
if (id > 0) {
|
||||
retlen = 4 + GET_32BIT(p);
|
||||
ret = snewn(retlen, unsigned char);
|
||||
if (ret) {
|
||||
memcpy(ret, p, retlen);
|
||||
*out = ret;
|
||||
*outlen = retlen;
|
||||
}
|
||||
}
|
||||
UnmapViewOfFile(p);
|
||||
CloseHandle(filemap);
|
||||
return 1;
|
||||
}
|
||||
217
sFTPlugins/psftp/WINDOWS/WINPROXY.C
Normal file
217
sFTPlugins/psftp/WINDOWS/WINPROXY.C
Normal file
@@ -0,0 +1,217 @@
|
||||
/*
|
||||
* winproxy.c: Windows implementation of platform_new_connection(),
|
||||
* supporting an OpenSSH-like proxy command via the winhandl.c
|
||||
* mechanism.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define DEFINE_PLUG_METHOD_MACROS
|
||||
#include "tree234.h"
|
||||
#include "putty.h"
|
||||
#include "network.h"
|
||||
#include "proxy.h"
|
||||
|
||||
typedef struct Socket_localproxy_tag *Local_Proxy_Socket;
|
||||
|
||||
struct Socket_localproxy_tag {
|
||||
const struct socket_function_table *fn;
|
||||
/* the above variable absolutely *must* be the first in this structure */
|
||||
|
||||
HANDLE to_cmd_H, from_cmd_H;
|
||||
struct handle *to_cmd_h, *from_cmd_h;
|
||||
|
||||
char *error;
|
||||
|
||||
Plug plug;
|
||||
|
||||
void *privptr;
|
||||
};
|
||||
|
||||
int localproxy_gotdata(struct handle *h, void *data, int len)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) handle_get_privdata(h);
|
||||
|
||||
if (len < 0) {
|
||||
return plug_closing(ps->plug, "Read error from local proxy command",
|
||||
0, 0);
|
||||
} else if (len == 0) {
|
||||
return plug_closing(ps->plug, NULL, 0, 0);
|
||||
} else {
|
||||
return plug_receive(ps->plug, 1, data, len);
|
||||
}
|
||||
}
|
||||
|
||||
void localproxy_sentdata(struct handle *h, int new_backlog)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) handle_get_privdata(h);
|
||||
|
||||
plug_sent(ps->plug, new_backlog);
|
||||
}
|
||||
|
||||
static Plug sk_localproxy_plug (Socket s, Plug p)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
Plug ret = ps->plug;
|
||||
if (p)
|
||||
ps->plug = p;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void sk_localproxy_close (Socket s)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
|
||||
handle_free(ps->to_cmd_h);
|
||||
handle_free(ps->from_cmd_h);
|
||||
CloseHandle(ps->to_cmd_H);
|
||||
CloseHandle(ps->from_cmd_H);
|
||||
|
||||
sfree(ps);
|
||||
}
|
||||
|
||||
static int sk_localproxy_write (Socket s, const char *data, int len)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
|
||||
return handle_write(ps->to_cmd_h, data, len);
|
||||
}
|
||||
|
||||
static int sk_localproxy_write_oob(Socket s, const char *data, int len)
|
||||
{
|
||||
/*
|
||||
* oob data is treated as inband; nasty, but nothing really
|
||||
* better we can do
|
||||
*/
|
||||
return sk_localproxy_write(s, data, len);
|
||||
}
|
||||
|
||||
static void sk_localproxy_flush(Socket s)
|
||||
{
|
||||
/* Local_Proxy_Socket ps = (Local_Proxy_Socket) s; */
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
static void sk_localproxy_set_private_ptr(Socket s, void *ptr)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
ps->privptr = ptr;
|
||||
}
|
||||
|
||||
static void *sk_localproxy_get_private_ptr(Socket s)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
return ps->privptr;
|
||||
}
|
||||
|
||||
static void sk_localproxy_set_frozen(Socket s, int is_frozen)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
|
||||
/*
|
||||
* FIXME
|
||||
*/
|
||||
}
|
||||
|
||||
static const char *sk_localproxy_socket_error(Socket s)
|
||||
{
|
||||
Local_Proxy_Socket ps = (Local_Proxy_Socket) s;
|
||||
return ps->error;
|
||||
}
|
||||
|
||||
Socket platform_new_connection(SockAddr addr, char *hostname,
|
||||
int port, int privport,
|
||||
int oobinline, int nodelay, int keepalive,
|
||||
Plug plug, const Config *cfg)
|
||||
{
|
||||
char *cmd;
|
||||
|
||||
static const struct socket_function_table socket_fn_table = {
|
||||
sk_localproxy_plug,
|
||||
sk_localproxy_close,
|
||||
sk_localproxy_write,
|
||||
sk_localproxy_write_oob,
|
||||
sk_localproxy_flush,
|
||||
sk_localproxy_set_private_ptr,
|
||||
sk_localproxy_get_private_ptr,
|
||||
sk_localproxy_set_frozen,
|
||||
sk_localproxy_socket_error
|
||||
};
|
||||
|
||||
Local_Proxy_Socket ret;
|
||||
HANDLE us_to_cmd, us_from_cmd, cmd_to_us, cmd_from_us;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
if (cfg->proxy_type != PROXY_CMD)
|
||||
return NULL;
|
||||
|
||||
cmd = format_telnet_command(addr, port, cfg);
|
||||
|
||||
{
|
||||
char *msg = dupprintf("Starting local proxy command: %s", cmd);
|
||||
/* We're allowed to pass NULL here, because we're part of the Windows
|
||||
* front end so we know logevent doesn't expect any data. */
|
||||
logevent(NULL, msg);
|
||||
sfree(msg);
|
||||
}
|
||||
|
||||
ret = snew(struct Socket_localproxy_tag);
|
||||
ret->fn = &socket_fn_table;
|
||||
ret->plug = plug;
|
||||
ret->error = NULL;
|
||||
|
||||
/*
|
||||
* Create the pipes to the proxy command, and spawn the proxy
|
||||
* command process.
|
||||
*/
|
||||
sa.nLength = sizeof(sa);
|
||||
sa.lpSecurityDescriptor = NULL; /* default */
|
||||
sa.bInheritHandle = TRUE;
|
||||
if (!CreatePipe(&us_from_cmd, &cmd_to_us, &sa, 0)) {
|
||||
ret->error = dupprintf("Unable to create pipes for proxy command");
|
||||
return (Socket)ret;
|
||||
}
|
||||
|
||||
if (!CreatePipe(&cmd_from_us, &us_to_cmd, &sa, 0)) {
|
||||
CloseHandle(us_from_cmd);
|
||||
CloseHandle(cmd_to_us);
|
||||
ret->error = dupprintf("Unable to create pipes for proxy command");
|
||||
return (Socket)ret;
|
||||
}
|
||||
|
||||
SetHandleInformation(us_to_cmd, HANDLE_FLAG_INHERIT, 0);
|
||||
SetHandleInformation(us_from_cmd, HANDLE_FLAG_INHERIT, 0);
|
||||
|
||||
si.cb = sizeof(si);
|
||||
si.lpReserved = NULL;
|
||||
si.lpDesktop = NULL;
|
||||
si.lpTitle = NULL;
|
||||
si.dwFlags = STARTF_USESTDHANDLES;
|
||||
si.cbReserved2 = 0;
|
||||
si.lpReserved2 = NULL;
|
||||
si.hStdInput = cmd_from_us;
|
||||
si.hStdOutput = cmd_to_us;
|
||||
si.hStdError = NULL;
|
||||
CreateProcess(NULL, cmd, NULL, NULL, TRUE,
|
||||
CREATE_NO_WINDOW | NORMAL_PRIORITY_CLASS,
|
||||
NULL, NULL, &si, &pi);
|
||||
|
||||
CloseHandle(cmd_from_us);
|
||||
CloseHandle(cmd_to_us);
|
||||
|
||||
ret->to_cmd_H = us_to_cmd;
|
||||
ret->from_cmd_H = us_from_cmd;
|
||||
|
||||
ret->from_cmd_h = handle_input_new(ret->from_cmd_H, localproxy_gotdata,
|
||||
ret, 0);
|
||||
ret->to_cmd_h = handle_output_new(ret->to_cmd_H, localproxy_sentdata,
|
||||
ret, 0);
|
||||
|
||||
/* We are responsible for this and don't need it any more */
|
||||
sk_addr_free(addr);
|
||||
|
||||
return (Socket) ret;
|
||||
}
|
||||
716
sFTPlugins/psftp/WINDOWS/WINSFTP.C
Normal file
716
sFTPlugins/psftp/WINDOWS/WINSFTP.C
Normal file
@@ -0,0 +1,716 @@
|
||||
/*
|
||||
* winsftp.c: the Windows-specific parts of PSFTP and PSCP.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "putty.h"
|
||||
#include "psftp.h"
|
||||
#include "int64.h"
|
||||
|
||||
// Disable warning messages 4996
|
||||
#pragma warning( disable : 4996 )
|
||||
|
||||
char *get_ttymode(void *frontend, const char *mode) { return NULL; }
|
||||
|
||||
int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
|
||||
{
|
||||
int ret;
|
||||
ret = cmdline_get_passwd_input(p, in, inlen);
|
||||
if (ret == -1)
|
||||
ret = console_get_userpass_input(p, in, inlen);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* File access abstraction.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Set local current directory. Returns NULL on success, or else an
|
||||
* error message which must be freed after printing.
|
||||
*/
|
||||
char *psftp_lcd(char *dir)
|
||||
{
|
||||
char *ret = NULL;
|
||||
|
||||
if (!SetCurrentDirectory(dir)) {
|
||||
LPVOID message;
|
||||
int i;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, GetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)&message, 0, NULL);
|
||||
i = strcspn((char *)message, "\n");
|
||||
ret = dupprintf("%.*s", i, (LPCTSTR)message);
|
||||
LocalFree(message);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get local current directory. Returns a string which must be
|
||||
* freed.
|
||||
*/
|
||||
char *psftp_getcwd(void)
|
||||
{
|
||||
char *ret = snewn(256, char);
|
||||
int len = GetCurrentDirectory(256, ret);
|
||||
if (len > 256)
|
||||
ret = sresize(ret, len, char);
|
||||
GetCurrentDirectory(len, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define TIME_POSIX_TO_WIN(t, ft) (*(LONGLONG*)&(ft) = \
|
||||
((LONGLONG) (t) + (LONGLONG) 11644473600) * (LONGLONG) 10000000)
|
||||
#define TIME_WIN_TO_POSIX(ft, t) ((t) = (unsigned long) \
|
||||
((*(LONGLONG*)&(ft)) / (LONGLONG) 10000000 - (LONGLONG) 11644473600))
|
||||
|
||||
struct RFile {
|
||||
HANDLE h;
|
||||
};
|
||||
|
||||
RFile *open_existing_file(char *name, uint64 *size,
|
||||
unsigned long *mtime, unsigned long *atime)
|
||||
{
|
||||
HANDLE h;
|
||||
RFile *ret;
|
||||
|
||||
h = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, 0, 0);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
|
||||
ret = snew(RFile);
|
||||
ret->h = h;
|
||||
|
||||
if (size)
|
||||
size->lo=GetFileSize(h, &(size->hi));
|
||||
|
||||
if (mtime || atime) {
|
||||
FILETIME actime, wrtime;
|
||||
GetFileTime(h, NULL, &actime, &wrtime);
|
||||
if (atime)
|
||||
TIME_WIN_TO_POSIX(actime, *atime);
|
||||
if (mtime)
|
||||
TIME_WIN_TO_POSIX(wrtime, *mtime);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int read_from_file(RFile *f, void *buffer, int length)
|
||||
{
|
||||
int ret, read;
|
||||
ret = ReadFile(f->h, buffer, length, &read, NULL);
|
||||
if (!ret)
|
||||
return -1; /* error */
|
||||
else
|
||||
return read;
|
||||
}
|
||||
|
||||
void close_rfile(RFile *f)
|
||||
{
|
||||
CloseHandle(f->h);
|
||||
sfree(f);
|
||||
}
|
||||
|
||||
struct WFile {
|
||||
HANDLE h;
|
||||
};
|
||||
|
||||
WFile *open_new_file(char *name)
|
||||
{
|
||||
HANDLE h;
|
||||
WFile *ret;
|
||||
|
||||
h = CreateFile(name, GENERIC_WRITE, 0, NULL,
|
||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
|
||||
ret = snew(WFile);
|
||||
ret->h = h;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
WFile *open_existing_wfile(char *name, uint64 *size)
|
||||
{
|
||||
HANDLE h;
|
||||
WFile *ret;
|
||||
|
||||
h = CreateFile(name, GENERIC_WRITE, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, 0, 0);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
|
||||
ret = snew(WFile);
|
||||
ret->h = h;
|
||||
|
||||
if (size)
|
||||
size->lo=GetFileSize(h, &(size->hi));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int write_to_file(WFile *f, void *buffer, int length)
|
||||
{
|
||||
int ret, written;
|
||||
ret = WriteFile(f->h, buffer, length, &written, NULL);
|
||||
if (!ret)
|
||||
return -1; /* error */
|
||||
else
|
||||
return written;
|
||||
}
|
||||
|
||||
void set_file_times(WFile *f, unsigned long mtime, unsigned long atime)
|
||||
{
|
||||
FILETIME actime, wrtime;
|
||||
TIME_POSIX_TO_WIN(atime, actime);
|
||||
TIME_POSIX_TO_WIN(mtime, wrtime);
|
||||
SetFileTime(f->h, NULL, &actime, &wrtime);
|
||||
}
|
||||
|
||||
void close_wfile(WFile *f)
|
||||
{
|
||||
CloseHandle(f->h);
|
||||
sfree(f);
|
||||
}
|
||||
|
||||
/* Seek offset bytes through file, from whence, where whence is
|
||||
FROM_START, FROM_CURRENT, or FROM_END */
|
||||
int seek_file(WFile *f, uint64 offset, int whence)
|
||||
{
|
||||
DWORD movemethod;
|
||||
|
||||
switch (whence) {
|
||||
case FROM_START:
|
||||
movemethod = FILE_BEGIN;
|
||||
break;
|
||||
case FROM_CURRENT:
|
||||
movemethod = FILE_CURRENT;
|
||||
break;
|
||||
case FROM_END:
|
||||
movemethod = FILE_END;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
SetFilePointer(f->h, offset.lo, &(offset.hi), movemethod);
|
||||
|
||||
if (GetLastError() != NO_ERROR)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 get_file_posn(WFile *f)
|
||||
{
|
||||
uint64 ret;
|
||||
|
||||
ret.hi = 0L;
|
||||
ret.lo = SetFilePointer(f->h, 0L, &(ret.hi), FILE_CURRENT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int file_type(char *name)
|
||||
{
|
||||
DWORD attr;
|
||||
attr = GetFileAttributes(name);
|
||||
/* We know of no `weird' files under Windows. */
|
||||
if (attr == (DWORD)-1)
|
||||
return FILE_TYPE_NONEXISTENT;
|
||||
else if (attr & FILE_ATTRIBUTE_DIRECTORY)
|
||||
return FILE_TYPE_DIRECTORY;
|
||||
else
|
||||
return FILE_TYPE_FILE;
|
||||
}
|
||||
|
||||
struct DirHandle {
|
||||
HANDLE h;
|
||||
char *name;
|
||||
};
|
||||
|
||||
DirHandle *open_directory(char *name)
|
||||
{
|
||||
HANDLE h;
|
||||
WIN32_FIND_DATA fdat;
|
||||
char *findfile;
|
||||
DirHandle *ret;
|
||||
|
||||
/* Enumerate files in dir `foo'. */
|
||||
findfile = dupcat(name, "/*", NULL);
|
||||
h = FindFirstFile(findfile, &fdat);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
sfree(findfile);
|
||||
|
||||
ret = snew(DirHandle);
|
||||
ret->h = h;
|
||||
ret->name = dupstr(fdat.cFileName);
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *read_filename(DirHandle *dir)
|
||||
{
|
||||
do {
|
||||
|
||||
if (!dir->name) {
|
||||
WIN32_FIND_DATA fdat;
|
||||
int ok = FindNextFile(dir->h, &fdat);
|
||||
if (!ok)
|
||||
return NULL;
|
||||
else
|
||||
dir->name = dupstr(fdat.cFileName);
|
||||
}
|
||||
|
||||
assert(dir->name);
|
||||
if (dir->name[0] == '.' &&
|
||||
(dir->name[1] == '\0' ||
|
||||
(dir->name[1] == '.' && dir->name[2] == '\0'))) {
|
||||
sfree(dir->name);
|
||||
dir->name = NULL;
|
||||
}
|
||||
|
||||
} while (!dir->name);
|
||||
|
||||
if (dir->name) {
|
||||
char *ret = dir->name;
|
||||
dir->name = NULL;
|
||||
return ret;
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void close_directory(DirHandle *dir)
|
||||
{
|
||||
FindClose(dir->h);
|
||||
if (dir->name)
|
||||
sfree(dir->name);
|
||||
sfree(dir);
|
||||
}
|
||||
|
||||
int test_wildcard(char *name, int cmdline)
|
||||
{
|
||||
HANDLE fh;
|
||||
WIN32_FIND_DATA fdat;
|
||||
|
||||
/* First see if the exact name exists. */
|
||||
if (GetFileAttributes(name) != (DWORD)-1)
|
||||
return WCTYPE_FILENAME;
|
||||
|
||||
/* Otherwise see if a wildcard match finds anything. */
|
||||
fh = FindFirstFile(name, &fdat);
|
||||
if (fh == INVALID_HANDLE_VALUE)
|
||||
return WCTYPE_NONEXISTENT;
|
||||
|
||||
FindClose(fh);
|
||||
return WCTYPE_WILDCARD;
|
||||
}
|
||||
|
||||
struct WildcardMatcher {
|
||||
HANDLE h;
|
||||
char *name;
|
||||
char *srcpath;
|
||||
};
|
||||
|
||||
/*
|
||||
* Return a pointer to the portion of str that comes after the last
|
||||
* slash (or backslash or colon, if `local' is TRUE).
|
||||
*/
|
||||
static char *stripslashes(char *str, int local)
|
||||
{
|
||||
char *p;
|
||||
|
||||
if (local) {
|
||||
p = strchr(str, ':');
|
||||
if (p) str = p+1;
|
||||
}
|
||||
|
||||
p = strrchr(str, '/');
|
||||
if (p) str = p+1;
|
||||
|
||||
if (local) {
|
||||
p = strrchr(str, '\\');
|
||||
if (p) str = p+1;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
WildcardMatcher *begin_wildcard_matching(char *name)
|
||||
{
|
||||
HANDLE h;
|
||||
WIN32_FIND_DATA fdat;
|
||||
WildcardMatcher *ret;
|
||||
char *last;
|
||||
|
||||
h = FindFirstFile(name, &fdat);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
|
||||
ret = snew(WildcardMatcher);
|
||||
ret->h = h;
|
||||
ret->srcpath = dupstr(name);
|
||||
last = stripslashes(ret->srcpath, 1);
|
||||
*last = '\0';
|
||||
if (fdat.cFileName[0] == '.' &&
|
||||
(fdat.cFileName[1] == '\0' ||
|
||||
(fdat.cFileName[1] == '.' && fdat.cFileName[2] == '\0')))
|
||||
ret->name = NULL;
|
||||
else
|
||||
ret->name = dupcat(ret->srcpath, fdat.cFileName, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *wildcard_get_filename(WildcardMatcher *dir)
|
||||
{
|
||||
while (!dir->name) {
|
||||
WIN32_FIND_DATA fdat;
|
||||
int ok = FindNextFile(dir->h, &fdat);
|
||||
|
||||
if (!ok)
|
||||
return NULL;
|
||||
|
||||
if (fdat.cFileName[0] == '.' &&
|
||||
(fdat.cFileName[1] == '\0' ||
|
||||
(fdat.cFileName[1] == '.' && fdat.cFileName[2] == '\0')))
|
||||
dir->name = NULL;
|
||||
else
|
||||
dir->name = dupcat(dir->srcpath, fdat.cFileName, NULL);
|
||||
}
|
||||
|
||||
if (dir->name) {
|
||||
char *ret = dir->name;
|
||||
dir->name = NULL;
|
||||
return ret;
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void finish_wildcard_matching(WildcardMatcher *dir)
|
||||
{
|
||||
FindClose(dir->h);
|
||||
if (dir->name)
|
||||
sfree(dir->name);
|
||||
sfree(dir->srcpath);
|
||||
sfree(dir);
|
||||
}
|
||||
|
||||
int vet_filename(char *name)
|
||||
{
|
||||
if (strchr(name, '/') || strchr(name, '\\') || strchr(name, ':'))
|
||||
return FALSE;
|
||||
|
||||
if (!name[strspn(name, ".")]) /* entirely composed of dots */
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int create_directory(char *name)
|
||||
{
|
||||
return CreateDirectory(name, NULL) != 0;
|
||||
}
|
||||
|
||||
char *dir_file_cat(char *dir, char *file)
|
||||
{
|
||||
return dupcat(dir, "\\", file, NULL);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Platform-specific network handling.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Be told what socket we're supposed to be using.
|
||||
*/
|
||||
static SOCKET sftp_ssh_socket = INVALID_SOCKET;
|
||||
static HANDLE netevent = INVALID_HANDLE_VALUE;
|
||||
char *do_select(SOCKET skt, int startup)
|
||||
{
|
||||
int events;
|
||||
if (startup)
|
||||
sftp_ssh_socket = skt;
|
||||
else
|
||||
sftp_ssh_socket = INVALID_SOCKET;
|
||||
|
||||
if (p_WSAEventSelect) {
|
||||
if (startup) {
|
||||
events = (FD_CONNECT | FD_READ | FD_WRITE |
|
||||
FD_OOB | FD_CLOSE | FD_ACCEPT);
|
||||
netevent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
} else {
|
||||
events = 0;
|
||||
}
|
||||
if (p_WSAEventSelect(skt, netevent, events) == SOCKET_ERROR) {
|
||||
switch (p_WSAGetLastError()) {
|
||||
case WSAENETDOWN:
|
||||
return "Network is down";
|
||||
default:
|
||||
return "WSAEventSelect(): unknown error";
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
extern int select_result(WPARAM, LPARAM);
|
||||
|
||||
int do_eventsel_loop(HANDLE other_event)
|
||||
{
|
||||
int n, nhandles, nallhandles, netindex, otherindex;
|
||||
long next, ticks;
|
||||
HANDLE *handles;
|
||||
SOCKET *sklist;
|
||||
int skcount;
|
||||
long now = GETTICKCOUNT();
|
||||
|
||||
if (run_timers(now, &next)) {
|
||||
ticks = next - GETTICKCOUNT();
|
||||
if (ticks < 0) ticks = 0; /* just in case */
|
||||
} else {
|
||||
ticks = INFINITE;
|
||||
}
|
||||
|
||||
handles = handle_get_events(&nhandles);
|
||||
handles = sresize(handles, nhandles+2, HANDLE);
|
||||
nallhandles = nhandles;
|
||||
|
||||
if (netevent != INVALID_HANDLE_VALUE)
|
||||
handles[netindex = nallhandles++] = netevent;
|
||||
else
|
||||
netindex = -1;
|
||||
if (other_event != INVALID_HANDLE_VALUE)
|
||||
handles[otherindex = nallhandles++] = other_event;
|
||||
else
|
||||
otherindex = -1;
|
||||
|
||||
n = WaitForMultipleObjects(nallhandles, handles, FALSE, ticks);
|
||||
|
||||
if ((unsigned)(n - WAIT_OBJECT_0) < (unsigned)nhandles) {
|
||||
handle_got_event(handles[n - WAIT_OBJECT_0]);
|
||||
} else if (netindex >= 0 && n == WAIT_OBJECT_0 + netindex) {
|
||||
WSANETWORKEVENTS things;
|
||||
SOCKET socket;
|
||||
extern SOCKET first_socket(int *), next_socket(int *);
|
||||
extern int select_result(WPARAM, LPARAM);
|
||||
int i, socketstate;
|
||||
|
||||
/*
|
||||
* We must not call select_result() for any socket
|
||||
* until we have finished enumerating within the
|
||||
* tree. This is because select_result() may close
|
||||
* the socket and modify the tree.
|
||||
*/
|
||||
/* Count the active sockets. */
|
||||
i = 0;
|
||||
for (socket = first_socket(&socketstate);
|
||||
socket != INVALID_SOCKET;
|
||||
socket = next_socket(&socketstate)) i++;
|
||||
|
||||
/* Expand the buffer if necessary. */
|
||||
sklist = snewn(i, SOCKET);
|
||||
|
||||
/* Retrieve the sockets into sklist. */
|
||||
skcount = 0;
|
||||
for (socket = first_socket(&socketstate);
|
||||
socket != INVALID_SOCKET;
|
||||
socket = next_socket(&socketstate)) {
|
||||
sklist[skcount++] = socket;
|
||||
}
|
||||
|
||||
/* Now we're done enumerating; go through the list. */
|
||||
for (i = 0; i < skcount; i++) {
|
||||
WPARAM wp;
|
||||
socket = sklist[i];
|
||||
wp = (WPARAM) socket;
|
||||
if (!p_WSAEnumNetworkEvents(socket, NULL, &things)) {
|
||||
static const struct { int bit, mask; } eventtypes[] = {
|
||||
{FD_CONNECT_BIT, FD_CONNECT},
|
||||
{FD_READ_BIT, FD_READ},
|
||||
{FD_CLOSE_BIT, FD_CLOSE},
|
||||
{FD_OOB_BIT, FD_OOB},
|
||||
{FD_WRITE_BIT, FD_WRITE},
|
||||
{FD_ACCEPT_BIT, FD_ACCEPT},
|
||||
};
|
||||
int e;
|
||||
|
||||
noise_ultralight(socket);
|
||||
noise_ultralight(things.lNetworkEvents);
|
||||
|
||||
for (e = 0; e < lenof(eventtypes); e++)
|
||||
if (things.lNetworkEvents & eventtypes[e].mask) {
|
||||
LPARAM lp;
|
||||
int err = things.iErrorCode[eventtypes[e].bit];
|
||||
lp = WSAMAKESELECTREPLY(eventtypes[e].mask, err);
|
||||
select_result(wp, lp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sfree(sklist);
|
||||
}
|
||||
|
||||
sfree(handles);
|
||||
|
||||
if (n == WAIT_TIMEOUT) {
|
||||
now = next;
|
||||
} else {
|
||||
now = GETTICKCOUNT();
|
||||
}
|
||||
|
||||
if (otherindex >= 0 && n == WAIT_OBJECT_0 + otherindex)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for some network data and process it.
|
||||
*
|
||||
* We have two variants of this function. One uses select() so that
|
||||
* it's compatible with WinSock 1. The other uses WSAEventSelect
|
||||
* and MsgWaitForMultipleObjects, so that we can consistently use
|
||||
* WSAEventSelect throughout; this enables us to also implement
|
||||
* ssh_sftp_get_cmdline() using a parallel mechanism.
|
||||
*/
|
||||
int ssh_sftp_loop_iteration(void)
|
||||
{
|
||||
if (p_WSAEventSelect == NULL) {
|
||||
fd_set readfds;
|
||||
int ret;
|
||||
long now = GETTICKCOUNT();
|
||||
|
||||
if (sftp_ssh_socket == INVALID_SOCKET)
|
||||
return -1; /* doom */
|
||||
|
||||
if (socket_writable(sftp_ssh_socket))
|
||||
select_result((WPARAM) sftp_ssh_socket, (LPARAM) FD_WRITE);
|
||||
|
||||
do {
|
||||
long next, ticks;
|
||||
struct timeval tv, *ptv;
|
||||
|
||||
if (run_timers(now, &next)) {
|
||||
ticks = next - GETTICKCOUNT();
|
||||
if (ticks <= 0)
|
||||
ticks = 1; /* just in case */
|
||||
tv.tv_sec = ticks / 1000;
|
||||
tv.tv_usec = ticks % 1000 * 1000;
|
||||
ptv = &tv;
|
||||
} else {
|
||||
ptv = NULL;
|
||||
}
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
FD_SET(sftp_ssh_socket, &readfds);
|
||||
ret = p_select(1, &readfds, NULL, NULL, ptv);
|
||||
|
||||
if (ret < 0)
|
||||
return -1; /* doom */
|
||||
else if (ret == 0)
|
||||
now = next;
|
||||
else
|
||||
now = GETTICKCOUNT();
|
||||
|
||||
} while (ret == 0);
|
||||
|
||||
select_result((WPARAM) sftp_ssh_socket, (LPARAM) FD_READ);
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
return do_eventsel_loop(INVALID_HANDLE_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Read a command line from standard input.
|
||||
*
|
||||
* In the presence of WinSock 2, we can use WSAEventSelect to
|
||||
* mediate between the socket and stdin, meaning we can send
|
||||
* keepalives and respond to server events even while waiting at
|
||||
* the PSFTP command prompt. Without WS2, we fall back to a simple
|
||||
* fgets.
|
||||
*/
|
||||
struct command_read_ctx {
|
||||
HANDLE event;
|
||||
char *line;
|
||||
};
|
||||
|
||||
static DWORD WINAPI command_read_thread(void *param)
|
||||
{
|
||||
struct command_read_ctx *ctx = (struct command_read_ctx *) param;
|
||||
|
||||
ctx->line = fgetline(stdin);
|
||||
|
||||
SetEvent(ctx->event);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *ssh_sftp_get_cmdline(char *prompt, int no_fds_ok)
|
||||
{
|
||||
int ret;
|
||||
struct command_read_ctx actx, *ctx = &actx;
|
||||
DWORD threadid;
|
||||
|
||||
fputs(prompt, stdout);
|
||||
fflush(stdout);
|
||||
|
||||
if ((sftp_ssh_socket == INVALID_SOCKET && no_fds_ok) ||
|
||||
p_WSAEventSelect == NULL) {
|
||||
return fgetline(stdin); /* very simple */
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a second thread to read from stdin. Process network
|
||||
* and timing events until it terminates.
|
||||
*/
|
||||
ctx->event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
ctx->line = NULL;
|
||||
|
||||
if (!CreateThread(NULL, 0, command_read_thread,
|
||||
ctx, 0, &threadid)) {
|
||||
fprintf(stderr, "Unable to create command input thread\n");
|
||||
cleanup_exit(1);
|
||||
}
|
||||
|
||||
do {
|
||||
ret = do_eventsel_loop(ctx->event);
|
||||
|
||||
/* Error return can only occur if netevent==NULL, and it ain't. */
|
||||
assert(ret >= 0);
|
||||
} while (ret == 0);
|
||||
|
||||
return ctx->line;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Main program. Parse arguments etc. (renamed to dllmain)
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = psftp_main(argc, argv);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
__declspec(dllexport) int __stdcall dllmain(int argc, char *argv[]);
|
||||
int __stdcall dllmain(int argc, char *argv[])
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = psftp_main(argc, argv);
|
||||
|
||||
return ret;
|
||||
}
|
||||
656
sFTPlugins/psftp/WINDOWS/WINSTORE.C
Normal file
656
sFTPlugins/psftp/WINDOWS/WINSTORE.C
Normal file
@@ -0,0 +1,656 @@
|
||||
/*
|
||||
* winstore.c: Windows-specific implementation of the interface
|
||||
* defined in storage.h.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include "putty.h"
|
||||
#include "storage.h"
|
||||
|
||||
#include <shlobj.h>
|
||||
#ifndef CSIDL_APPDATA
|
||||
#define CSIDL_APPDATA 0x001a
|
||||
#endif
|
||||
#ifndef CSIDL_LOCAL_APPDATA
|
||||
#define CSIDL_LOCAL_APPDATA 0x001c
|
||||
#endif
|
||||
|
||||
static const char *const puttystr = PUTTY_REG_POS "\\Sessions";
|
||||
|
||||
static const char hex[16] = "0123456789ABCDEF";
|
||||
|
||||
static int tried_shgetfolderpath = FALSE;
|
||||
static HMODULE shell32_module = NULL;
|
||||
typedef HRESULT (WINAPI *p_SHGetFolderPath_t)
|
||||
(HWND, int, HANDLE, DWORD, LPTSTR);
|
||||
static p_SHGetFolderPath_t p_SHGetFolderPath = NULL;
|
||||
|
||||
static void mungestr(const char *in, char *out)
|
||||
{
|
||||
int candot = 0;
|
||||
|
||||
while (*in) {
|
||||
if (*in == ' ' || *in == '\\' || *in == '*' || *in == '?' ||
|
||||
*in == '%' || *in < ' ' || *in > '~' || (*in == '.'
|
||||
&& !candot)) {
|
||||
*out++ = '%';
|
||||
*out++ = hex[((unsigned char) *in) >> 4];
|
||||
*out++ = hex[((unsigned char) *in) & 15];
|
||||
} else
|
||||
*out++ = *in;
|
||||
in++;
|
||||
candot = 1;
|
||||
}
|
||||
*out = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
static void unmungestr(const char *in, char *out, int outlen)
|
||||
{
|
||||
while (*in) {
|
||||
if (*in == '%' && in[1] && in[2]) {
|
||||
int i, j;
|
||||
|
||||
i = in[1] - '0';
|
||||
i -= (i > 9 ? 7 : 0);
|
||||
j = in[2] - '0';
|
||||
j -= (j > 9 ? 7 : 0);
|
||||
|
||||
*out++ = (i << 4) + j;
|
||||
if (!--outlen)
|
||||
return;
|
||||
in += 3;
|
||||
} else {
|
||||
*out++ = *in++;
|
||||
if (!--outlen)
|
||||
return;
|
||||
}
|
||||
}
|
||||
*out = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
void *open_settings_w(const char *sessionname, char **errmsg)
|
||||
{
|
||||
HKEY subkey1, sesskey;
|
||||
int ret;
|
||||
char *p;
|
||||
|
||||
*errmsg = NULL;
|
||||
|
||||
if (!sessionname || !*sessionname)
|
||||
sessionname = "Default Settings";
|
||||
|
||||
p = snewn(3 * strlen(sessionname) + 1, char);
|
||||
mungestr(sessionname, p);
|
||||
|
||||
ret = RegCreateKey(HKEY_CURRENT_USER, puttystr, &subkey1);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
sfree(p);
|
||||
*errmsg = dupprintf("Unable to create registry key\n"
|
||||
"HKEY_CURRENT_USER\\%s", puttystr);
|
||||
return NULL;
|
||||
}
|
||||
ret = RegCreateKey(subkey1, p, &sesskey);
|
||||
RegCloseKey(subkey1);
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
*errmsg = dupprintf("Unable to create registry key\n"
|
||||
"HKEY_CURRENT_USER\\%s\\%s", puttystr, p);
|
||||
sfree(p);
|
||||
return NULL;
|
||||
}
|
||||
sfree(p);
|
||||
return (void *) sesskey;
|
||||
}
|
||||
|
||||
void write_setting_s(void *handle, const char *key, const char *value)
|
||||
{
|
||||
if (handle)
|
||||
RegSetValueEx((HKEY) handle, key, 0, REG_SZ, value,
|
||||
1 + strlen(value));
|
||||
}
|
||||
|
||||
void write_setting_i(void *handle, const char *key, int value)
|
||||
{
|
||||
if (handle)
|
||||
RegSetValueEx((HKEY) handle, key, 0, REG_DWORD,
|
||||
(CONST BYTE *) &value, sizeof(value));
|
||||
}
|
||||
|
||||
void close_settings_w(void *handle)
|
||||
{
|
||||
RegCloseKey((HKEY) handle);
|
||||
}
|
||||
|
||||
void *open_settings_r(const char *sessionname)
|
||||
{
|
||||
HKEY subkey1, sesskey;
|
||||
char *p;
|
||||
|
||||
if (!sessionname || !*sessionname)
|
||||
sessionname = "Default Settings";
|
||||
|
||||
p = snewn(3 * strlen(sessionname) + 1, char);
|
||||
mungestr(sessionname, p);
|
||||
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &subkey1) != ERROR_SUCCESS) {
|
||||
sesskey = NULL;
|
||||
} else {
|
||||
if (RegOpenKey(subkey1, p, &sesskey) != ERROR_SUCCESS) {
|
||||
sesskey = NULL;
|
||||
}
|
||||
RegCloseKey(subkey1);
|
||||
}
|
||||
|
||||
sfree(p);
|
||||
|
||||
return (void *) sesskey;
|
||||
}
|
||||
|
||||
char *read_setting_s(void *handle, const char *key, char *buffer, int buflen)
|
||||
{
|
||||
DWORD type, size;
|
||||
size = buflen;
|
||||
|
||||
if (!handle ||
|
||||
RegQueryValueEx((HKEY) handle, key, 0,
|
||||
&type, buffer, &size) != ERROR_SUCCESS ||
|
||||
type != REG_SZ) return NULL;
|
||||
else
|
||||
return buffer;
|
||||
}
|
||||
|
||||
int read_setting_i(void *handle, const char *key, int defvalue)
|
||||
{
|
||||
DWORD type, val, size;
|
||||
size = sizeof(val);
|
||||
|
||||
if (!handle ||
|
||||
RegQueryValueEx((HKEY) handle, key, 0, &type,
|
||||
(BYTE *) &val, &size) != ERROR_SUCCESS ||
|
||||
size != sizeof(val) || type != REG_DWORD)
|
||||
return defvalue;
|
||||
else
|
||||
return val;
|
||||
}
|
||||
|
||||
int read_setting_fontspec(void *handle, const char *name, FontSpec *result)
|
||||
{
|
||||
char *settingname;
|
||||
FontSpec ret;
|
||||
|
||||
if (!read_setting_s(handle, name, ret.name, sizeof(ret.name)))
|
||||
return 0;
|
||||
settingname = dupcat(name, "IsBold", NULL);
|
||||
ret.isbold = read_setting_i(handle, settingname, -1);
|
||||
sfree(settingname);
|
||||
if (ret.isbold == -1) return 0;
|
||||
settingname = dupcat(name, "CharSet", NULL);
|
||||
ret.charset = read_setting_i(handle, settingname, -1);
|
||||
sfree(settingname);
|
||||
if (ret.charset == -1) return 0;
|
||||
settingname = dupcat(name, "Height", NULL);
|
||||
ret.height = read_setting_i(handle, settingname, INT_MIN);
|
||||
sfree(settingname);
|
||||
if (ret.height == INT_MIN) return 0;
|
||||
*result = ret;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void write_setting_fontspec(void *handle, const char *name, FontSpec font)
|
||||
{
|
||||
char *settingname;
|
||||
|
||||
write_setting_s(handle, name, font.name);
|
||||
settingname = dupcat(name, "IsBold", NULL);
|
||||
write_setting_i(handle, settingname, font.isbold);
|
||||
sfree(settingname);
|
||||
settingname = dupcat(name, "CharSet", NULL);
|
||||
write_setting_i(handle, settingname, font.charset);
|
||||
sfree(settingname);
|
||||
settingname = dupcat(name, "Height", NULL);
|
||||
write_setting_i(handle, settingname, font.height);
|
||||
sfree(settingname);
|
||||
}
|
||||
|
||||
int read_setting_filename(void *handle, const char *name, Filename *result)
|
||||
{
|
||||
return !!read_setting_s(handle, name, result->path, sizeof(result->path));
|
||||
}
|
||||
|
||||
void write_setting_filename(void *handle, const char *name, Filename result)
|
||||
{
|
||||
write_setting_s(handle, name, result.path);
|
||||
}
|
||||
|
||||
void close_settings_r(void *handle)
|
||||
{
|
||||
RegCloseKey((HKEY) handle);
|
||||
}
|
||||
|
||||
void del_settings(const char *sessionname)
|
||||
{
|
||||
HKEY subkey1;
|
||||
char *p;
|
||||
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &subkey1) != ERROR_SUCCESS)
|
||||
return;
|
||||
|
||||
p = snewn(3 * strlen(sessionname) + 1, char);
|
||||
mungestr(sessionname, p);
|
||||
RegDeleteKey(subkey1, p);
|
||||
sfree(p);
|
||||
|
||||
RegCloseKey(subkey1);
|
||||
}
|
||||
|
||||
struct enumsettings {
|
||||
HKEY key;
|
||||
int i;
|
||||
};
|
||||
|
||||
void *enum_settings_start(void)
|
||||
{
|
||||
struct enumsettings *ret;
|
||||
HKEY key;
|
||||
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &key) != ERROR_SUCCESS)
|
||||
return NULL;
|
||||
|
||||
ret = snew(struct enumsettings);
|
||||
if (ret) {
|
||||
ret->key = key;
|
||||
ret->i = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *enum_settings_next(void *handle, char *buffer, int buflen)
|
||||
{
|
||||
struct enumsettings *e = (struct enumsettings *) handle;
|
||||
char *otherbuf;
|
||||
otherbuf = snewn(3 * buflen, char);
|
||||
if (RegEnumKey(e->key, e->i++, otherbuf, 3 * buflen) == ERROR_SUCCESS) {
|
||||
unmungestr(otherbuf, buffer, buflen);
|
||||
sfree(otherbuf);
|
||||
return buffer;
|
||||
} else {
|
||||
sfree(otherbuf);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void enum_settings_finish(void *handle)
|
||||
{
|
||||
struct enumsettings *e = (struct enumsettings *) handle;
|
||||
RegCloseKey(e->key);
|
||||
sfree(e);
|
||||
}
|
||||
|
||||
static void hostkey_regname(char *buffer, const char *hostname,
|
||||
int port, const char *keytype)
|
||||
{
|
||||
int len;
|
||||
strcpy(buffer, keytype);
|
||||
strcat(buffer, "@");
|
||||
len = strlen(buffer);
|
||||
len += sprintf(buffer + len, "%d:", port);
|
||||
mungestr(hostname, buffer + strlen(buffer));
|
||||
}
|
||||
|
||||
int verify_host_key(const char *hostname, int port,
|
||||
const char *keytype, const char *key)
|
||||
{
|
||||
char *otherstr, *regname;
|
||||
int len;
|
||||
HKEY rkey;
|
||||
DWORD readlen;
|
||||
DWORD type;
|
||||
int ret, compare;
|
||||
|
||||
len = 1 + strlen(key);
|
||||
|
||||
/*
|
||||
* Now read a saved key in from the registry and see what it
|
||||
* says.
|
||||
*/
|
||||
otherstr = snewn(len, char);
|
||||
regname = snewn(3 * (strlen(hostname) + strlen(keytype)) + 15, char);
|
||||
|
||||
hostkey_regname(regname, hostname, port, keytype);
|
||||
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_POS "\\SshHostKeys",
|
||||
&rkey) != ERROR_SUCCESS)
|
||||
return 1; /* key does not exist in registry */
|
||||
|
||||
readlen = len;
|
||||
ret = RegQueryValueEx(rkey, regname, NULL, &type, otherstr, &readlen);
|
||||
|
||||
if (ret != ERROR_SUCCESS && ret != ERROR_MORE_DATA &&
|
||||
!strcmp(keytype, "rsa")) {
|
||||
/*
|
||||
* Key didn't exist. If the key type is RSA, we'll try
|
||||
* another trick, which is to look up the _old_ key format
|
||||
* under just the hostname and translate that.
|
||||
*/
|
||||
char *justhost = regname + 1 + strcspn(regname, ":");
|
||||
char *oldstyle = snewn(len + 10, char); /* safety margin */
|
||||
readlen = len;
|
||||
ret = RegQueryValueEx(rkey, justhost, NULL, &type,
|
||||
oldstyle, &readlen);
|
||||
|
||||
if (ret == ERROR_SUCCESS && type == REG_SZ) {
|
||||
/*
|
||||
* The old format is two old-style bignums separated by
|
||||
* a slash. An old-style bignum is made of groups of
|
||||
* four hex digits: digits are ordered in sensible
|
||||
* (most to least significant) order within each group,
|
||||
* but groups are ordered in silly (least to most)
|
||||
* order within the bignum. The new format is two
|
||||
* ordinary C-format hex numbers (0xABCDEFG...XYZ, with
|
||||
* A nonzero except in the special case 0x0, which
|
||||
* doesn't appear anyway in RSA keys) separated by a
|
||||
* comma. All hex digits are lowercase in both formats.
|
||||
*/
|
||||
char *p = otherstr;
|
||||
char *q = oldstyle;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
int ndigits, nwords;
|
||||
*p++ = '0';
|
||||
*p++ = 'x';
|
||||
ndigits = strcspn(q, "/"); /* find / or end of string */
|
||||
nwords = ndigits / 4;
|
||||
/* now trim ndigits to remove leading zeros */
|
||||
while (q[(ndigits - 1) ^ 3] == '0' && ndigits > 1)
|
||||
ndigits--;
|
||||
/* now move digits over to new string */
|
||||
for (j = 0; j < ndigits; j++)
|
||||
p[ndigits - 1 - j] = q[j ^ 3];
|
||||
p += ndigits;
|
||||
q += nwords * 4;
|
||||
if (*q) {
|
||||
q++; /* eat the slash */
|
||||
*p++ = ','; /* add a comma */
|
||||
}
|
||||
*p = '\0'; /* terminate the string */
|
||||
}
|
||||
|
||||
/*
|
||||
* Now _if_ this key matches, we'll enter it in the new
|
||||
* format. If not, we'll assume something odd went
|
||||
* wrong, and hyper-cautiously do nothing.
|
||||
*/
|
||||
if (!strcmp(otherstr, key))
|
||||
RegSetValueEx(rkey, regname, 0, REG_SZ, otherstr,
|
||||
strlen(otherstr) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
RegCloseKey(rkey);
|
||||
|
||||
compare = strcmp(otherstr, key);
|
||||
|
||||
sfree(otherstr);
|
||||
sfree(regname);
|
||||
|
||||
if (ret == ERROR_MORE_DATA ||
|
||||
(ret == ERROR_SUCCESS && type == REG_SZ && compare))
|
||||
return 2; /* key is different in registry */
|
||||
else if (ret != ERROR_SUCCESS || type != REG_SZ)
|
||||
return 1; /* key does not exist in registry */
|
||||
else
|
||||
return 0; /* key matched OK in registry */
|
||||
}
|
||||
|
||||
void store_host_key(const char *hostname, int port,
|
||||
const char *keytype, const char *key)
|
||||
{
|
||||
char *regname;
|
||||
HKEY rkey;
|
||||
|
||||
regname = snewn(3 * (strlen(hostname) + strlen(keytype)) + 15, char);
|
||||
|
||||
hostkey_regname(regname, hostname, port, keytype);
|
||||
|
||||
if (RegCreateKey(HKEY_CURRENT_USER, PUTTY_REG_POS "\\SshHostKeys",
|
||||
&rkey) == ERROR_SUCCESS) {
|
||||
RegSetValueEx(rkey, regname, 0, REG_SZ, key, strlen(key) + 1);
|
||||
RegCloseKey(rkey);
|
||||
} /* else key does not exist in registry */
|
||||
|
||||
sfree(regname);
|
||||
}
|
||||
|
||||
/*
|
||||
* Open (or delete) the random seed file.
|
||||
*/
|
||||
enum { DEL, OPEN_R, OPEN_W };
|
||||
static int try_random_seed(char const *path, int action, HANDLE *ret)
|
||||
{
|
||||
if (action == DEL) {
|
||||
remove(path);
|
||||
*ret = INVALID_HANDLE_VALUE;
|
||||
return FALSE; /* so we'll do the next ones too */
|
||||
}
|
||||
|
||||
*ret = CreateFile(path,
|
||||
action == OPEN_W ? GENERIC_WRITE : GENERIC_READ,
|
||||
action == OPEN_W ? 0 : (FILE_SHARE_READ |
|
||||
FILE_SHARE_WRITE),
|
||||
NULL,
|
||||
action == OPEN_W ? CREATE_ALWAYS : OPEN_EXISTING,
|
||||
action == OPEN_W ? FILE_ATTRIBUTE_NORMAL : 0,
|
||||
NULL);
|
||||
|
||||
return (*ret != INVALID_HANDLE_VALUE);
|
||||
}
|
||||
|
||||
static HANDLE access_random_seed(int action)
|
||||
{
|
||||
HKEY rkey;
|
||||
DWORD type, size;
|
||||
HANDLE rethandle;
|
||||
char seedpath[2 * MAX_PATH + 10] = "\0";
|
||||
|
||||
/*
|
||||
* Iterate over a selection of possible random seed paths until
|
||||
* we find one that works.
|
||||
*
|
||||
* We do this iteration separately for reading and writing,
|
||||
* meaning that we will automatically migrate random seed files
|
||||
* if a better location becomes available (by reading from the
|
||||
* best location in which we actually find one, and then
|
||||
* writing to the best location in which we can _create_ one).
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, try the location specified by the user in the
|
||||
* Registry, if any.
|
||||
*/
|
||||
size = sizeof(seedpath);
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_POS, &rkey) ==
|
||||
ERROR_SUCCESS) {
|
||||
int ret = RegQueryValueEx(rkey, "RandSeedFile",
|
||||
0, &type, seedpath, &size);
|
||||
if (ret != ERROR_SUCCESS || type != REG_SZ)
|
||||
seedpath[0] = '\0';
|
||||
RegCloseKey(rkey);
|
||||
|
||||
if (*seedpath && try_random_seed(seedpath, action, &rethandle))
|
||||
return rethandle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Next, try the user's local Application Data directory,
|
||||
* followed by their non-local one. This is found using the
|
||||
* SHGetFolderPath function, which won't be present on all
|
||||
* versions of Windows.
|
||||
*/
|
||||
if (!tried_shgetfolderpath) {
|
||||
/* This is likely only to bear fruit on systems with IE5+
|
||||
* installed, or WinMe/2K+. There is some faffing with
|
||||
* SHFOLDER.DLL we could do to try to find an equivalent
|
||||
* on older versions of Windows if we cared enough.
|
||||
* However, the invocation below requires IE5+ anyway,
|
||||
* so stuff that. */
|
||||
shell32_module = LoadLibrary("SHELL32.DLL");
|
||||
if (shell32_module) {
|
||||
p_SHGetFolderPath = (p_SHGetFolderPath_t)
|
||||
GetProcAddress(shell32_module, "SHGetFolderPathA");
|
||||
}
|
||||
}
|
||||
if (p_SHGetFolderPath) {
|
||||
if (SUCCEEDED(p_SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA,
|
||||
NULL, SHGFP_TYPE_CURRENT, seedpath))) {
|
||||
strcat(seedpath, "\\PUTTY.RND");
|
||||
if (try_random_seed(seedpath, action, &rethandle))
|
||||
return rethandle;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(p_SHGetFolderPath(NULL, CSIDL_APPDATA,
|
||||
NULL, SHGFP_TYPE_CURRENT, seedpath))) {
|
||||
strcat(seedpath, "\\PUTTY.RND");
|
||||
if (try_random_seed(seedpath, action, &rethandle))
|
||||
return rethandle;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Failing that, try %HOMEDRIVE%%HOMEPATH% as a guess at the
|
||||
* user's home directory.
|
||||
*/
|
||||
{
|
||||
int len, ret;
|
||||
|
||||
len =
|
||||
GetEnvironmentVariable("HOMEDRIVE", seedpath,
|
||||
sizeof(seedpath));
|
||||
ret =
|
||||
GetEnvironmentVariable("HOMEPATH", seedpath + len,
|
||||
sizeof(seedpath) - len);
|
||||
if (ret != 0) {
|
||||
strcat(seedpath, "\\PUTTY.RND");
|
||||
if (try_random_seed(seedpath, action, &rethandle))
|
||||
return rethandle;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* And finally, fall back to C:\WINDOWS.
|
||||
*/
|
||||
GetWindowsDirectory(seedpath, sizeof(seedpath));
|
||||
strcat(seedpath, "\\PUTTY.RND");
|
||||
if (try_random_seed(seedpath, action, &rethandle))
|
||||
return rethandle;
|
||||
|
||||
/*
|
||||
* If even that failed, give up.
|
||||
*/
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
void read_random_seed(noise_consumer_t consumer)
|
||||
{
|
||||
HANDLE seedf = access_random_seed(OPEN_R);
|
||||
|
||||
if (seedf != INVALID_HANDLE_VALUE) {
|
||||
while (1) {
|
||||
char buf[1024];
|
||||
DWORD len;
|
||||
|
||||
if (ReadFile(seedf, buf, sizeof(buf), &len, NULL) && len)
|
||||
consumer(buf, len);
|
||||
else
|
||||
break;
|
||||
}
|
||||
CloseHandle(seedf);
|
||||
}
|
||||
}
|
||||
|
||||
void write_random_seed(void *data, int len)
|
||||
{
|
||||
HANDLE seedf = access_random_seed(OPEN_W);
|
||||
|
||||
if (seedf != INVALID_HANDLE_VALUE) {
|
||||
DWORD lenwritten;
|
||||
|
||||
WriteFile(seedf, data, len, &lenwritten, NULL);
|
||||
CloseHandle(seedf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Recursively delete a registry key and everything under it.
|
||||
*/
|
||||
static void registry_recursive_remove(HKEY key)
|
||||
{
|
||||
DWORD i;
|
||||
char name[MAX_PATH + 1];
|
||||
HKEY subkey;
|
||||
|
||||
i = 0;
|
||||
while (RegEnumKey(key, i, name, sizeof(name)) == ERROR_SUCCESS) {
|
||||
if (RegOpenKey(key, name, &subkey) == ERROR_SUCCESS) {
|
||||
registry_recursive_remove(subkey);
|
||||
RegCloseKey(subkey);
|
||||
}
|
||||
RegDeleteKey(key, name);
|
||||
}
|
||||
}
|
||||
|
||||
void cleanup_all(void)
|
||||
{
|
||||
HKEY key;
|
||||
int ret;
|
||||
char name[MAX_PATH + 1];
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* Wipe out the random seed file, in all of its possible
|
||||
* locations.
|
||||
*/
|
||||
access_random_seed(DEL);
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* Destroy all registry information associated with PuTTY.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Open the main PuTTY registry key and remove everything in it.
|
||||
*/
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_POS, &key) ==
|
||||
ERROR_SUCCESS) {
|
||||
registry_recursive_remove(key);
|
||||
RegCloseKey(key);
|
||||
}
|
||||
/*
|
||||
* Now open the parent key and remove the PuTTY main key. Once
|
||||
* we've done that, see if the parent key has any other
|
||||
* children.
|
||||
*/
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_PARENT,
|
||||
&key) == ERROR_SUCCESS) {
|
||||
RegDeleteKey(key, PUTTY_REG_PARENT_CHILD);
|
||||
ret = RegEnumKey(key, 0, name, sizeof(name));
|
||||
RegCloseKey(key);
|
||||
/*
|
||||
* If the parent key had no other children, we must delete
|
||||
* it in its turn. That means opening the _grandparent_
|
||||
* key.
|
||||
*/
|
||||
if (ret != ERROR_SUCCESS) {
|
||||
if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_GPARENT,
|
||||
&key) == ERROR_SUCCESS) {
|
||||
RegDeleteKey(key, PUTTY_REG_GPARENT_CHILD);
|
||||
RegCloseKey(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Now we're done.
|
||||
*/
|
||||
}
|
||||
451
sFTPlugins/psftp/WINDOWS/WINSTUFF.H
Normal file
451
sFTPlugins/psftp/WINDOWS/WINSTUFF.H
Normal file
@@ -0,0 +1,451 @@
|
||||
/*
|
||||
* winstuff.h: Windows-specific inter-module stuff.
|
||||
*/
|
||||
|
||||
#ifndef PUTTY_WINSTUFF_H
|
||||
#define PUTTY_WINSTUFF_H
|
||||
|
||||
#ifndef AUTO_WINSOCK
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <stdio.h> /* for FILENAME_MAX */
|
||||
|
||||
#include "tree234.h"
|
||||
|
||||
#include "winhelp.h"
|
||||
|
||||
struct Filename {
|
||||
char path[FILENAME_MAX];
|
||||
};
|
||||
#define f_open(filename, mode, isprivate) ( fopen((filename).path, (mode)) )
|
||||
|
||||
struct FontSpec {
|
||||
char name[64];
|
||||
int isbold;
|
||||
int height;
|
||||
int charset;
|
||||
};
|
||||
|
||||
#ifndef CLEARTYPE_QUALITY
|
||||
#define CLEARTYPE_QUALITY 5
|
||||
#endif
|
||||
#define FONT_QUALITY(fq) ( \
|
||||
(fq) == FQ_DEFAULT ? DEFAULT_QUALITY : \
|
||||
(fq) == FQ_ANTIALIASED ? ANTIALIASED_QUALITY : \
|
||||
(fq) == FQ_NONANTIALIASED ? NONANTIALIASED_QUALITY : \
|
||||
CLEARTYPE_QUALITY)
|
||||
|
||||
/*
|
||||
* Where we can, we use GetWindowLongPtr and friends because they're
|
||||
* more useful on 64-bit platforms, but they're a relatively recent
|
||||
* innovation, missing from VC++ 6 and older MinGW. Degrade nicely.
|
||||
* (NB that on some systems, some of these things are available but
|
||||
* not others...)
|
||||
*/
|
||||
|
||||
#ifndef GCLP_HCURSOR
|
||||
/* GetClassLongPtr and friends */
|
||||
#undef GetClassLongPtr
|
||||
#define GetClassLongPtr GetClassLong
|
||||
#undef SetClassLongPtr
|
||||
#define SetClassLongPtr SetClassLong
|
||||
#define GCLP_HCURSOR GCL_HCURSOR
|
||||
/* GetWindowLongPtr and friends */
|
||||
#undef GetWindowLongPtr
|
||||
#define GetWindowLongPtr GetWindowLong
|
||||
#undef SetWindowLongPtr
|
||||
#define SetWindowLongPtr SetWindowLong
|
||||
#undef GWLP_USERDATA
|
||||
#define GWLP_USERDATA GWL_USERDATA
|
||||
#undef DWLP_MSGRESULT
|
||||
#define DWLP_MSGRESULT DWL_MSGRESULT
|
||||
/* Since we've clobbered the above functions, we should clobber the
|
||||
* associated type regardless of whether it's defined. */
|
||||
#undef LONG_PTR
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
|
||||
#define BOXFLAGS DLGWINDOWEXTRA
|
||||
#define BOXRESULT (DLGWINDOWEXTRA + sizeof(LONG_PTR))
|
||||
#define DF_END 0x0001
|
||||
|
||||
/*
|
||||
* Global variables. Most modules declare these `extern', but
|
||||
* window.c will do `#define PUTTY_DO_GLOBALS' before including this
|
||||
* module, and so will get them properly defined.
|
||||
*/
|
||||
#ifndef GLOBAL
|
||||
#ifdef PUTTY_DO_GLOBALS
|
||||
#define GLOBAL
|
||||
#else
|
||||
#define GLOBAL extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DONE_TYPEDEFS
|
||||
#define DONE_TYPEDEFS
|
||||
typedef struct config_tag Config;
|
||||
typedef struct backend_tag Backend;
|
||||
typedef struct terminal_tag Terminal;
|
||||
#endif
|
||||
|
||||
#define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
|
||||
#define PUTTY_REG_PARENT "Software\\SimonTatham"
|
||||
#define PUTTY_REG_PARENT_CHILD "PuTTY"
|
||||
#define PUTTY_REG_GPARENT "Software"
|
||||
#define PUTTY_REG_GPARENT_CHILD "SimonTatham"
|
||||
|
||||
#define PUTTY_HELP_FILE "putty.hlp"
|
||||
#define PUTTY_CHM_FILE "putty.chm"
|
||||
#define PUTTY_HELP_CONTENTS "putty.cnt"
|
||||
|
||||
#define GETTICKCOUNT GetTickCount
|
||||
#define CURSORBLINK GetCaretBlinkTime()
|
||||
#define TICKSPERSEC 1000 /* GetTickCount returns milliseconds */
|
||||
|
||||
#define DEFAULT_CODEPAGE CP_ACP
|
||||
|
||||
typedef HDC Context;
|
||||
|
||||
/*
|
||||
* Window handles for the windows that can be running during a
|
||||
* PuTTY session.
|
||||
*/
|
||||
GLOBAL HWND hwnd; /* the main terminal window */
|
||||
GLOBAL HWND logbox;
|
||||
|
||||
/*
|
||||
* The all-important instance handle.
|
||||
*/
|
||||
GLOBAL HINSTANCE hinst;
|
||||
|
||||
/*
|
||||
* Help file stuff in winhelp.c.
|
||||
*/
|
||||
void init_help(void);
|
||||
void shutdown_help(void);
|
||||
int has_help(void);
|
||||
void launch_help(HWND hwnd, const char *topic);
|
||||
void quit_help(HWND hwnd);
|
||||
|
||||
/*
|
||||
* The terminal and logging context are notionally local to the
|
||||
* Windows front end, but they must be shared between window.c and
|
||||
* windlg.c. Likewise the saved-sessions list.
|
||||
*/
|
||||
GLOBAL Terminal *term;
|
||||
GLOBAL void *logctx;
|
||||
|
||||
#define WM_NETEVENT (WM_APP + 5)
|
||||
|
||||
/*
|
||||
* On Windows, we send MA_2CLK as the only event marking the second
|
||||
* press of a mouse button. Compare unix.h.
|
||||
*/
|
||||
#define MULTICLICK_ONLY_EVENT 1
|
||||
|
||||
/*
|
||||
* On Windows, data written to the clipboard must be NUL-terminated.
|
||||
*/
|
||||
#define SELECTION_NUL_TERMINATED 1
|
||||
|
||||
/*
|
||||
* On Windows, copying to the clipboard terminates lines with CRLF.
|
||||
*/
|
||||
#define SEL_NL { 13, 10 }
|
||||
|
||||
/*
|
||||
* sk_getxdmdata() does not exist under Windows (not that I
|
||||
* couldn't write it if I wanted to, but I haven't bothered), so
|
||||
* it's a macro which always returns NULL. With any luck this will
|
||||
* cause the compiler to notice it can optimise away the
|
||||
* implementation of XDM-AUTHORIZATION-1 in x11fwd.c :-)
|
||||
*/
|
||||
#define sk_getxdmdata(socket, lenp) (NULL)
|
||||
|
||||
/*
|
||||
* File-selector filter strings used in the config box. On Windows,
|
||||
* these strings are of exactly the type needed to go in
|
||||
* `lpstrFilter' in an OPENFILENAME structure.
|
||||
*/
|
||||
#define FILTER_KEY_FILES ("PuTTY Private Key Files (*.ppk)\0*.ppk\0" \
|
||||
"All Files (*.*)\0*\0\0\0")
|
||||
#define FILTER_WAVE_FILES ("Wave Files (*.wav)\0*.WAV\0" \
|
||||
"All Files (*.*)\0*\0\0\0")
|
||||
|
||||
/*
|
||||
* On some versions of Windows, it has been known for WM_TIMER to
|
||||
* occasionally get its callback time simply wrong, and call us
|
||||
* back several minutes early. Defining these symbols enables
|
||||
* compensation code in timing.c.
|
||||
*/
|
||||
#define TIMING_SYNC
|
||||
#define TIMING_SYNC_TICKCOUNT
|
||||
|
||||
/*
|
||||
* winnet.c dynamically loads WinSock 2 or WinSock 1 depending on
|
||||
* what it can get, which means any WinSock routines used outside
|
||||
* that module must be exported from it as function pointers. So
|
||||
* here they are.
|
||||
*/
|
||||
extern int (WINAPI *p_WSAAsyncSelect)
|
||||
(SOCKET s, HWND hWnd, u_int wMsg, long lEvent);
|
||||
extern int (WINAPI *p_WSAEventSelect)
|
||||
(SOCKET s, WSAEVENT hEventObject, long lNetworkEvents);
|
||||
extern int (WINAPI *p_select)
|
||||
(int nfds, fd_set FAR * readfds, fd_set FAR * writefds,
|
||||
fd_set FAR *exceptfds, const struct timeval FAR * timeout);
|
||||
extern int (WINAPI *p_WSAGetLastError)(void);
|
||||
extern int (WINAPI *p_WSAEnumNetworkEvents)
|
||||
(SOCKET s, WSAEVENT hEventObject, LPWSANETWORKEVENTS lpNetworkEvents);
|
||||
|
||||
extern int socket_writable(SOCKET skt);
|
||||
|
||||
extern void socket_reselect_all(void);
|
||||
|
||||
/*
|
||||
* Exports from winctrls.c.
|
||||
*/
|
||||
|
||||
struct ctlpos {
|
||||
HWND hwnd;
|
||||
WPARAM font;
|
||||
int dlu4inpix;
|
||||
int ypos, width;
|
||||
int xoff;
|
||||
int boxystart, boxid;
|
||||
char *boxtext;
|
||||
};
|
||||
|
||||
/*
|
||||
* Exports from winutils.c.
|
||||
*/
|
||||
typedef struct filereq_tag filereq; /* cwd for file requester */
|
||||
BOOL request_file(filereq *state, OPENFILENAME *of, int preserve, int save);
|
||||
filereq *filereq_new(void);
|
||||
void filereq_free(filereq *state);
|
||||
int message_box(LPCTSTR text, LPCTSTR caption, DWORD style, DWORD helpctxid);
|
||||
void split_into_argv(char *, int *, char ***, char ***);
|
||||
|
||||
/*
|
||||
* Private structure for prefslist state. Only in the header file
|
||||
* so that we can delegate allocation to callers.
|
||||
*/
|
||||
struct prefslist {
|
||||
int listid, upbid, dnbid;
|
||||
int srcitem;
|
||||
int dummyitem;
|
||||
int dragging;
|
||||
};
|
||||
|
||||
/*
|
||||
* This structure is passed to event handler functions as the `dlg'
|
||||
* parameter, and hence is passed back to winctrls access functions.
|
||||
*/
|
||||
struct dlgparam {
|
||||
HWND hwnd; /* the hwnd of the dialog box */
|
||||
struct winctrls *controltrees[8]; /* can have several of these */
|
||||
int nctrltrees;
|
||||
char *wintitle; /* title of actual window */
|
||||
char *errtitle; /* title of error sub-messageboxes */
|
||||
void *data; /* data to pass in refresh events */
|
||||
union control *focused, *lastfocused; /* which ctrl has focus now/before */
|
||||
char shortcuts[128]; /* track which shortcuts in use */
|
||||
int coloursel_wanted; /* has an event handler asked for
|
||||
* a colour selector? */
|
||||
struct { unsigned char r, g, b, ok; } coloursel_result; /* 0-255 */
|
||||
tree234 *privdata; /* stores per-control private data */
|
||||
int ended, endresult; /* has the dialog been ended? */
|
||||
};
|
||||
|
||||
/*
|
||||
* Exports from winctrls.c.
|
||||
*/
|
||||
void ctlposinit(struct ctlpos *cp, HWND hwnd,
|
||||
int leftborder, int rightborder, int topborder);
|
||||
HWND doctl(struct ctlpos *cp, RECT r,
|
||||
char *wclass, int wstyle, int exstyle, char *wtext, int wid);
|
||||
void bartitle(struct ctlpos *cp, char *name, int id);
|
||||
void beginbox(struct ctlpos *cp, char *name, int idbox);
|
||||
void endbox(struct ctlpos *cp);
|
||||
void editboxfw(struct ctlpos *cp, int password, char *text,
|
||||
int staticid, int editid);
|
||||
void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...);
|
||||
void bareradioline(struct ctlpos *cp, int nacross, ...);
|
||||
void radiobig(struct ctlpos *cp, char *text, int id, ...);
|
||||
void checkbox(struct ctlpos *cp, char *text, int id);
|
||||
void statictext(struct ctlpos *cp, char *text, int lines, int id);
|
||||
void staticbtn(struct ctlpos *cp, char *stext, int sid,
|
||||
char *btext, int bid);
|
||||
void static2btn(struct ctlpos *cp, char *stext, int sid,
|
||||
char *btext1, int bid1, char *btext2, int bid2);
|
||||
void staticedit(struct ctlpos *cp, char *stext,
|
||||
int sid, int eid, int percentedit);
|
||||
void staticddl(struct ctlpos *cp, char *stext,
|
||||
int sid, int lid, int percentlist);
|
||||
void combobox(struct ctlpos *cp, char *text, int staticid, int listid);
|
||||
void staticpassedit(struct ctlpos *cp, char *stext,
|
||||
int sid, int eid, int percentedit);
|
||||
void bigeditctrl(struct ctlpos *cp, char *stext,
|
||||
int sid, int eid, int lines);
|
||||
void ersatztab(struct ctlpos *cp, char *stext, int sid, int lid, int s2id);
|
||||
void editbutton(struct ctlpos *cp, char *stext, int sid,
|
||||
int eid, char *btext, int bid);
|
||||
void sesssaver(struct ctlpos *cp, char *text,
|
||||
int staticid, int editid, int listid, ...);
|
||||
void envsetter(struct ctlpos *cp, char *stext, int sid,
|
||||
char *e1stext, int e1sid, int e1id,
|
||||
char *e2stext, int e2sid, int e2id,
|
||||
int listid, char *b1text, int b1id, char *b2text, int b2id);
|
||||
void charclass(struct ctlpos *cp, char *stext, int sid, int listid,
|
||||
char *btext, int bid, int eid, char *s2text, int s2id);
|
||||
void colouredit(struct ctlpos *cp, char *stext, int sid, int listid,
|
||||
char *btext, int bid, ...);
|
||||
void prefslist(struct prefslist *hdl, struct ctlpos *cp, int lines,
|
||||
char *stext, int sid, int listid, int upbid, int dnbid);
|
||||
int handle_prefslist(struct prefslist *hdl,
|
||||
int *array, int maxmemb,
|
||||
int is_dlmsg, HWND hwnd,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
void progressbar(struct ctlpos *cp, int id);
|
||||
void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
||||
char *e1stext, int e1sid, int e1id,
|
||||
char *e2stext, int e2sid, int e2id,
|
||||
char *btext, int bid,
|
||||
char *r1text, int r1id, char *r2text, int r2id);
|
||||
|
||||
#define MAX_SHORTCUTS_PER_CTRL 16
|
||||
|
||||
/*
|
||||
* This structure is what's stored for each `union control' in the
|
||||
* portable-dialog interface.
|
||||
*/
|
||||
struct winctrl {
|
||||
union control *ctrl;
|
||||
/*
|
||||
* The control may have several components at the Windows
|
||||
* level, with different dialog IDs. To avoid needing N
|
||||
* separate platformsidectrl structures (which could be stored
|
||||
* separately in a tree234 so that lookup by ID worked), we
|
||||
* impose the constraint that those IDs must be in a contiguous
|
||||
* block.
|
||||
*/
|
||||
int base_id;
|
||||
int num_ids;
|
||||
/*
|
||||
* Remember what keyboard shortcuts were used by this control,
|
||||
* so that when we remove it again we can take them out of the
|
||||
* list in the dlgparam.
|
||||
*/
|
||||
char shortcuts[MAX_SHORTCUTS_PER_CTRL];
|
||||
/*
|
||||
* Some controls need a piece of allocated memory in which to
|
||||
* store temporary data about the control.
|
||||
*/
|
||||
void *data;
|
||||
};
|
||||
/*
|
||||
* And this structure holds a set of the above, in two separate
|
||||
* tree234s so that it can find an item by `union control' or by
|
||||
* dialog ID.
|
||||
*/
|
||||
struct winctrls {
|
||||
tree234 *byctrl, *byid;
|
||||
};
|
||||
struct controlset;
|
||||
struct controlbox;
|
||||
|
||||
void winctrl_init(struct winctrls *);
|
||||
void winctrl_cleanup(struct winctrls *);
|
||||
void winctrl_add(struct winctrls *, struct winctrl *);
|
||||
void winctrl_remove(struct winctrls *, struct winctrl *);
|
||||
struct winctrl *winctrl_findbyctrl(struct winctrls *, union control *);
|
||||
struct winctrl *winctrl_findbyid(struct winctrls *, int);
|
||||
struct winctrl *winctrl_findbyindex(struct winctrls *, int);
|
||||
void winctrl_layout(struct dlgparam *dp, struct winctrls *wc,
|
||||
struct ctlpos *cp, struct controlset *s, int *id);
|
||||
int winctrl_handle_command(struct dlgparam *dp, UINT msg,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
void winctrl_rem_shortcuts(struct dlgparam *dp, struct winctrl *c);
|
||||
int winctrl_context_help(struct dlgparam *dp, HWND hwnd, int id);
|
||||
|
||||
void dp_init(struct dlgparam *dp);
|
||||
void dp_add_tree(struct dlgparam *dp, struct winctrls *tree);
|
||||
void dp_cleanup(struct dlgparam *dp);
|
||||
|
||||
/*
|
||||
* Exports from wincfg.c.
|
||||
*/
|
||||
void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
|
||||
int midsession, int protocol);
|
||||
|
||||
/*
|
||||
* Exports from windlg.c.
|
||||
*/
|
||||
void defuse_showwindow(void);
|
||||
int do_config(void);
|
||||
int do_reconfig(HWND, int);
|
||||
void showeventlog(HWND);
|
||||
void showabout(HWND);
|
||||
void force_normal(HWND hwnd);
|
||||
void modal_about_box(HWND hwnd);
|
||||
void show_help(HWND hwnd);
|
||||
|
||||
/*
|
||||
* Exports from winmisc.c.
|
||||
*/
|
||||
extern OSVERSIONINFO osVersion;
|
||||
BOOL init_winver(void);
|
||||
|
||||
/*
|
||||
* Exports from sizetip.c.
|
||||
*/
|
||||
void UpdateSizeTip(HWND src, int cx, int cy);
|
||||
void EnableSizeTip(int bEnable);
|
||||
|
||||
/*
|
||||
* Exports from unicode.c.
|
||||
*/
|
||||
struct unicode_data;
|
||||
void init_ucs(Config *, struct unicode_data *);
|
||||
|
||||
/*
|
||||
* Exports from winhandl.c.
|
||||
*/
|
||||
#define HANDLE_FLAG_OVERLAPPED 1
|
||||
#define HANDLE_FLAG_IGNOREEOF 2
|
||||
#define HANDLE_FLAG_UNITBUFFER 4
|
||||
struct handle;
|
||||
typedef int (*handle_inputfn_t)(struct handle *h, void *data, int len);
|
||||
typedef void (*handle_outputfn_t)(struct handle *h, int new_backlog);
|
||||
struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
|
||||
void *privdata, int flags);
|
||||
struct handle *handle_output_new(HANDLE handle, handle_outputfn_t sentdata,
|
||||
void *privdata, int flags);
|
||||
int handle_write(struct handle *h, const void *data, int len);
|
||||
HANDLE *handle_get_events(int *nevents);
|
||||
void handle_free(struct handle *h);
|
||||
void handle_got_event(HANDLE event);
|
||||
void handle_unthrottle(struct handle *h, int backlog);
|
||||
int handle_backlog(struct handle *h);
|
||||
void *handle_get_privdata(struct handle *h);
|
||||
|
||||
/*
|
||||
* pageantc.c needs to schedule callbacks for asynchronous agent
|
||||
* requests. This has to be done differently in GUI and console, so
|
||||
* there's an exported function used for the purpose.
|
||||
*
|
||||
* Also, we supply FLAG_SYNCAGENT to force agent requests to be
|
||||
* synchronous in pscp and psftp.
|
||||
*/
|
||||
void agent_schedule_callback(void (*callback)(void *, void *, int),
|
||||
void *callback_ctx, void *data, int len);
|
||||
#define FLAG_SYNCAGENT 0x1000
|
||||
|
||||
/*
|
||||
* Exports from winser.c.
|
||||
*/
|
||||
extern Backend serial_backend;
|
||||
|
||||
#endif
|
||||
24
sFTPlugins/psftp/WINDOWS/WINTIME.C
Normal file
24
sFTPlugins/psftp/WINDOWS/WINTIME.C
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* wintime.c - Avoid trouble with time() returning (time_t)-1 on Windows.
|
||||
*/
|
||||
|
||||
#include "putty.h"
|
||||
#include <time.h>
|
||||
|
||||
struct tm ltime(void)
|
||||
{
|
||||
SYSTEMTIME st;
|
||||
struct tm tm;
|
||||
|
||||
GetLocalTime(&st);
|
||||
tm.tm_sec=st.wSecond;
|
||||
tm.tm_min=st.wMinute;
|
||||
tm.tm_hour=st.wHour;
|
||||
tm.tm_mday=st.wDay;
|
||||
tm.tm_mon=st.wMonth-1;
|
||||
tm.tm_year=(st.wYear>=1900?st.wYear-1900:0);
|
||||
tm.tm_wday=st.wDayOfWeek;
|
||||
tm.tm_yday=-1; /* GetLocalTime doesn't tell us */
|
||||
tm.tm_isdst=0; /* GetLocalTime doesn't tell us */
|
||||
return tm;
|
||||
}
|
||||
Reference in New Issue
Block a user