调查目的:了解当前各基于TLS的协议方案中ClientHello的指纹独特性。理论背景见 https://arxiv.org/abs/1607.01639 。
指纹数据库:
(利益相关:我是这个的作者)
# Requirements: | |
# clang - The classes/structs you want to dump must be used in code at least once, not just defined. | |
# MSVC - The classes/structs you want to dump must have "MEOW" in the name for "reportSingleClass" to work. | |
# Usage: | |
# $ make dump_vtables file=test.cpp | |
dump_vtables: | |
clang -cc1 -fdump-record-layouts -emit-llvm $(file) > clang-vtable-layout-$(file).txt | |
clang -cc1 -fdump-vtable-layouts -emit-llvm $(file) > clang-record-layout-$(file).txt | |
g++ -fdump-lang-class=$(file).txt $(file) | |
cl.exe $(file) /d1reportSingleClassLayoutMEOW > msvc-single-class-vtable-layout-$(file).txt |
/** | |
* 使用方法: | |
* 1. 用 Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy) | |
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加) | |
* 3. 在 console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容: | |
Springsteen - Eric Church | |
Chattahoochee - Alan Jackson | |
Baby Now That I Found You - Alison Krauss | |
Check Yes or No - George Strait |
调查目的:了解当前各基于TLS的协议方案中ClientHello的指纹独特性。理论背景见 https://arxiv.org/abs/1607.01639 。
指纹数据库:
(利益相关:我是这个的作者)
#!/bin/bash | |
# Print the number of video frames in $1 | |
ffprobe -count_frames -v error -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 ${1} |
if(GlobalVariable* GA = M.getGlobalVariable("llvm.global.annotations")) { | |
// the first operand holds the metadata | |
for (Value *AOp : GA->operands()) { | |
// all metadata are stored in an array of struct of metadata | |
if (ConstantArray *CA = dyn_cast<ConstantArray>(AOp)) { | |
// so iterate over the operands | |
for (Value *CAOp : CA->operands()) { | |
// get the struct, which holds a pointer to the annotated function | |
// as first field, and the annotation as second field | |
if (ConstantStruct *CS = dyn_cast<ConstantStruct>(CAOp)) { |
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
extension CVPixelBuffer { | |
func deepcopy() -> CVPixelBuffer? { | |
let width = CVPixelBufferGetWidth(self) | |
let height = CVPixelBufferGetHeight(self) | |
let format = CVPixelBufferGetPixelFormatType(self) | |
var pixelBufferCopyOptional:CVPixelBuffer? | |
CVPixelBufferCreate(nil, width, height, format, nil, &pixelBufferCopyOptional) | |
if let pixelBufferCopy = pixelBufferCopyOptional { | |
CVPixelBufferLockBaseAddress(self, kCVPixelBufferLock_ReadOnly) | |
CVPixelBufferLockBaseAddress(pixelBufferCopy, 0) |
git submodule foreach git submodule init && git submodule update --recursive |
// Variables just contain an integer. We can have a maximum of `Int.max` variables in our program. ¯\_(ツ)_/¯ | |
private struct Var { | |
static var freshVarIx = 0 | |
let ix: Int | |
init() { | |
Var.freshVarIx+=1 | |
ix = Var.freshVarIx | |
} | |
} |