Skip to content

Instantly share code, notes, and snippets.

View jm33-m0's full-sized avatar
🎯
Focusing

Jimmy Mi jm33-m0

🎯
Focusing
View GitHub Profile
@jm33-m0
jm33-m0 / anime-toggle.bat
Last active October 27, 2022 03:05
Toggle Asus ROG G14/15 LED Matrix
@echo off
:: Check privileges
net file 1>NUL 2>NUL
if not '%errorlevel%' == '0' (
powershell Start-Process -FilePath "%0" -ArgumentList "%cd%" -verb runas >NUL 2>&1
exit /b
)
:: Change directory with passed argument. Processes started with
:: "runas" start with forced C:\Windows\System32 workdir
@SCP002
SCP002 / send_wm_close_windows.go
Last active November 8, 2023 10:21
Golang: Close main window of the process with the specified PID for graceful termination of processes on Windows.
// Used in https://github.com/SCP002/terminator.
package main
import (
"errors"
"fmt"
"unsafe"
"github.com/gonutz/w32/v2"
/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>

VMware VMX Notes, Performance Tweaks, Interactivity Improvements

experimented on VMware Workstation 15.5.2 build-15785246, other verisons may not work, no guaranteed.


global config for all VMs

C:\ProgramData\VMware\VMware Workstation\config.ini

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 22, 2024 08:35
crack activate Office on mac with license file
@romainl
romainl / redir.md
Last active July 9, 2024 16:26
Redirect the output of a Vim or external command into a scratch buffer

Redirect the output of a Vim or external command into a scratch buffer

Usage (any shell)

Show full output of command :hi in scratch window:

:Redir hi

Show full output of command :!ls -al in scratch window:

#!/usr/bin/python2.7
#
# Dahua backdoor Generation 2 and 3
# Author: bashis <mcw noemail eu> March 2017
#
# Credentials: No credentials needed (Anonymous)
#Jacked from git history
#
import string
@mcastelino
mcastelino / iptables-cheatsheet.md
Last active July 10, 2024 08:51
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@joshuaskorich
joshuaskorich / cowroot.c
Last active June 12, 2024 22:19 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active July 15, 2024 09:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096