Skip to content

Commit 2942af6

Browse files
committed
Fix for bug #10.
1 parent 0e629a7 commit 2942af6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

blobrunner.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ typedef int bool;
1111
#define true 1
1212
#define false 0
1313

14-
const char* _version = "0.0.4";
14+
const char* _version = "0.0.5";
1515

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

6767
CopyMemory(lpvBase, buffer, fileLen);
68-
printf(" [*] Entry: Setting executable\n");
69-
VirtualProtect(lpvBase, fileLen, PAGE_EXECUTE_READ, &dummy);
7068
return lpvBase;
7169
}
7270

@@ -165,7 +163,12 @@ int main(int argc, char* argv[])
165163
if (strcmp(argv[i], "--offset") == 0) {
166164
printf(" [*] Parsing offset...\n");
167165
i = i + 1;
168-
offset = strtol(argv[i], &nptr, 16);
166+
if (strncmp(argv[i], "0x", 2) == 0) {
167+
offset = strtol(argv[i], &nptr, 16);
168+
}
169+
else {
170+
offset = strtol(argv[i], &nptr, 10);
171+
}
169172
}
170173
else if (strcmp(argv[i], "--nopause") == 0) {
171174
nopause = true;

changelog.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.0.5
2+
- BugFix #10 - --offset assumes base 16
3+
- Remove call to VirtualProtect as the rights are already set to RWX in the call to VirtualAlloc
4+
15
0.0.4
26
- Added --jit option to trigger configured JIT debugger
37
- Removed --autobreak option

0 commit comments

Comments
 (0)