最近突发奇想,想对所掌握的python知识进行总结一下,目前其实还停留在python层面如何使用,还没有深入到虚拟机部分,如果下面有哪些错误,欢迎指出。
OJ(Online judge, 在线编程测评提交代码到后台运行检查)网站一般都允许各种各样的代码提交,其中很有可能包含python3,于是决定尝试通过python3的代码执行,进行沙箱逃逸,以及绕过各种限制。
我随便找了一个OJ网站,这个站点的python3有如下限制
| const https = require("https"); | |
| const token = ""; // change this to you telegram bot token! | |
| const chatId = ""; // change this to your telegram chat id! | |
| const cookie = ""; // change this to your shanbay cookie! | |
| const PATH_API = (page) => | |
| `/wordsapp/user_material_books/blozps/learning/words/today_learning_items?ipp=10&page=${page}&type_of=NEW`; | |
| const options = { |
| #!/usr/bin/env bash | |
| cd $(dirname "$0") | |
| read -sp "Password: " pwd | |
| echo | |
| rm -rf ~/Library/Application Support/com.nssurge.surge-* | |
| echo "${pwd}" | sudo -S date 010110002018 | |
| nohup ./Surge\ 3.app/Contents/MacOS/Surge\ 3 & | |
| sleep 20 |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import json | |
| from oauthlib.oauth2 import ( | |
| FatalClientError, OAuth2Error, TokenExpiredError, MobileApplicationClient | |
| ) | |
| from requests_oauthlib import OAuth2Session, TokenUpdated |