Блог пользователя shisukenohara

Автор shisukenohara, история, 4 недели назад, По-английски

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 near_ai, 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
  • Проголосовать: нравится
  • +15
  • Проголосовать: не нравится

»
4 недели назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I used your website, It's great shisukenohara

Nice one, Keep growing

»
4 недели назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

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).

»
3 недели назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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

»
3 недели назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

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

  • »
    »
    3 недели назад, # ^ |
      Проголосовать: нравится +15 Проголосовать: не нравится

    Thank You for telling Um_nitsa,

    I have fixed the issue by restarting the service

    Actually, my services are deployed on Render's free tier due to which there are frequent memory and spinning down issues.

    Thank You again for telling.

»
3 недели назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

because i am afraid of leaking of my code.

  • »
    »
    3 недели назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    Yes Sir!!!, Without a Doubt. Give Me Some More Time and I ll Make It More Secure Than The “Pentagon”

»
3 недели назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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

»
3 недели назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

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!