Skip to content

Instantly share code, notes, and snippets.

Arian K. (ariankordi) ariankordi

Block or report user

Report or block ariankordi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Attempt at PBKDF2 passwords with salt?
<?php
# gen
$reqpsd = 'hello';
$salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)),'+','.'),0,22);
$hash = hash_pbkdf2('sha512', $reqpsd, $salt, 1000, 50).':'.$salt;
# /gen
# check
$passwd = 'hello';
@ariankordi
ariankordi / gambitpost.py
Created Jul 26, 2017
A little useless: extract a TGA from a Splatoon POST request then convert it to PNG.
View gambitpost.py
import sys, os
from PIL import Image
if len(sys.argv) < 2:
print("Usage: {0} [POST data file]".format(sys.argv[0]))
sys.exit(1)
try:
file = open(sys.argv[1], mode="rb").read()
except Exception as ex:
print("Failed to open {0}.\r\n\r\n{1}".format(sys.argv[1], str(ex)))
@ariankordi
ariankordi / mii.py
Created Jul 30, 2017
Little script to get a Mii from an NNID using miiverse.nintendo.net (and lxml + urllib)
View mii.py
from lxml import html
from urllib.request import urlopen
import sys
if not sys.argv[1]:
print("UsagE: " + sys.argv[0] + " [NNID to get Mii from]")
ftree = html.fromstring(urlopen('https://miiverse.nintendo.net/users/{0}/favorites'.format(sys.argv[1])).read())
miihash = ftree.xpath('//*[@id="sidebar-profile-body"]/div/a/img/@src')[0].split('.net/')[1].split('_n')[0]
screenname = ftree.xpath('//*[@id="sidebar-profile-body"]/a/text()')[0]
@ariankordi
ariankordi / miiverse.py
Last active Aug 30, 2017
Yet another script to get someone's info from Miiverse BUT THEN returning as JSON
View miiverse.py
#!/usr/bin/python
from lxml import html
import urllib.request, urllib.error, sys, json
if not len(sys.argv) > 1:
print('Usage: %s [username]' % sys.argv[0])
sys.exit(1)
username = sys.argv[1]
try:
req = urllib.request.urlopen('https://miiverse.nintendo.net/users/{}/favorites?locale.lang=en-US'.format(username))
@ariankordi
ariankordi / inklingtalk.py
Created Sep 14, 2017
discord.py script for me to pipe audio from vgmstream
View inklingtalk.py
import os, time, subprocess
import discord
from discord.ext.commands import Bot
main = Bot(command_prefix=("did you get me my CHEEZ WHIZ bo"))
discord.opus.load_opus('/usr/local/Cellar/opus/1.2.1/lib/libopus.dylib')
@main.event
async def on_voice_state_update(b, a):
if not a.voice.voice_channel:
View cloudinary.go
package main
import (
// fasthttp doesn't like cookies on the client so we can't use it
"net/http"
"net/http/cookiejar"
"net/url"
"github.com/PuerkitoBio/goquery"
"io/ioutil"
@ariankordi
ariankordi / adsense.go
Last active Sep 10, 2018
A little Go script that gets the AdSense revenue you have this month
View adsense.go
package main
import (
"github.com/valyala/fasthttp"
"bytes"
"fmt"
)
@ariankordi
ariankordi / closedverse-deadness.go
Last active Sep 10, 2018
A Go script that extracts the "x minutes ago", "x hours ago", etc text from Miiverse clones like https://cedar.doctor/titles/1, then averages them out and sees the average seconds between each post. Might be broken if these sites are down or IPs are just dead.
View closedverse-deadness.go
package main
import (
// requests
"github.com/valyala/fasthttp"
// for spltting bytes
"bytes"
// for getting the things from the thing
"regexp"
@ariankordi
ariankordi / librespot-download.go
Last active Nov 19, 2018
downloads track(s) (plural) from spotify (premium) with librespot LO LOLOLOLOLLO OLOLOLLOLLOLOOLLOLOOLOLOLOOLOLOLOLOLO
View librespot-download.go
package main
// AS OF this being posted, librespot-golang has some deadlocking and you will need to use this fork: https://github.com/benpye/librespot-golang
import (
"Spotify"
"librespot"
"librespot/core"
"librespot/utils"
@ariankordi
ariankordi / arman.py
Last active Nov 19, 2018
A script that just creates a post to indigo.cafe, and requires a login token
View arman.py
#!/bin/python3
# requirements: hyper selectolax
from sys import exit
from ssl import CERT_NONE
try:
import hyper
You can’t perform that action at this time.