Skip to content

Instantly share code, notes, and snippets.

View sfc9982's full-sized avatar

Jackson Chen sfc9982

View GitHub Profile
<html>
<head>
<title>Click me if you can</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
import qrcode
from qrcode.util import *
def hack_put(self, num, length):
if num == 0:
num = 233 # make a fake length
for i in range(length):
self.put_bit(((num >> (length - i - 1)) & 1) == 1)
qrcode.util.BitBuffer.put = hack_put
@vlinx-io
vlinx-io / native-image-reverse.md
Last active April 7, 2024 05:28
NativeImage Reverse Engineering

NativeImage Reverse Engineering

Restoring and protecting Java code is an old and often-discussed issue. Due to the byte-code format used to store Java class files, which contains a lot of meta-information, it can be easily restored to its original code. In order to protect Java code, the industry has adopted many methods, such as obfuscation, bytecode encryption, JNI protection, and so on. However, regardless of the method used, there are still ways and means to crack it.

Binary compilation has always been considered as a relatively effective method of code protection. Java's binary compilation is supported as AOT (Ahead of Time) technology, which means pre-compilation.

However, due to the dynamic nature of the Java language, binary compilation needs to handle issues such as reflection, dynamic proxy, JNI loading, etc., which poses many difficulties. Therefore, for a long time, there has been a lack of a mature, reliable, and adaptable tool for AOT compilation in Java that can be widely applied in p

@vanyle
vanyle / modding_discord.md
Last active April 1, 2024 11:13
Modding the Discord client

Modding the discord client

Disclaimer: Modding the discord client is against Discord's term of service. I'm not responsible if any action is taken against you.

Why modding ?

Modding the client will allow you to customize to:

  • change the appearance of the discord client
  • have script to automaticaly send messages at specific times
  • log messages from a chat into a local file

This guide will explain how to inject js code into the discord client and send messages. I'm assuming you know you to write javascript code and are using Windows.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 10, 2024 20:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@shiritrong
shiritrong / gist:d85bb1e16c66d1a09896727780b4fc7c
Last active May 4, 2024 23:19
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG
@cmpute
cmpute / fastio.hpp
Last active August 11, 2023 07:58
Code Snippets for IO Bursting in OJ
/*
* OJ中加速IO常用的代码片段
* Author Jacob C
* THU_ID 2014010812
*/
//OJ中常用的头文件和预编译指令
#ifndef _OJ_
#define DEBUG
#endif
@odytrice
odytrice / fsharp-tutorial.fs
Last active March 3, 2024 04:32
F# Code Samples
// This sample will guide you through elements of the F# language.
//
// *******************************************************************************************************
// To execute the code in F# Interactive, highlight a section of code and press Alt-Enter in Windows or
// Ctrl-Enter Mac, or right-click and select "Send Selection to F# Interactive".
// You can open the F# Interactive Window from the "View" menu.
// *******************************************************************************************************
// For more about F#, see:
@kevinzhow
kevinzhow / ip_cook.rb
Created March 20, 2014 11:24
路由转换
#utf-8
require 'netaddr'
newfile = File.open("some_file", "w")
File.foreach('out_ip').with_index { |line, line_num|
line = line.split(',')[0].to_s
a = NetAddr::CIDR.create(line)
puts "#{a.ip}/#{a.wildcard_mask}"
newfile.write("route = #{a.ip}/#{a.wildcard_mask}\n")
@kevinzhow
kevinzhow / route.sh
Last active October 2, 2022 08:01
AnyConnect 路由表
route = 8.0.0.0/255.0.0.0
route = 58.0.0.0/255.0.0.0
route = 23.0.0.0/255.0.0.0
route = 117.0.0.0/255.0.0.0
route = 199.0.0.0/255.0.0.0
route = 190.0.0.0/255.0.0.0
route = 198.0.0.0/255.0.0.0
route = 173.0.0.0/255.0.0.0
route = 174.0.0.0/255.0.0.0
route = 168.0.0.0/255.0.0.0