Skip to content

Instantly share code, notes, and snippets.

@ariankordi
ariankordi / grouppe.php
Last active June 7, 2020 05:19
simple php script for a discord application that adds a user to an already existing bot group via oauth2, resolves a code (((made this two days ago))
<?php
//ini_set('display_errors', true);
define('CLIENT_ID', '');
define('CLIENT_SECRET', '');
// token for a bot, needs to be prefixed with Bot
define('TOKEN', '');
// group channel that you have already created, lol,
define('CHANNEL_ID', '');
@ariankordi
ariankordi / cronch.patch
Last active September 11, 2020 21:12
insanele stupid hack that i spent hours on that lets you watch crunchyroll on cytube, worked on calzoneman/sync commit 88365612dab2351b297c895952fa98b105894b4d
diff --git a/index.js b/index.js
old mode 100755
new mode 100644
diff --git a/package.json b/package.json
index a003e77..caee25a 100644
--- a/package.json
+++ b/package.json
@@ -13,17 +13,19 @@
"bcrypt": "^3.0.6",
"bluebird": "^3.5.1",
@ariankordi
ariankordi / README.txt
Last active September 12, 2022 01:40
my stupid hack for using nooklink for animal crossing: new horizons on pc involving mitmproxy which i have had to repost sorry
hi. this app is a reverse proxy, meaning that when it launches, it runs a server that connects to the official server, like a proxy (except that it only supports one site) and it modifies some requests and responses along the way.
now here is a terrible guide
first: the "iksm.py" file and its functions is copied and modified from splatnet2statink, retrieved from https://github.com/frozenpandaman/splatnet2statink at least at commit a971a21fafdbd026aa8b44d7514119d3ff6073a2. this information should be added in the file itself but it's worth mentioning here
when running any of these files like bruh.py or mitmproxy with bruhx.py, if you see that there's a module missing, just install it (notably requests and hashlib is required)
the main magic script which is the mitmproxy addon and gets tokens from splatnet2statink functions is bruhx.py. execute bruh.py, (without the x), follow the instructions, and then the value it gives you needs to be placed into the "codee" variable in bruhx.py.
bruh.sh starts mitmproxy.
@ariankordi
ariankordi / olvclient.php
Created December 26, 2019 04:47
olvclient. this is stupid and dumb. i've had this on my github profile for 2 years and i've always been ashamed of this. it's literally useless by now and it's served little purpose being on my github page being that it's not a fully featured thicc project and stuff. i know i have like unfinished projects and stuf but they're stuff and they're l…
<?php
/*
OlvClient by Arian Kordi
https://github.com/ariankordi
Licensed under GNU AGPLv3: https://choosealicense.com/licenses/agpl-3.0/
*/
class OlvClient {
@ariankordi
ariankordi / cronch.css
Last active May 1, 2020 08:51
please don't use this because it doesn't handle a lot of cases, my F*CK do not even think about incorporating this into your creation
html, textarea {
background-color: #3d3d3d;
color: white;
font-family: sans-serif;
}
textarea {
border-color: darkgray;
font-family: monospace;
display: block;
height: 100px;
<?php
//ini_set('display_errors', 1);
$db = new SQLite3('cheapvps-comparison.db');
/*
CREATE TABLE "offers" (
"created_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
"url" text NOT NULL,
"post_type" integer NOT NULL,
@ariankordi
ariankordi / sh-cgi-term.cgi
Last active February 6, 2019 02:15
A super simple command line in shell CGI, this is useful for executing commands on a cPanel/Apache shared hosting account LOL
#!/bin/sh
if [ $REQUEST_METHOD = "POST" ]; then
echo
$(cat) 2>&1
exit
fi
printf "Content-type: text/html\n\n"
#echo
# closedpizza-authorization.rb - mruby handler to check if all clients
# have accounts on closed.pizza, checked via ip address and result kept with lrucache
# there is also a redis class in h2o mruby but it probably isn't worth using
# to change returned status code/response for unauthorized users, see end of call method
# paths:
# /:
# mruby.handler-file: /path/to/closedpizza-authorization.rb
@ariankordi
ariankordi / realtime-chat-noextlibs.php
Last active February 15, 2019 03:24
A REAL-TIME (no AJAX polling), database-less, no-setup chat room in PHP, using SSE and shmop
<?php
// This chat thing uses nothing but shmop, but it requires SSE (Server-Sent Events) to work on your server.
// If this chat just does nothing, i.e. you post a message and literally nothing else happens, SSE probably doesn't work.
// Note that this file continuously reads a shared memory block and detects a difference, in order to get live messages.
// This might not be all that efficient, and can be intensive on your server. Don't leave this up for a long period of time.
// This will also not work with PHP's built-in server, due to it being single-threaded. Oh yeah, since this uses SSE, this will use a separate thread for every client that is connected.
// Have fun. This should work right away with no config.
// set the size of these shared memory blocks, "message buffers" here
@ariankordi
ariankordi / unix socket reverse proxy thing.php
Last active December 13, 2022 17:52
Reverse proxy to a UNIX socket with PHP, for when you are running Go web apps on cPanel servers or something like that LOL (complete with header and multipart POST form parsing!) Doesn't work with WebSocket though.
<?php
// This works best on Apache, and if you have enable_post_data_reading off.
// Set "php_flag enable_post_data_reading off" in your htaccess. It'll avoid having to parse multipart forms.
// enter the sock to connect to here
const SOCK_TO_CONNECT_TO = './run.sock';
// Close the session right now, because it might make everything faster, and we don't know how long the response will last for.
session_write_close();