Skip to content

Commit 6ba6107

Browse files
committed
Used failure for Linux and success for Windows.
1 parent 145199c commit 6ba6107

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mkhex.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ then
107107
if [[ $flag -eq 3 ]]
108108
then
109109
cat <<EOF
110-
int ret = mprotect ((void *)((uintptr_t)shellcode & ~4095), 4096,
110+
int failure = mprotect ((void *)((uintptr_t)shellcode & ~4095), 4096,
111111
PROT_READ | PROT_WRITE | PROT_EXEC);
112112
113-
if (ret) {
113+
if (failure) {
114114
printf ("mprotect\n");
115115
return EXIT_FAILURE;
116116
}
@@ -121,10 +121,10 @@ EOF
121121
then
122122
cat <<EOF
123123
DWORD why_must_this_variable;
124-
BOOL ret = VirtualProtect (shellcode, strlen(shellcode),
124+
BOOL success = VirtualProtect (shellcode, strlen(shellcode),
125125
PAGE_EXECUTE_READWRITE, &why_must_this_variable);
126126
127-
if (!ret) {
127+
if (!success) {
128128
printf ("VirtualProtect\n");
129129
return EXIT_FAILURE;
130130
}

0 commit comments

Comments
 (0)