shisukenohara's blog

By shisukenohara, history, 2 years ago, In English

Link To My Website

Try It Out!!

Features

The website allows you to run code with stdin in Python3 or C++17 and it also allows you to smoothly try to hack someone else's solution smoothly via manually written test cases or generator (PS: It also tells if the code gives TLE or MLE).

  • Edit: As pointed out by ton, A new feature is added that doesn't let you run malicious code or the code which can potentially be harmful for the system.
  • Edit: Added the feature that lets input allowed Time (in seconds) and allowed Memory (in MB) in both Correct Code and New Code in Hack Interface making the functionality more robust.
  • Edit: As suggested by RangeyBhakt and more, added safe sandboxing.

Motivation

As a competitive programming enthusiast, I always wanted to hack a solution but as of now even after being a Codeforces Expert, I have never successfully hacked a solution.

As of now there are multiple websites that allow one to write code with stdin but there is nothing that makes it smooth to hack someone else's code via manual test cases or generator smoothly (at least I didn't find one), so I made one.

Note:

  • Please try it and give feedback or suggestions in comments
  • Please upvote if you like the website or the blog
  • Vote: I like it
  • +15
  • Vote: I do not like it

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

I used your website, It's great shisukenohara

Nice one, Keep growing

»
2 years ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Thanks! I was trying to run something like

import os
def fork_bomb():
    while True:
        os.fork()  

fork_bomb()

After that you can get: Request failed: TypeError: Load failed (even after reloading the site).

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

we can use it for stress testing as well right, in the hack interface

»
2 years ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

hello shisukenohara sir, the site is down for some reson ;[ pls fix

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can I use this website during contest for writing my code??

because i am afraid of leaking of my code.

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

The TLE and MLE thingy is super useful! Eager to try hacking with this bro TYY

»
2 years ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Hey! I was just testing it out after I saw the fork bomb comment and It seems you've just flagged the words "fork" and "bomb". That seriously won't do man, please install a new version of python and remove all os/socket/http libs from the site-packages.

I was testing codes like this when it broke,

import threading

def thread_bomb():
    while True:
        threading.Thread(target=thread_bomb).start()

thread_bomb()
import subprocess

def subprocess_bomb():
    while True:
        subprocess.Popen(["echo", "bomb"])

subprocess_bomb()
def file_descriptor_bomb():
    open_files = []
    while True:
        try:
            open_files.append(open("/dev/null", "r"))
        except OSError:
            pass

file_descriptor_bomb()

It's really important that you dockerize your code exec env or sandbox it some other way. Anyways, awesom e site! I can see it being really popular in the community!