Skip to content

Instantly share code, notes, and snippets.

XMLHttpRequest.prototype._open = XMLHttpRequest.prototype.open
XMLHttpRequest.prototype._send = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.open = function () {
/* codes... */
this.hooked = true
console.log(...arguments)
return this._open(...arguments)
}
@toriato
toriato / ssv.js
Created August 19, 2021 01:50
넥사크로플랫폼 SSV 인코딩/디코딩
const ssv = {
recordSeparator: String.fromCharCode(0x1E),
unitSeparator: String.fromCharCode(0x1F),
eot: String.fromCharCode(0x03),
/**
* SSV 포맷으로 인코딩된 문자열을 디코딩합니다
* @param {string} raw
* @returns {Dataset[]}
*/
@toriato
toriato / decode.go
Created September 10, 2021 11:04
디시인사이드 글 작성 서비스 코드 디코더 (golang)
const decodeKey = "yL/M=zNa0bcPQdReSfTgUhViWjXkYIZmnpo+qArOBslCt2D3uE4Fv5G6wH178xJ9K"
func decode(keys, code string) string {
// common.js?v=210817:858
k := [4]byte{}
o := strings.Builder{}
for c := 0; c < len(keys); {
for i := 0; i < len(k); i++ {
k[i] = byte(strings.Index(decodeKey, string(keys[c])))
@toriato
toriato / cloudflare-ddns.sh
Last active September 14, 2021 02:09
Cloudflare DDNS bash script
#!/bin/bash
# cloudflare-ddns.sh
# requires bash, jq and curl to run!
# TODO: error handling :)
# token can be generate from https://dash.cloudflare.com/profile/api-tokens
# requires Zone.DNS permission to update DNS record
# more info on https://api.cloudflare.com/#getting-started-requests
TOKEN="__________"
@toriato
toriato / insomnia-collection.yaml
Last active March 13, 2022 03:01
Insomnia 디시인사이드 공앱 (com.dcinside.app) API 컬렉션
_type: export
__export_format: 4
__export_date: 2022-03-03T09:17:49.623Z
__export_source: insomnia.desktop.app:v2021.7.2
resources:
- _id: req_90b1c3ff75f94475b0366ad0bd3215f1
parentId: fld_5c1bb9b53bed4a078e8a8bb4f5e5bb32
modified: 1646298701854
created: 1646293770269
url: https://firebaseinstallations.googleapis.com/v1/projects/{{
@toriato
toriato / index.php
Last active February 21, 2023 08:56
simple file uploader and url shortener for sharex
<?php
define('MYSQL_DSN', 'mysql:host=mariadb;dbname=aeon');
define('MYSQL_USER', 'MYUSER');
define('MYSQL_PASS', 'MYP4SS');
define('MYSQL_OPTIONS', [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
]);
@toriato
toriato / launch.ps1
Last active September 22, 2022 14:57
Various powershell script for Arma 3 dedicated server
param (
[Parameter(HelpMessage = "서버 경로")]
[String]
$PathToServer = "$(Get-Location)\serverfiles",
[Parameter(HelpMessage = "서버 실행 파일 경로")]
[String]
$PathToServerExecutable = "$(Get-Location)\serverfiles\arma3server_x64_perf.exe",
[Parameter(HelpMessage = "프로필 경로")]
# Logging
SyslogFacility AUTH
LogLevel VERBOSE
# Authentication
LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 1
MaxSessions 4
// ==UserScript==
// @name dcinside.list.preview.user.js
// @namespace https://github.com/toriato/userscripts/dcinside.list.preview.user.js
// @description 디시인사이드 갤러리 목록에서 제목 위에 커서를 올려 게시글을 미리 열람합니다
// @author Sangha Lee <totoriato@gmail.com>
// @icon https://nstatic.dcinside.com/dc/m/img/dcinside_icon.png
// @require https://github.com/toriato/userscripts/raw/master/library/fetch.js
// @match https://gall.dcinside.com/board/lists*
// @match https://gall.dcinside.com/mgallery/board/lists*
// @match https://gall.dcinside.com/mini/board/lists*
#!/bin/bash
entrypoint=$ENTRYPOINT
project=${PROJECT:-paper}
version=$VERSION
build=$BUILD
sumbin=${SUMBIN:-sha256sum}
entrypoint_paper="https://papermc.io/api/v2"
entrypoint_purpur="https://api.purpurmc.org/v2"