Skip to content

Instantly share code, notes, and snippets.

//
// main.cc
// anthropic_interview
//
// clang++ -O2 -Wall -Wformat -Wformat=2 -Wconversion -Wimplicit-fallthrough -Werror=format-security -fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=3 -std=c++23 main.cc -o main
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <iostream>
#include <pthread.h>
#include <unistd.h>
#include <cstdint>
#define BYTES_TO_MB(x) ((double)(x) / (1024.0 * 1024.0))
inline void printStackUsage()
{
volatile int localVar;
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local conf = require("telescope.config").values
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local Job = require("plenary.job")
local M = {}
M.search = function(opts)
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@w1redch4d
w1redch4d / is_number.c
Last active May 16, 2025 02:50
To All NodeJS Devs downloading is_even and is_odd from npm this is how fuckin simple it is
#include <stdio.h>
// actual logic
char* is_number(int num) {
char* type[2] = {"Even", "Odd"};
return type[num % 2];
}
// how to use
int main() {
import requests
import itertools
import json
import sys
import distro
def main():
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
@w1redch4d
w1redch4d / enable.ps1
Created September 16, 2024 16:17
Enable windefend
Param([Parameter(Mandatory=$false)][switch]$shouldAssumeToBeElevated, [Parameter(Mandatory=$false)] [String]$workingDirOverride)
# If parameter is not set, we are propably in non-admin execution. We set it to the current working directory so that
# the working directory of the elevated execution of this script is the current working directory
if(-not($PSBoundParameters.ContainsKey('workingDirOverride')))
{
$workingDirOverride = (Get-Location).Path
}
function Test-Admin {
typedef struct _PS_ATTRIBUTE
{
ULONG_PTR Attribute; // PROC_THREAD_ATTRIBUTE_XXX | PROC_THREAD_ATTRIBUTE_XXX modifiers, see ProcThreadAttributeValue macro and Windows Internals 6 (372)
SIZE_T Size; // Size of Value or *ValuePtr
union
{
ULONG_PTR Value; // Reserve 8 bytes for data (such as a Handle or a data pointer)
PVOID ValuePtr; // data pointer
};
PSIZE_T ReturnLength; // Either 0 or specifies size of data returned to caller via "ValuePtr"
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "xyz.com" `
@w1redch4d
w1redch4d / ida_layout.json
Created July 12, 2024 17:26
MY IDA layout
{
"layout": {
"main": {
"type": "vsplit",
"children": [
{
"type": "hsplit",
"children": [
{
"type": "vsplit",