Skip to content

Instantly share code, notes, and snippets.

View Ga-ryo's full-sized avatar

Ga_ryo_ Ga-ryo

View GitHub Profile
@eboda
eboda / exploit.js
Last active September 14, 2021 13:20
Exploit for Chakrazy challenge from PlaidCTF 2017 - ChakraCore exploit
////////////////////////////////////////////////////////////////////////////
//
// The vulnerability was that the following line of code could change the type of the
// underlying Array from JavascriptNativeIntArray to JavascriptArray:
//
// spreadableCheckedAndTrue = JavascriptOperators::IsConcatSpreadable(aItem) != FALSE;
//
// As can be seen in the provided .diff, the check for whether the type of the pDestArray has changed
// was removed. If the aItem then is not a JavascriptArray, the following code path is taken:
// else
#!/usr/bin/sudo ruby
#
# revealer.rb -- Deobfuscate GHE .rb files.
#
# This is simple:
# Every obfuscated file in the GHE VM contains the following code:
#
# > require "ruby_concealer.so"
# > __ruby_concealer__ "..."
@mheiber
mheiber / jscore.md
Last active January 31, 2024 17:42
Using JavaScriptCore in a Production iOS app

OUTDATED

JavaScriptCore is a built-in iOS library that enables you to use JavaScript in apps alongside Objective-C and Swift. It lets developers read JavaScript from a string, execute it from Objective-C or Swift, and share data structures and functions across languages. We JavaScriptCore to share code between Web and iOS.

@nobonobo
nobonobo / spectrum.py
Created March 25, 2013 13:15
リアルタイムスペクトラム・アナライザーを作ってみた。 PortAudioのPython版PyAudioとnumpyに依存。 実行すると横並び64個の0〜9の数値の表示が流れ続けます。 マイク音声を入力すると周波数成分別に数字が大きくなります。 リアルタイム16Kサンプリングの512点FFTがCore-i5レベルCPU2%程度の使用量で動きます。 内部ではちゃんと周波数の値が計算されています(ループの中で計算する必要はなかった・・・) - 口笛で音階をつけると大きな数字が現れる場所がスライドします。 - 打撃音は全部の数値が増えます。
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
import atexit
import time
import numpy as np
import pyaudio