Skip to content

Instantly share code, notes, and snippets.

View xrombar's full-sized avatar
👾
Vibing

bakki xrombar

👾
Vibing
View GitHub Profile
@xrombar
xrombar / SuperReturn.c
Created June 21, 2025 13:02 — forked from namazso/SuperReturn.c
SuperReturn
// Return, but across multiple frames.
//
// This function unwinds the given number of frames, then sets the return value provided, emulating as if this number
// of functions returned, with the last one returning the value provided in RetVal. Can be used to hook a callee when
// you don't have a convenient way to hook it directly and actually just want to stub it out with a return value.
//
// @param FramesToSkip The number of frames to skip, starting from the current frame.
// @param RetVal The value to return from the last frame.
// @param Context Context to start from, in case you want to SuperReturn from somewhere deeper.
DECLSPEC_NOINLINE void SuperReturn(
https://dns.google/dns-query
https://8.8.8.8/dns-query
https://8.8.4.4/dns-query
https://cloudflare-dns.com/dns-query
https://1.1.1.1/dns-query
https://1.0.0.1/dns-query
https://dns.quad9.net/dns-query
https://9.9.9.9/dns-query
https://doh.opendns.com/dns-query
https://146.112.41.2/dns-query
@xrombar
xrombar / hash.hpp
Last active December 29, 2024 17:43
quick and lazy fnv1a hasher
template <typename T>
constexpr auto hash_ex( const T* buf, BOOL upper ) {
ULONG hash = 0x811C9DC5;
while ( *buf ) {
auto chr = static_cast<ULONG>( *buf++ );
if ( upper ) {
//
// uppercase
@xrombar
xrombar / Get-PingSweep.ps1
Created June 27, 2022 02:54 — forked from joegasper/Get-PingSweep.ps1
Get-PingSweep - super fast (~500ms) subnet ping sweep with option to resolve IP address
# Inspiration from https://twitter.com/mrhvid/status/929717169130176512 @mrhvid @Lee_Holmes
function ResolveIp($IpAddress) {
try {
(Resolve-DnsName $IpAddress -QuickTimeout -ErrorAction SilentlyContinue).NameHost
} catch {
$null
}
}