Skip to content

Instantly share code, notes, and snippets.

View CortexPE's full-sized avatar
😈
trying to have fun, as always.

marshall CortexPE

😈
trying to have fun, as always.
View GitHub Profile
@CortexPE
CortexPE / AntiFlashbang-bot.py
Created May 22, 2019 15:00
Prevents flashbangs (very bright images) to be uploaded to discord servers
View AntiFlashbang-bot.py
import aiohttp
import discord
from datetime import datetime
from io import BytesIO
from PIL import Image
from PIL import ImageStat
TOKEN = "YOUR DISCORD TOKEN HERE"
THRESHOLD = 192 # brightness threshold... How close it is to being fully white
@CortexPE
CortexPE / imageProxy.php
Last active May 16, 2018 00:27 — forked from nicoptere/imageProxy.php
basic PHP image proxy (that works ... )
View imageProxy.php
<?php
if(isset($_GET['url'])){
$url = $_GET['url'];
$imginfo = getimagesize($url);
header("Content-type: " . $imginfo['mime']);
readfile($url);
}else{
exit();
}