Skip to content

Instantly share code, notes, and snippets.

View charygao's full-sized avatar
🎯
Focusing

高亚斌 charygao

🎯
Focusing
View GitHub Profile
@charygao
charygao / service.md
Created July 1, 2024 07:32 — forked from miromannino/service.md
Sample /etc/init.d script

Sample service script for debian/ubuntu

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name
@charygao
charygao / launch-GRD.sh
Created June 27, 2024 08:04 — forked from greyltc/launch-GRD.sh
configures then activates gnome-remote-desktop from the command line
#!/usr/bin/env bash
# run this on the remote terminal machine, as auser with sudo powers, probably through a remote ssh shell
# this will overwrite all the settings it touches
# the name of the user to run these commands as
TARGET_USER=jane
# we need an inlocked desktop session. we can either start a new autologin one or unlock an existing one

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@charygao
charygao / hutong.go
Created August 10, 2023 02:15 — forked from liutianpeng/hutong.go
消息队列高手课 - 13节 - 大爷聊天初版
package main
import (
"fmt"
jsoniter "github.com/json-iterator/go"
"io"
"net"
"sync"
)
@charygao
charygao / isgbk.c
Created April 8, 2023 03:41 — forked from neesenk/isgbk.c
判断一个字串是否是GBK编码
/* http://en.wikipedia.org/wiki/GBK */
size_t fixGBK(const char *str, size_t len)
{
const unsigned char *string = (const unsigned char *)str;
size_t idx = 0;
for (idx = 0; idx < len; idx++) {
int val = string[idx], val2;
if (val < 128)
continue;
if (idx + 1 >= len)
@charygao
charygao / SpecRunner.html
Created February 20, 2022 07:20 — forked from OakRaven/SpecRunner.html
Jasmine SpecRunner
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Jasmine Spec Runner</title>
<link rel="stylesheet" type="text/css" href="spec/jasmine/jasmine.css">
<script src="spec/jasmine/jasmine.js"></script>
<script src="spec/jasmine/jasmine-html.js"></script>
<!-- include source files here... -->
@charygao
charygao / r21337patch.py
Created March 24, 2021 11:42 — forked from scrapbird/r21337patch.py
Applies an x64dbg .1337 patch file to a binary in radare2. Call with: #!pipe ./r21337patch.py /path/to/patch.1337
#!/usr/bin/env python
import r2pipe
import sys
r2 = r2pipe.open()
# r2 base address
delta = 0x400000
@charygao
charygao / gist:830ec700031b24badf1f0c103e606c3a
Created March 12, 2021 08:44 — forked from Rottweiler/gist:44fe4461a4552acf303a
Heavily obfuscated UnConfuserEx tool
UnConfuserEx https://mega.nz/#!U1hxwQKb!7WFBSjrZgg8ieFp15K0RJW8rWuyMHZTO9bpCekhBQfY
ConfuserExDupPopPatcher https://mega.nz/#!IkhHzZDS!vPYABdYJtuDIGJBHdKzwIqLajxugJaNlENWr5CWjNlo
ConfuserExStringDecryptor https://mega.nz/#!plhxRJyY!Vq9eRS-gixC__q75860gDD8Tcm_ncOfCCCP_HQKguUM
ConfuserExCallFixer https://mega.nz/#!0gZFlbwC!KFka_Kxe-GuU-d8COni91xmGPbiRnbX6lBLYAomn7No
I'm not responsible for what you do with these -- they may very well be backdoored
@charygao
charygao / .gitignore
Created February 25, 2021 09:42 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #