Skip to content

Instantly share code, notes, and snippets.

View manesec's full-sized avatar
🏠
Sleep is good

Mane manesec

🏠
Sleep is good
View GitHub Profile
@manesec
manesec / clear-bloodhound-ce.sh
Created April 1, 2025 12:09
simple clear bloodhound-ce script
#! /bin/bash
username="admin"
password="password"
send_req(){
echo "[!] Clearing container $1"
local baseurl="http://192.168.31.107:$1000"
echo "[*] Base URL: $baseurl"
local auth=$(curl -s "$baseurl/api/v2/login" -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Content-Type: application/json' -H "Origin: $baseurl" -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Sec-GPC: 1' -H 'Priority: u=0' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '{"login_method":"secret","secret":"'$password'","username":"'$username'"}' | jq -r '.data.session_token')
@manesec
manesec / generateFakerPersonData.py
Last active February 19, 2025 10:17
隨機生成 名字,職位,身份證,手機號碼,安全郵箱,地址,基本銀行賬號,MAC地址 并保存成 csv。
from faker import Faker
import csv
# 初始化 Faker,設定本地化為中國
fake = Faker('zh_CN')
# CSV 檔案名
csv_file = 'sensitive.csv'
# 欄位名稱 (對應到使用者要求的字段)
#! /bin/bash
pipx install git+https://github.com/dirkjanm/adidnsdump
pipx install git+https://github.com/CravateRouge/bloodyAD
pipx install git+https://github.com/ly4k/Certipy
pipx install git+https://github.com/p0dalirius/Coercer
pipx install git+https://github.com/byt3bl33d3r/dnschef-ng
pipx install git+https://github.com/sashathomas/evil-jea
pipx install git+https://github.com/arthaud/git-dumper
pipx install git+https://github.com/fortra/impacket
@manesec
manesec / simpleWeb.html
Created September 20, 2024 22:18
一個簡單的小網站
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Simple Webpage</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
@manesec
manesec / connect-openvpn.sh
Created September 9, 2024 17:04
一個小脚本自動把賬號密碼自動輸入到openvpn裏面,無需每次都要手動輸入賬號密碼
#!/usr/bin/expect
if { $argc != 1 } {
puts "Usage: $argv0 <config.ovpn>"
exit 1
}
set configFile [lindex $argv 0]
set timeout -1

ERROR - Script Bloken

ohh, there was an error happened when loading the web page ... QAQ ...

抱歉,加載 Javascript 時出現了問題 ...

How to solve ?

Please Disable AD Block, there are no AD in the website.

#https://rohnspowershellblog.wordpress.com/2013/03/19/viewing-service-acls/
Add-Type @"
[System.FlagsAttribute]
public enum ServiceAccessFlags : uint
{
QueryConfig = 1,
ChangeConfig = 2,
QueryStatus = 4,
EnumerateDependents = 8,
Start = 16,
@manesec
manesec / rbcd_demo.ps1
Created June 8, 2024 18:13 — forked from HarmJ0y/rbcd_demo.ps1
Resource-based constrained delegation computer DACL takeover demo
# import the necessary toolsets
Import-Module .\powermad.ps1
Import-Module .\powerview.ps1
# we are TESTLAB\attacker, who has GenericWrite rights over the primary$ computer account
whoami
# the target computer object we're taking over
$TargetComputer = "primary.testlab.local"
@manesec
manesec / updateTimeFromNTP.py
Created May 4, 2024 07:58
Update time from NTP SERVER with windows
import time
import os
import ntplib
client = ntplib.NTPClient()
response = client.request('ntp4.aliyun.com')
timestamp = int(response.tx_time)
date_string = time.strftime('%d-%m-%Y', time.localtime(timestamp))
print(date_string)
os.system('date ' + date_string)
@manesec
manesec / SimpleHTTPServerWithUpload.py
Created March 4, 2024 21:18 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""