开发者

How to conduct stack/memory overflow with javascript?

开发者 https://www.devze.com 2022-12-14 10:33 出处:网络
Like the following: #include <stdio.h> #include <string.h> void bad() { print开发者_如何学Pythonf(\"Oh shit really bad~!\\r\\n\");

Like the following:

#include <stdio.h>
#include <string.h>

void bad() {
    print开发者_如何学Pythonf("Oh shit really bad~!\r\n");
}

void foo() {
    char overme[4] = "WOW";
    *(int*)(overme+8) = (int)bad;
}

int main() {
   foo();
}


Well, first you find a JavaScript runtime with a bug in its memory management system…

The short answer is that you can't. JavaScript doesn't let you manually manage your memory allocation.


function Recurse()
{
    Recurse();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消