Skip to content

Instantly share code, notes, and snippets.

View SenkiTK's full-sized avatar
😫
Preparing for final exam...

Senki SenkiTK

😫
Preparing for final exam...
  • Senki Art Studio
  • Kongmoon,Canton,China
View GitHub Profile
@SenkiTK
SenkiTK / DYLD_INTERPOSE
Created February 5, 2022 05:34 — forked from ytlvy/DYLD_INTERPOSE
利用 DYLD_INTERPOSE 宏 完成OS X系统函数hook
// 演示代码
// #import <mach-o/dyld-interposing.h>
// from dyld-interposing.h
#define DYLD_INTERPOSE(_replacement,_replacee) __attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee __attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacement, (const void*)(unsigned long)&_replacee };
ssize_t hacked_write(int fildes, const void *buf, size_t nbyte)
{
printf("[++++]into hacked_write---by piaoyun");
return write(fildes, buf, nbyte);
}
@SenkiTK
SenkiTK / .bashrc
Created January 14, 2022 09:09 — forked from patik/.bashrc
Bash configure proxy for corporate network
# configure proxy for git while on corporate network
# From https://gist.github.com/garystafford/8196920
function proxy_on(){
# assumes $USERDOMAIN, $USERNAME, $USERDNSDOMAIN
# are existing Windows system-level environment variables
# assumes $PASSWORD, $PROXY_SERVER, $PROXY_PORT
# are existing Windows current user-level environment variables (your user)
# environment variables are UPPERCASE even in git bash
@SenkiTK
SenkiTK / string-conversion.rs
Created October 29, 2021 10:23 — forked from jimmychu0807/string-conversion.rs
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@SenkiTK
SenkiTK / boxstarter_oalabs_x86vm.ps1
Created August 26, 2020 13:21 — forked from OALabs/boxstarter_oalabs_x86vm.ps1
Boxstarter - One click malware analysis tools installer for 32bit VM
Set-ExecutionPolicy Unrestricted;
iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1'));
get-boxstarter -Force;
Install-BoxstarterPackage -PackageName 'https://gist.githubusercontent.com/OALabs/afb619ce8778302c324373378abbaef5/raw/4006323180791f464ec0a8a838c7b681f42d238c/oalabs_x86vm.ps1';