Skip to content

Instantly share code, notes, and snippets.

View r888800009's full-sized avatar

Lin, Yong Xiang r888800009

View GitHub Profile
#include <windows.h>
#include <iostream>
bool readBinFile(const char fileName[], char*& bufPtr, DWORD& length) {
if (FILE* fp = fopen(fileName, "rb")) {
fseek(fp, 0, SEEK_END);
length = ftell(fp);
bufPtr = new char[length + 1];
fseek(fp, 0, SEEK_SET);
fread(bufPtr, sizeof(char), length, fp);
@robjens
robjens / steps.asciidoc
Last active December 18, 2021 01:50
Grsec Arch Long Term Support Hacking

ArchLinux linux-grsec-lts

Prerequisites

Up-to-date OS

Always ensure you have the latest set of software (Arch is a rolling release system in case you didn’t know).

# In my case, enable `rw` mount of `/boot` or, if linux updates, will fail due to `ro` mode preventing write to disk partition
@jwang-a
jwang-a / gist:cb4b6e9551457aa299066076b836a2cd
Created December 26, 2021 03:15
CVE-2021-4407 reference
[Vulnerability Type Other]
CWE-697: Incorrect Comparison
[Vendor of Product]
unicorn-engine
[Affected Product Code Base]
unicorn engine - <=2.0.0
[Affected Component]
@shijinkui
shijinkui / basecommand_emacs
Created March 16, 2012 02:42
Emacs常用基本快捷键
/************************************/
基本命令
C-x C-f 打开/新建文件
C-x C-s 保存当前缓冲区
C-x C-w 当前缓冲区另存为
C-x C-v 关闭当前Buffer并打开新文件
C-x i 光标处插入文件
C-x b 切换Buffer
C-x C-b 显示Buffer列表
C-x k 关闭当前Buffer
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@crunchprank
crunchprank / pass-crack-cheat-sheet.md
Created December 15, 2015 22:13
Cheat Sheet For Password Crackers

Cheat Sheet For Password Crackers

This list was posted over at Unix-Ninja. I take no credit for these. Posting these here for my own convenience.

Extracting Data

Extract md5 hashes

# egrep -oE '(^|[^a-fA-F0-9])[a-fA-F0-9]{32}([^a-fA-F0-9]|$)' *.txt | egrep -o '[a-fA-F0-9]{32}' > md5-hashes.txt
# egrep -oE '(^|[^a-fA-F0-9])[a-fA-F0-9]{32}([^a-fA-F0-9]|$)' *.txt | egrep -o '[a-fA-F0-9]{32}' > md5-hashes.txt
@suziewong
suziewong / git.md
Last active February 19, 2023 05:38
Git的多账号如何处理? 1.同一台电脑多个git(不同网站的)账号 2.同一台电脑多个git(同一个网站的比如github的)多个账号

1.同一台电脑可以有2个git账号(不同网站的)

首先不同网站,当然可以使用同一个邮箱,比如我的github,gitlab,bitbucket的账号都是monkeysuzie[at]gmail.com 这时候不用担心密钥的问题,因为这些网站push pull 认证的唯一性的是邮箱 比如我的windows 上 2个账号一个gitlab 一个github (用的都是id_rsa)

host github
  hostname github.com
  Port 22

host gitlab.zjut.com

@leonjza
leonjza / netcat.py
Last active July 30, 2023 16:28
Python Netcat
import socket
class Netcat:
""" Python 'netcat like' module """
def __init__(self, ip, port):
self.buff = ""
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@ccwang002
ccwang002 / 0_Background.md
Last active July 31, 2023 02:58
Lab Coding Instructions for Beginners

[TOC]

Lab Guide for Coding Beginners

亮亮(@ccwang002)| Mar, 2015 | CC 3.0 BY license

如果內容有誤,你可以用任何管道發訊息轟炸我,或用底下的 gist comment 留言。

學習方式

每個檔案都會是一個主題,主題底下會列出一些資源。資源的最後會有一個學習目標,方便讓你評估自己學到什麼程度。學習目標會給一個明確的任務,我盡量讓它能跟(宅宅的)日常生活結合。通常只要完成前一、二個目標就行了,這也不是功課所以不一定要給我看。如果你不介意給我看,我會分享我主觀的建議,但大部份的任務是沒有絕對的正確答案。只要能解決問題都是好方法。