Skip to content

Commit

Permalink
fix:fix a bug in generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sunman committed Dec 1, 2020
1 parent 19dc4cd commit dca2bc9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 29 deletions.
28 changes: 0 additions & 28 deletions clean_vs15.bat

This file was deleted.

Binary file added shellcodeLoader/Debug/shellcodeLoader.res
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
Debug|Win32|C:\Users\sunman\Desktop\git\shellcodeloader\|
3 changes: 2 additions & 1 deletion shellcodeLoader/shellcodeLoaderDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ void CshellcodeLoaderDlg::OnBnClickedGenerate()
int shellcodeSize = GetFileSize(hShellcode, NULL);
PBYTE shellcode = (PBYTE)malloc(shellcodeSize + sizeof(config));
memcpy(shellcode, &config, sizeof(CONFIG));
ReadFile(hShellcode, shellcode + sizeof(CONFIG), shellcodeSize, NULL, NULL);
DWORD lpNumberOfBytesRead;
ReadFile(hShellcode, shellcode + sizeof(CONFIG), shellcodeSize, &lpNumberOfBytesRead, NULL);
StreamCrypt(shellcode + sizeof(CONFIG), shellcodeSize, config.key,128);
HANDLE hResource = BeginUpdateResource(filepath, FALSE);
if (NULL != hResource)
Expand Down

0 comments on commit dca2bc9

Please sign in to comment.