From e6fc6dea5d20e443802474ae7641b39f33a6951e Mon Sep 17 00:00:00 2001 From: robertdavidgraham Date: Mon, 14 Oct 2013 04:43:16 -0400 Subject: [PATCH] bugs --- bin/.gitignore | 6 +-- tmp/.gitignore | 6 +-- util/scan2text.c | 6 +-- vs10/masscan.sln | 13 ++++++- vs10/masscan.vcxproj | 2 +- vs10/scan2text.vcxproj | 86 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 13 deletions(-) create mode 100644 vs10/scan2text.vcxproj diff --git a/bin/.gitignore b/bin/.gitignore index 3956b18..bf1f8a9 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,6 +1,4 @@ -masscan -masscan.exe -masscan.ilk -masscan.pdb +* +!.gitignore diff --git a/tmp/.gitignore b/tmp/.gitignore index 4d01223..bf1f8a9 100644 --- a/tmp/.gitignore +++ b/tmp/.gitignore @@ -1,4 +1,4 @@ -*.o -Debug -Release +* +!.gitignore + diff --git a/util/scan2text.c b/util/scan2text.c index 997ee53..5dbd54a 100644 --- a/util/scan2text.c +++ b/util/scan2text.c @@ -280,11 +280,11 @@ normalize_string(unsigned char *px, size_t offset, size_t length, size_t max) /* do nothing */ } else { if (i + 6 < max) { - memmove(px+i+5, px+i, length-i+1); + memmove(px+i+4, px+i+1, length-i+1); px[i++] = '\\'; px[i++] = 'x'; - px[i++] = "0123456789abdef"[c >> 4]; - px[i ] = "0123456789abdef"[c >> 0]; + px[i++] = "0123456789abcdef"[c >> 4]; + px[i ] = "0123456789abcdef"[c >> 0]; } } } diff --git a/vs10/masscan.sln b/vs10/masscan.sln index 01d609a..81a2e34 100644 --- a/vs10/masscan.sln +++ b/vs10/masscan.sln @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "masscan", "masscan.vcxproj", "{C88D7583-254F-4BE6-A9B9-89A5BB52E679}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scan2text", "scan2text.vcxproj", "{78D9E59B-DB86-49EE-921F-51734A73F229}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -11,14 +13,21 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|Win32.ActiveCfg = Debug|Win32 - {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|Win32.Build.0 = Debug|Win32 + {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|Win32.ActiveCfg = Debug|x64 + {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|Win32.Build.0 = Debug|x64 {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|x64.ActiveCfg = Debug|x64 {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|x64.Build.0 = Debug|x64 {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|Win32.ActiveCfg = Release|Win32 {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|Win32.Build.0 = Release|Win32 {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|x64.ActiveCfg = Release|x64 {C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|x64.Build.0 = Release|x64 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Debug|Win32.ActiveCfg = Debug|Win32 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Debug|Win32.Build.0 = Debug|Win32 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Debug|x64.ActiveCfg = Debug|Win32 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Debug|x64.Build.0 = Debug|Win32 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Release|Win32.ActiveCfg = Release|Win32 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Release|Win32.Build.0 = Release|Win32 + {78D9E59B-DB86-49EE-921F-51734A73F229}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vs10/masscan.vcxproj b/vs10/masscan.vcxproj index a534650..8ebc3d1 100644 --- a/vs10/masscan.vcxproj +++ b/vs10/masscan.vcxproj @@ -173,7 +173,7 @@ true - $(SolutionDir)\..\tmp\$(Configuration)\ + $(SolutionDir)\..\tmp\ $(SolutionDir)\..\bin\ diff --git a/vs10/scan2text.vcxproj b/vs10/scan2text.vcxproj new file mode 100644 index 0000000..d3ba23f --- /dev/null +++ b/vs10/scan2text.vcxproj @@ -0,0 +1,86 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + + + + {78D9E59B-DB86-49EE-921F-51734A73F229} + Win32Proj + scan2text + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + $(SolutionDir)\..\bin\ + $(SolutionDir)\..\tmp\ + + + false + $(SolutionDir)\..\bin\ + $(SolutionDir)\..\tmp\ + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + \ No newline at end of file -- GitLab