Skip to content

Commit

Permalink
Fix for bug #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
idiom committed Jun 12, 2020
1 parent 0e629a7 commit 2942af6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions blobrunner.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typedef int bool;
#define true 1
#define false 0

const char* _version = "0.0.4";
const char* _version = "0.0.5";

const char* _banner = " __________.__ ___. __________\n"
" \\______ \\ | ____\\_ |__\\______ \\__ __ ____ ____ ___________ \n"
Expand Down Expand Up @@ -65,8 +65,6 @@ LPVOID process_file(char* inputfile_name, bool jit, int offset, bool debug) {
printf(" [*] Copying input data...\n");

CopyMemory(lpvBase, buffer, fileLen);
printf(" [*] Entry: Setting executable\n");
VirtualProtect(lpvBase, fileLen, PAGE_EXECUTE_READ, &dummy);
return lpvBase;
}

Expand Down Expand Up @@ -165,7 +163,12 @@ int main(int argc, char* argv[])
if (strcmp(argv[i], "--offset") == 0) {
printf(" [*] Parsing offset...\n");
i = i + 1;
offset = strtol(argv[i], &nptr, 16);
if (strncmp(argv[i], "0x", 2) == 0) {
offset = strtol(argv[i], &nptr, 16);
}
else {
offset = strtol(argv[i], &nptr, 10);
}
}
else if (strcmp(argv[i], "--nopause") == 0) {
nopause = true;
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.0.5
- BugFix #10 - --offset assumes base 16
- Remove call to VirtualProtect as the rights are already set to RWX in the call to VirtualAlloc

0.0.4
- Added --jit option to trigger configured JIT debugger
- Removed --autobreak option
Expand Down

0 comments on commit 2942af6

Please sign in to comment.