最近突发奇想,想对所掌握的python知识进行总结一下,目前其实还停留在python层面如何使用,还没有深入到虚拟机部分,如果下面有哪些错误,欢迎指出。
OJ(Online judge, 在线编程测评提交代码到后台运行检查)网站一般都允许各种各样的代码提交,其中很有可能包含python3,于是决定尝试通过python3的代码执行,进行沙箱逃逸,以及绕过各种限制。
我随便找了一个OJ网站,这个站点的python3有如下限制
| # Credits to @NanoApe | |
| # websocket-client==0.57.0 更高版本会出问题! | |
| # Original Source: https://gist.github.com/Konano/204ef1e442b3f239663985696fbcadf9 | |
| import time | |
| import _thread as thread | |
| from websocket import WebSocketApp | |
| import websocket | |
| import requests | |
| import json | |
| import logging |
| import time | |
| import _thread as thread | |
| from websocket import WebSocketApp | |
| import websocket | |
| import requests | |
| import json | |
| from log import logger | |
| GAME_ID = 1 |
| import requests | |
| import json | |
| import random | |
| Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid=' | |
| headers = { | |
| 'Cookie': "Replace Me With REAL COOKIE" , | |
| 'Pragma': 'no-cache', |