Skip to content

Instantly share code, notes, and snippets.

View developerfromjokela's full-sized avatar
🪑
chil

DFJ developerfromjokela

🪑
chil
View GitHub Profile
@developerfromjokela
developerfromjokela / asynciterator.js
Created November 21, 2020 15:10
Async iterator for node js
class AsyncIterator {
constructor(callback, endCallback, items) {
this.currentItem = -1;
this.items = items;
this._callback = callback;
this._endCallback = endCallback;
}
@developerfromjokela
developerfromjokela / cportal_bypass.py
Created November 17, 2020 10:02
Ohittaa suomalaisten koulujen/kuntien julkisen Wifin Captive portalin automaattisesti tämän skriptin avulla
import requests
import urllib.parse as urlparse
import validators
import bs4
def meta_redirect(content):
soup = bs4.BeautifulSoup(content, 'html.parser')
result = soup.find("meta", attrs={"http-equiv": "Refresh"})
@developerfromjokela
developerfromjokela / kaappari.py
Last active October 25, 2020 15:09
Edison Sijainninkaappaaja, etsii käyttäjien profiilikuvien exif tiedoista sijaintia
import argparse
from io import BytesIO
import requests
import uuid
import exifread as ef
import json
class bcolors:
HEADER = '\033[95m'
@developerfromjokela
developerfromjokela / ellibs.api.txt
Created September 27, 2020 07:39
Ellibs Rajapinta API
https://api.ellibs.com/v1.3/json/patronAuth/app12480
https://api.ellibs.com/v1.3/json/listCollections/app12480
Auth: Basic (app12480:ZWXqi30gc78ifBcrTf9uSasw6dSWwFt7itsYPkbwa3Lq)
Login POST:
id: library id
patron_id: library card number
password: pin-code or password
@developerfromjokela
developerfromjokela / sanavarasto_uusi.txt
Created September 21, 2020 18:48
Uusi sanalista abitin salasanojen arvaamiseen (yhteensä 82,375 sanaa)
manaus
insesti
monasti
peoni
fiksu
trulli
laava
taksi
smoking
dekoltee
@developerfromjokela
developerfromjokela / sanavarasto.txt
Created September 21, 2020 11:01
Abitti Salasanan Sanakirja (kesken, lisää tulee myöhemmin)
osmoosi
vamppaus
litra
pelko
puusolu
tosikko
layout
ostjakki
parkaisu
rusentua
@developerfromjokela
developerfromjokela / main.py
Last active September 21, 2020 11:24
Skripti luo kokeita jotta saa abitin sanavaraston talteen
import requests
import requests.utils
import os.path
"""Filename"""
filename = "sanavarasto.txt"
abittiUsername = ""
abittiPassword = ""
https://www.amica.fi/api/restaurant/menu/recipe?language=fi&recipeId=7088
@developerfromjokela
developerfromjokela / doc.txt
Last active December 7, 2024 10:49
JAMIX Menu REST API
API for finding "Kitchens":
https://fi.jamix.cloud/apps/menuservice/rest/haku/public
API for reading the table:
http://fi.jamix.cloud/apps/menuservice/rest/haku/menu/<customerID>/<kitchenID>?lang=fi
GET Params:
lang, language (fi, or en). Default = en.
type, json or table. Default = json.
@developerfromjokela
developerfromjokela / docplayer_auth_script.js
Last active June 1, 2020 19:43
Docplayer viewer authentication process reverse-engineered.
'use strict';
parameters = function() {
/** @type {(Array<string>|null)} */
var o = document.location.toString().match(/docview\/(\d+)\/(\d+)/i);
/** @type {string} */
var hasBaseRule = o[2];
/** @type {string} */
var onetype = o[1];
/** @type {number} */
var ex = Math.round((Date.now() + (new Date).getTimezoneOffset()) / 1000) + 24 * 60 * 60;