This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import os | |
os.environ['MY_SECRET'] = 'oi :D' | |
ret = subprocess.run(["python3.6", "sub.py"], stdout=subprocess.PIPE) | |
if 'MY_SECRET' in ret.stdout.decode('utf-8'): | |
print('pwned!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class mymap: | |
def __init__(self, func, seq): | |
self.func = func | |
self.seq = iter(seq) | |
def __iter__(self): | |
return self | |
def __next__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.template import engines | |
from django.http import HttpResponse | |
from PIL import Image | |
def image_view(request): | |
image = Image.new("RGB", (200, 200)) | |
response = HttpResponse(content_type="image/png") | |
image.save(response, "PNG") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import StringIO | |
from django.template import engines | |
from django.http import HttpResponse | |
from PIL import Image | |
def example(request): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ [].__class__.__base__.__subclasses__()[40]('app/views.py').read() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import sys | |
import logging | |
from pathlib import Path | |
from PyQt5 import QtWidgets, uic | |
from quamash import QEventLoop | |
from PyIRC.signal import event | |
from PyIRC.io.asyncio import IRCProtocol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import sys | |
import signal | |
import logging | |
from PyQt5.QtWidgets import QApplication | |
from quamash import QEventLoop | |
from PyIRC.signal import event | |
from PyIRC.io.asyncio import IRCProtocol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import asyncio | |
from PyQt5.QtWidgets import QApplication | |
from quamash import QEventLoop | |
app = QApplication(sys.argv) | |
loop = QEventLoop(app) | |
asyncio.set_event_loop(loop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from collections import namedtuple | |
from functools import wraps | |
tasks = [] | |
loop = asyncio.get_event_loop() | |
PeriodicTask = namedtuple('PeriodicTask', ['task', 'interval', 'start']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from collections import namedtuple | |
from functools import wraps | |
tasks = [] | |
loop = asyncio.get_event_loop() | |
PeriodicTask = namedtuple('PeriodicTask', ['task', 'interval', 'start']) |