WebHackersWeapons Documentation

️ Web Hacker's Weapons / A collection of cool tools used by Web hackers. Happy hacking , Happy bug-hunting

RAW Doc

1. Project Overview & Quickstart (hahwul/WebHackersWeapons)

Family project


Table of Contents

Weapons

Attributes

Attributes
Types Army-Knife Proxy Recon Fuzzer Scanner Exploit Env Utils Etc
Tags live-audit mitmproxy crawl osint recon forensics social-engineering steganography pentest exploit cloud report infra http repeater url subdomains portscan dns port online endpoint attack-surface domain takeover ssl tls certificates js-analysis favicon param csp apk graphql asset-discovery asn network-mapping wordlist permutation jwt path-traversal cache-vuln prototypepollution prototype-pollution header smuggle fuzz ssrf crlf ssti dependency-confusion nosqli 403 xss sqli lfi open-redirect aaa broken-link vulnerability-scanner web-scanner sast code-analysis s3 oast dependency-scanning cors container-security sbom aws security terraform secret-scanning credentials rfi authentication xxe rop RMI race-condition deserialize diff package-manager tools-management dom blind-xss payload browser-record json web3 nuclei-templates notify documents gRPC-Web note clipboard cookie encode darkmode cidr network ip-manipulation zipbomb
Langs Go Java Python Ruby Shell JavaScript Rust C Crystal Kotlin Perl C# TypeScript HTML BlitzBasic C++ CSS Txt PHP

Tools

Type Name Description Star Tags Badges
Army-Knife jaeles The Swiss Army knife for automated Web Application Testing live-audit
Army-Knife ZAP The ZAP core project mitmproxy live-audit crawl
Army-knife Baudrillard Suite Cross-platform security research toolkit with OSINT aggregation, memory forensics, social engineering tools, steganography, and predictive threat modeling. osint recon forensics social-engineering steganography
Army-knife Ronin Free and Open Source Ruby Toolkit for Security Research and Development pentest crawl recon exploit
Army-Knife Darkmoon Autonomous AI penetration testing platform with agentic reasoning and real exploit execution across web, cloud, identity, CI/CD, Active Directory and Kubernetes pentest exploit recon cloud report
Army-Knife BurpSuite The BurpSuite Project mitmproxy live-audit crawl
Army-Knife Metasploit The world’s most used penetration testing framework pentest
Army-Knife axiom A dynamic infrastructure toolkit for red teamers and bug bounty hunters! infra
Proxy Glorp A CLI-based HTTP intercept and replay proxy mitmproxy
Proxy Echo Mirage A generic network proxy that uses DLL injection to capture and alter TCP traffic. mitmproxy
Proxy hetty Hetty is an HTTP toolkit for security research. It aims to become an open source alternative to commercial software like Burp Suite Pro, with powerful features tailored to the needs of the infosec and bug bounty community. mitmproxy
Proxy Caido A lightweight web security auditing toolkit mitmproxy
Proxy EvilProxy A ruby http/https proxy to do EVIL things. mitmproxy
Proxy proxify Swiss Army knife Proxy tool for HTTP/HTTPS traffic capture, manipulation and replay mitmproxy
Proxy mitmproxy An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers. mitmproxy
Recon goverview goverview - Get an overview of the list of URLs url
Recon intrigue-core Discover Your Attack Surface
Recon FavFreak Making Favicon.ico based Recon Great again !
Recon gitrob Reconnaissance tool for GitHub organizations
Recon knock Knock Subdomain Scan subdomains
Recon Amass In-depth Attack Surface Mapping and Asset Discovery subdomains
Recon masscan TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes. portscan
Recon bbot OSINT automation for hackers osint
Recon scilla 🏴‍☠️ Information Gathering tool 🏴‍☠️ dns/subdomain/port enumeration subdomains dns port
Recon SubBrute https://github.com/TheRook/subbrute subdomains
Recon SecurityTrails Online dns / subdomain / recon tool subdomains online
Recon Lepus Subdomain finder subdomains
Recon lazyrecon This script is intended to automate your reconnaissance process in an organized fashion
Recon subfinder Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing. subdomains
Recon assetfinder Find domains and subdomains related to a given domain subdomains
Recon urlhunter a recon tool that allows searching on URLs that are exposed via shortener services url
Recon dirsearch Web path scanner
Recon waymore Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan, VirusTotal & Intelligence X! url
Recon Osmedeus Fully automated offensive security framework for reconnaissance and vulnerability scanning
Recon spiderfoot SpiderFoot automates OSINT collection so that you can focus on analysis. osint
Recon dnsvalidator Maintains a list of IPv4 DNS servers by verifying them against baseline servers, and ensuring accurate responses. dns
Recon aquatone A Tool for Domain Flyovers domain
Recon urx Extracts URLs from OSINT Archives for Security Insights url
Recon crawlergo A powerful browser crawler for web vulnerability scanners crawl
Recon shuffledns shuffleDNS is a wrapper around massdns written in go that allows you to enumerate valid subdomains using active bruteforce as well as resolve subdomains with wildcard handling and easy input-output support. dns
Recon subzy Subdomain takeover vulnerability checker subdomains takeover
Recon github-endpoints Find endpoints on GitHub.
Recon tlsx Fast and configurable TLS grabber focused on TLS based data collection ssl tls certificates
Recon waybackurls Fetch all the URLs that the Wayback Machine knows about for a domain url
Recon SecretFinder SecretFinder - A python script for find sensitive data (apikeys, accesstoken,jwt,..) and search anything on javascript files
Recon longtongue Customized Password/Passphrase List inputting Target Info
Recon 3klCon Automation Recon tool which works with Large & Medium scopes. It performs more than 20 tasks and gets back all the results in separated files.
Recon pagodo pagodo (Passive Google Dork) - Automate Google Hacking Database scraping and searching
Recon BLUTO DNS Analysis Tool dns
Recon github-subdomains Find subdomains on GitHub subdomains
Recon meg Fetch many paths for many hosts - without killing the hosts
Recon STEWS A Security Tool for Enumerating WebSockets
Recon zdns Fast CLI DNS Lookup Tool dns
Recon favirecon Use favicon.ico to improve your target recon phase. Quickly detect technologies, WAF, exposed panels, known services. favicon
Recon Sub404 A python tool to check subdomain takeover vulnerability subdomains takeover
Recon ParamSpider Mining parameters from dark corners of Web Archives param
Recon OneForAll OneForAll是一款功能强大的子域收集工具
Recon Photon Incredibly fast crawler designed for OSINT. osint crawl
Recon HydraRecon All In One, Fast, Easy Recon Tool
Recon csprecon Discover new target domains using Content Security Policy csp
Recon Sublist3r Fast subdomains enumeration tool for penetration testers subdomains
Recon katana A next-generation crawling and spidering framework. crawl
Recon Silver Mass scan IPs for vulnerable services port
Recon cc.py Extracting URLs of a specific target based on the results of "commoncrawl.org" url
Recon altdns Generates permutations, alterations and mutations of subdomains and then resolves them dns subdomains
Recon noir Attack surface detector that identifies endpoints by static analysis endpoint url attack-surface
Recon subjack Subdomain Takeover tool written in Go subdomains takeover
Recon apkleaks Scanning APK file for URIs, endpoints & secrets. apk url endpoint
Recon xnLinkFinder A python tool used to discover endpoints (and potential parameters) for a given target js-analysis
Recon naabu A fast port scanner written in go with focus on reliability and simplicity. Designed to be used in combination with other tools for attack surface discovery in bug bounties and pentests portscan
Recon reconftw reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
Recon graphw00f GraphQL Server Engine Fingerprinting utility graphql
Recon gospider Gospider - Fast web spider written in Go crawl
Recon findomain The fastest and cross-platform subdomain enumerator, do not waste your time. subdomains
Recon Shodan World's first search engine for Internet-connected devices osint
Recon uncover Quickly discover exposed hosts on the internet using multiple search engine.
Recon parameth This tool can be used to brute discover GET and POST parameters
Recon fhc Fast HTTP Checker.
Recon Smap a drop-in replacement for Nmap powered by shodan.io port
Recon puredns Puredns is a fast domain resolver and subdomain bruteforcing tool that can accurately filter out wildcard subdomains and DNS poisoned entries. subdomains dns
Recon subjs Fetches javascript file from a list of URLS or subdomains. url subdomains
Recon RustScan Faster Nmap Scanning with Rust portscan
Recon dnsprobe DNSProb (beta) is a tool built on top of retryabledns that allows you to perform multiple dns queries of your choice with a list of user supplied resolvers. dns
Recon LinkFinder A python script that finds endpoints in JavaScript files js-analysis
Recon gauplus A modified version of gau for personal usage. Support workers, proxies and some extra things. url
Recon subs_all Subdomain Enumeration Wordlist. 8956437 unique words. Updated. subdomains
Recon HostHunter Recon tool for discovering hostnames using OSINT techniques. osint
Recon DNSDumpster Online dns recon & research, find & lookup dns records dns online
Recon htcat Parallel and Pipelined HTTP GET Utility
Recon SubOver A Powerful Subdomain Takeover Tool subdomains takeover
Recon sn0int Semi-automatic OSINT framework and package manager osint
Recon Parth Heuristic Vulnerable Parameter Scanner param
Recon cloudlist Cloudlist is a tool for listing Assets from multiple Cloud Providers cloud asset-discovery
Recon subgen A really simple utility to concate wordlists to a domain name - to pipe into your favourite resolver! subdomains
Recon go-dork The fastest dork scanner written in Go.
Recon asnmap Go CLI and Library for quickly mapping organization network ranges using ASN information asn network-mapping
Recon Hunt3r Made your bugbounty subdomains reconnaissance easier with Hunt3r the web application reconnaissance framework
Recon JSFScan.sh Automation for javascript recon in bug bounty. js-analysis
Recon recon_profile Recon profile (bash profile) for bugbounty
Recon BugBountyScanner A Bash script and Docker image for Bug Bounty reconnaissance.
Recon gau Fetch known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, and Common Crawl. url
Recon x8 Hidden parameters discovery suite
Recon CT_subdomains An hourly updated list of subdomains gathered from certificate transparency logs subdomains
Recon jsluice Extract URLs, paths, secrets, and other interesting bits from JavaScript js-analysis
Recon dmut A tool to perform permutations, mutations and alteration of subdomains in golang. subdomains
Recon hakrevdns Small, fast tool for performing reverse DNS lookups en masse.
Recon Chaos Web actively scan and maintain internet-wide assets' data. enhance research and analyse changes around DNS for better insights.
Recon uro declutters url lists for crawling/pentesting url
Recon xurlfind3r A command-line utility designed to discover URLs for a given domain in a simple, efficient way. url
Recon megplus Automated reconnaissance wrapper — TomNomNom's meg on steroids. [DEPRECATED]
Recon rusolver Fast and accurate DNS resolver. dns
Recon dnsx dnsx is a fast and multi-purpose DNS toolkit allow to run multiple DNS queries of your choice with a list of user-supplied resolvers. dns
Recon rengine reNgine is an automated reconnaissance framework meant for gathering information during penetration testing of web applications. reNgine has customizable scan engines, which can be used to scan the websites, endpoints, and gather information.
Recon Sudomy subdomain enumeration tool to collect subdomains and analyzing domains subdomains
Recon cariddi Take a list of domains, crawl urls and scan for endpoints, secrets, api keys, file extensions, tokens and more crawl
Recon GitMiner Tool for advanced mining for content on Github
Recon haktrails Golang client for querying SecurityTrails API data
Recon getJS A tool to fastly get all javascript sources/files js-analysis
Recon ParamWizard ParamWizard is a powerful Python-based tool designed for extracting and identifying URLs with parameters from a specified website. param
Recon Arjun HTTP parameter discovery suite. param
Recon httpx httpx is a fast and multi-purpose HTTP toolkit allow to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads. url
Recon chaos-client Go client to communicate with Chaos DNS API.
Recon hakrawler Simple, fast web crawler designed for easy, quick discovery of endpoints and assets within a web application crawl
Recon alterx Fast and customizable subdomain wordlist generator using DSL subdomains wordlist permutation
Recon shosubgo Small tool to Grab subdomains using Shodan api. subdomains
Recon gowitness 🔍 gowitness - a golang, web screenshot utility using Chrome Headless
Recon gobuster Directory/File, DNS and VHost busting tool written in Go subdomains
Fuzzer CrackQL CrackQL is a GraphQL password brute-force and fuzzing utility. graphql
Fuzzer c-jwt-cracker JWT brute force cracker written in C jwt
Fuzzer Clairvoyance Obtain GraphQL API schema even if the introspection is disabled graphql
Fuzzer wfuzz Web application fuzzer
Fuzzer dotdotpwn DotDotPwn - The Directory Traversal Fuzzer path-traversal
Fuzzer ParamPamPam This tool for brute discover GET and POST parameters. param cache-vuln
Fuzzer ppfuzz A fast tool to scan client-side prototype pollution vulnerability written in Rust. 🦀 prototypepollution prototype-pollution
Fuzzer hashcat World's fastest and most advanced password recovery utility
Fuzzer kiterunner Contextual Content Discovery Tool
Fuzzer headerpwn A fuzzer for finding anomalies and analyzing how servers respond to different HTTP headers header
Fuzzer SmuggleFuzz A rapid HTTP downgrade smuggling scanner written in Go. smuggle fuzz
Fuzzer thc-hydra hydra
Fuzzer fuzzparam A fast go based param miner to fuzz possible parameters a URL can have. param
Fuzzer BruteX Automatically brute force all services running on a target.
Fuzzer BatchQL GraphQL security auditing script with a focus on performing batch GraphQL queries and mutations graphql
Fuzzer jwt-hack 🔩 jwt-hack is tool for hacking / security testing to JWT. Supported for En/decoding JWT, Generate payload for JWT attack and very fast cracking(dict/brutefoce) jwt
Fuzzer medusa Fastest recursive HTTP fuzzer, like a Ferrari.
Fuzzer jwt-cracker Simple HS256 JWT token brute force cracker jwt
Fuzzer SSRFmap Automatic SSRF fuzzer and exploitation tool ssrf
Fuzzer crlfuzz A fast tool to scan CRLF vulnerability written in Go crlf
Fuzzer SSTImap Automatic SSTI detection tool with interactive interface ssti
Fuzzer feroxbuster A fast, simple, recursive content discovery tool written in Rust.
Fuzzer GraphQLmap GraphQLmap is a scripting engine to interact with a graphql endpoint for pentesting purposes. graphql
Fuzzer SSRFire An automated SSRF finder. Just give the domain name and your server and chill ssrf
Fuzzer ffuf Fast web fuzzer written in Go
Scanner LFISuite Totally Automatic LFI Exploiter (+ Reverse Shell) and Scanner
Scanner depenfusion A powerful pentesting tool for detecting and exploiting dependency confusion vulnerabilities in Node.js projects dependency-confusion
Scanner nosqli NoSql Injection CLI tool nosqli
Scanner DirDar DirDar is a tool that searches for (403-Forbidden) directories to break it and get dir listing on it 403
Scanner gitGraber gitGraber
Scanner PPScan Client Side Prototype Pollution Scanner prototypepollution prototype-pollution
Scanner a2sv Auto Scanning to SSL Vulnerability ssl
Scanner findom-xss A fast DOM based XSS vulnerability scanner with simplicity. xss
Scanner httprobe Take a list of domains and probe for working HTTP and HTTPS servers
Scanner LOXS best tool for finding SQLi,CRLF,XSS,LFi,OpenRedirect xss sqli crlf lfi open-redirect
Scanner ppmap A scanner/exploitation tool written in GO, which leverages client-side Prototype Pollution to XSS by exploiting known gadgets. prototypepollution prototype-pollution
Scanner wprecon Hello! Welcome. Wprecon (Wordpress Recon), is a vulnerability recognition tool in CMS Wordpress, 100% developed in Go.
Scanner dependency-confusion-scanner This small repo is meant to scan Github's repositories for potential Dependency confusion vulnerabilities. dependency-confusion
Scanner Deadsniper A fast, specialized dead-link checker broken-link
Scanner DeepViolet Tool for introspection of SSL\TLS sessions ssl
Scanner Oralyzer Open Redirection Analyzer
Scanner zap-cli A simple tool for interacting with OWASP ZAP from the commandline.
Scanner hinject Host Header Injection Checker header
Scanner dalfox 🌘🦊 Dalfox is a powerful open-source XSS scanner and utility focused on automation. xss
Scanner XSpear Powerfull XSS Scanning and Parameter analysis tool&gem xss
Scanner wapiti Web application vulnerability scanner. Wapiti allows you to audit the security of your websites or web applications. vulnerability-scanner web-scanner
Scanner semgrep Lightweight static analysis for many languages. Find bug variants with patterns that look like source code. sast code-analysis
Scanner http2smugl This tool helps to detect and exploit HTTP request smuggling in cases it can be achieved via HTTP/2 -> HTTP/1.1 conversion by the frontend server.
Scanner ssrf-sheriff A simple SSRF-testing sheriff written in Go ssrf
Scanner xsinator.com XS-Leak Browser Test Suite
Scanner VHostScan A virtual host scanner that performs reverse lookups, can be used with pivot tools, detect catch-all scenarios, work around wildcards, aliases and dynamic default pages.
Scanner pphack The Most Advanced Client-Side Prototype Pollution Scanner prototypepollution prototype-pollution
Scanner autopoisoner Web cache poisoning vulnerability scanner. cache-vuln
Scanner websocket-connection-smuggler websocket-connection-smuggler smuggle
Scanner testssl.sh Testing TLS/SSL encryption anywhere on any port ssl
Scanner scan4all Official repository vuls Scan
Scanner xsscrapy XSS/SQLi spider. Give it a URL and it'll test every link it finds for XSS and some SQLi. xss
Scanner ws-smuggler WebSocket Connection Smuggler smuggle
Scanner gitleaks Scan git repos (or files) for secrets using regex and entropy 🔑
Scanner PwnXSS Vulnerability (XSS) scanner exploit xss
Scanner sqlmap Automatic SQL injection and database takeover tool sqli
Scanner Web-Cache-Vulnerability-Scanner Web Cache Vulnerability Scanner is a Go-based CLI tool for testing for web cache poisoning. It is developed by Hackmanit GmbH (http://hackmanit.de/). cache-vuln
Scanner S3Scanner Scan for open AWS S3 buckets and dump the contents s3
Scanner FockCache Minimalized Test Cache Poisoning cache-vuln
Scanner XSStrike Most advanced XSS scanner. xss
Scanner xsser Cross Site "Scripter" (aka XSSer) is an automatic -framework- to detect, exploit and report XSS vulnerabilities in web-based applications. xss
Scanner XssPy Web Application XSS Scanner xss
Scanner ditto A tool for IDN homograph attacks and detection.
Scanner CMSmap CMSmap is a python open source CMS scanner that automates the process of detecting security flaws of the most popular CMSs. web-scanner vulnerability-scanner
Scanner osv-scanner Vulnerability scanner which uses the OSV database to find vulnerabilities in open source projects vulnerability-scanner dependency-scanning
Scanner DOMPurify DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo: xss
Scanner nikto Nikto web server scanner
Scanner sqliv massive SQL injection vulnerability scanner sqli
Scanner smuggler Smuggler - An HTTP Request Smuggling / Desync testing tool written in Python 3 smuggle
Scanner deadlinks Health checks for your documentation links. broken-link
Scanner SQLiDetector Simple python script supported with BurpBouty profile that helps you to detect SQL injection "Error based" by sending multiple requests with 14 payloads and checking for 152 regex patterns for different databases. sqli
Scanner dontgo403 Tool to bypass 40X response codes. 403
Scanner AWSBucketDump Security Tool to Look For Interesting Files in S3 Buckets s3
Scanner Corsy CORS Misconfiguration Scanner cors
Scanner Striker Striker is an offensive information and vulnerability scanner.
Scanner http-request-smuggling HTTP Request Smuggling Detection Tool
Scanner jsprime a javascript static security analysis tool js-analysis
Scanner rapidscan The Multi-Tool Web Vulnerability Scanner.
Scanner h2csmuggler HTTP Request Smuggling Detection Tool smuggle
Scanner corsair_scan Corsair_scan is a security tool to test Cross-Origin Resource Sharing (CORS). cors
Scanner smugglex Rust-powered HTTP Request Smuggling Scanner smuggle
Scanner DSSS Damn Small SQLi Scanner sqli
Scanner web_cache_poison web cache poison - Top 1 web hacking technique of 2019 cache-vuln
Scanner tplmap Server-Side Template Injection and Code Injection Detection and Exploitation Tool
Scanner trivy Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more vulnerability-scanner container-security sbom
Scanner commix Automated All-in-One OS Command Injection Exploitation Tool. exploit
Scanner S3cret Scanner Hunting For Secrets Uploaded To Public S3 Buckets s3
Scanner headi Customisable and automated HTTP header injection header
Scanner OpenRedireX A Fuzzer for OpenRedirect issues
Scanner domdig DOM XSS scanner for Single Page Applications xss
Scanner CorsMe Cross Origin Resource Sharing MisConfiguration Scanner cors
Scanner ConfusedDotnet Tool to check for dependency confusion vulnerabilities in NuGet package management systems dependency-confusion
Scanner NoSQLMap Automated NoSQL database enumeration and web application exploitation tool. nosqli
Scanner plution Prototype pollution scanner using headless chrome prototypepollution prototype-pollution
Scanner HRS HTTP Request Smuggling demonstration Perl script, for variants 1, 2 and 5 in my BlackHat US 2020 paper HTTP Request Smuggling in 2020.
Scanner cloud-audit Fast, opinionated AWS security scanner with Terraform remediation and attack chain detection aws cloud security terraform
Scanner xsssniper An automatic XSS discovery tool xss
Scanner Chromium-based-XSS-Taint-Tracking Cyclops is a web browser with XSS detection feature, it is chromium-based xss detection that used to find the flows from a source to a sink. xss
Scanner confused Tool to check for dependency confusion vulnerabilities in multiple package management systems dependency-confusion
Scanner nuclei Nuclei is a fast tool for configurable targeted scanning based on templates offering massive extensibility and ease of use.
Scanner Taipan Web application vulnerability scanner
Scanner github-search Tools to perform basic search on GitHub.
Scanner NoXss Faster xss scanner,support reflected-xss and dom-xss xss
Scanner arachni Web Application Security Scanner Framework
Scanner trufflehog Find and verify credentials in git repositories, filesystems, and S3 buckets secret-scanning credentials
Scanner nmap Nmap - the Network Mapper. Github mirror of official SVN repository. portscan
Scanner V3n0M-Scanner Popular Pentesting scanner in Python3.6 for SQLi/XSS/LFI/RFI and other Vulns sqli xss lfi rfi
Scanner DeadFinder Find dead-links (broken links) broken-link
Scanner wpscan WPScan is a free, for non-commercial use, black box WordPress Vulnerability Scanner written for security professionals and blog maintainers to test the security of their WordPress websites.
Exploit beef The Browser Exploitation Framework Project xss
Exploit Gopherus This tool generates gopher link for exploiting SSRF and gaining RCE in various servers ssrf
Exploit SQLNinja Sqlninja is a tool targeted to exploit SQL Injection vulnerabilities. sqli
Exploit jwt_tool A toolkit for testing, tweaking and cracking JSON Web Tokens jwt authentication
Exploit toxssin An XSS exploitation command-line interface and payload generator. xss
Exploit Sn1per Automated pentest framework for offensive security experts
Exploit ghauri An advanced cross-platform tool that automates the process of detecting and exploiting SQL injection security flaws sqli
Exploit XXEinjector Tool for automatic exploitation of XXE vulnerability using direct and different out of band methods. xxe
Exploit Liffy Local file inclusion exploitation tool lfi
Exploit singularity A DNS rebinding attack framework.
Exploit XXExploiter Tool to help exploit XXE vulnerabilities xxe
Exploit XSRFProbe The Prime Cross Site Request Forgery (CSRF) Audit and Exploitation Toolkit.
Exploit ropr A blazing fast™ multithreaded ROP Gadget finder. ropper rop
Exploit BaRMIe Java RMI enumeration and attack tool. RMI
Exploit xxeserv A mini webserver with FTP support for XXE payloads
Exploit of-CORS Identifying and exploiting CORS misconfigurations on the internal networks cors
Utils dnsobserver A handy DNS service written in Go to aid in the detection of several types of blind vulnerabilities. It monitors a pentester's server for out-of-band DNS interactions and sends lookup notifications via Slack. oast dns
Utils template-generator A simple variable based template editor using handlebarjs+strapdownjs. The idea is to use variables in markdown based files to easily replace the variables with content. Data is saved temporarily in local storage. PHP is only needed to generate the list of files in the dropdown of templates.
Utils race-the-web Tests for race conditions in web applications by sending out a user-specified number of requests to a target URL (or URLs) simultaneously, and then compares the responses from the server for uniqueness. race-condition
Utils gf A wrapper around grep, to help you grep for things
Utils SequenceDiagram Online tool for creating UML sequence diagrams online
Utils 230-OOB An Out-of-Band XXE server for retrieving file contents over FTP. xxe
Utils GadgetProbe Probe endpoints consuming Java serialized objects to identify classes, libraries, and library versions on remote Java classpaths. deserialize
Utils pentest-tools Custom pentesting tools
Utils difftastic a structural diff that understands syntax diff
Utils unfurl Pull out bits of URLs provided on stdin url
Utils ysoserial.net Deserialization payload generator for a variety of .NET formatters deserialize
Utils docem Uility to embed XXE and XSS payloads in docx,odt,pptx,etc (OXML_XEE on steroids) xxe xss
Utils Bug-Bounty-Toolz BBT - Bug Bounty Tools
Utils pdtm ProjectDiscovery's Open Source Tool Manager package-manager tools-management
Utils gxss Blind XSS service alerting over slack or email xss blind-xss
Utils reverse-shell-generator Hosted Reverse Shell generator with a ton of functionality. -- (Great for CTFs) payload
Utils hakcheckurl Takes a list of URLs and returns their HTTP response codes
Utils urlprobe Urls status code & content length checker url
Utils quickjack Quickjack is a point-and-click tool for intuitively producing advanced clickjacking and frame slicing attacks.
Utils grc generic colouriser
Utils security-crawl-maze Security Crawl Maze is a comprehensive testbed for web security crawlers. It contains pages representing many ways in which one can link resources from a valid HTML document. crawl
Utils fff The Fairly Fast Fetcher. Requests a bunch of URLs provided on stdin fairly quickly. url
Utils gron Make JSON greppable! json
Utils tiscripts Turbo Intruder Scripts
Utils wssip Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa.
Utils gotator Gotator is a tool to generate DNS wordlists through permutations.
Utils xless The Serverless Blind XSS App xss blind-xss
Utils Blacklist3r project-blacklist3r
Utils curl A command line tool and library for transferring data with URL syntax, supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, MQTT, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features
Utils pet Simple command-line snippet manager, written in Go.
Utils interactsh An OOB interaction gathering server and client library oast
Utils gitls Listing git repository from URL/User/Org
Utils CSP Evaluator Online CSP Evaluator from google csp
Utils nuclei-templates Community curated list of templates for the nuclei engine to find security vulnerabilities. nuclei-templates
Utils cent Community edition nuclei templates, a simple tool that allows you to organize all the Nuclei templates offered by the community in one place. nuclei-templates
Utils Emissary Send notifications on different channels such as Slack, Telegram, Discord etc. notify
Utils weaponised-XSS-payloads XSS payloads designed to turn alert(1) into P1 xss documents
Utils github-regexp Basically a regexp over a GitHub search.
Utils autochrome This tool downloads, installs, and configures a shiny new copy of Chromium.
Utils jsfuck Write any JavaScript with 6 Characters xss
Utils CyberChef The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis
Utils PoC-in-GitHub 📡 PoC auto collect from GitHub. Be careful malware.
Utils XSS-Catcher Find blind XSS but why not gather data while you're at it. xss blind-xss
Utils Phoenix hahwul's online tools online
Utils hoppscotch Open source API development ecosystem http
Utils xssor2 XSS'OR - Hack with JavaScript. xss
Utils xss-cheatsheet-data This repository contains all the XSS cheatsheet data to allow contributions from the community. xss
Utils godeclutter Declutters URLs in a fast and flexible way, for improving input for web hacking automations such as crawlers and vulnerability scans. url
Utils hurl Hurl, run and test HTTP requests.
Utils Atlas Quick SQLMap Tamper Suggester sqli
Utils pwncat pwncat - netcat on steroids with Firewall, IDS/IPS evasion, bind and reverse shell, self-injecting shell and port forwarding magic - and its fully scriptable with Python (PSE)
Utils ysoserial A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization. deserialize
Utils Clipboard An external brain that remembers anything, anytime, anywhere. clipboard
Utils Gf-Patterns GF Paterns For (ssrf,RCE,Lfi,sqli,ssti,idor,url redirection,debug_logic) parameters grep
Utils can-i-take-over-xyz "Can I take over XYZ?" — a list of services and how to claim (sub)domains with dangling DNS records.
Utils Findsploit Find exploits in local and online databases instantly exploit
Utils fzf A command-line fuzzy finder
Utils GQLSpection parses GraphQL introspection schema and generates possible queries graphql
Utils bountyplz Automated security reporting from markdown templates (HackerOne and Bugcrowd are currently the platforms supported) report
Utils gotestwaf An open-source project in Golang to test different web application firewalls (WAF) for detection logic and bypasses
Utils Assetnote Wordlists Automated & Manual Wordlists provided by Assetnote wordlist documents
Utils wuzz Interactive cli tool for HTTP inspection http
Utils oxml_xxe A tool for embedding XXE/XML exploits into different filetypes
Utils gee 🏵 Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go
Utils anew A tool for adding new lines to files, skipping duplicates
Utils Redcloud Automated Red Team Infrastructure deployement using Docker infra
Utils qsreplace Accept URLs on stdin, replace all query string values with a user-supplied value
Utils PayloadsAllTheThings A list of useful payloads and bypass for Web Application Security and Pentest/CTF
Utils grex A command-line tool and library for generating regular expressions from user-provided test cases
Utils httptoolkit HTTP Toolkit is a beautiful & open-source tool for debugging, testing and building with HTTP(S) on Windows, Linux & Mac
Utils SecLists SecLists is the security tester's companion. It's a collection of multiple types of lists used during security assessments, collected in one place. wordlist documents
Utils dsieve Filter and enrich a list of subdomains by level subdomains
Utils IntruderPayloads
Utils burl A Broken-URL Checker url
Utils eoyc Encoding Only Your Choices encode
Utils boast The BOAST Outpost for AppSec Testing (v0.1.0) oast
Utils bruteforce-lists Some files for bruteforcing certain things. wordlist documents
Utils hacks A collection of hacks and one-off scripts
Utils blistener Blind-XSS listener with payloads xss blind-xss
Utils hbxss Security test tool for Blind XSS xss blind-xss
Utils ezXSS ezXSS is an easy way for penetration testers and bug bounty hunters to test (blind) Cross Site Scripting. xss blind-xss
Utils security-research-pocs Proof-of-concept codes created as part of security research done by Google Security Team.
Utils bat A cat(1) clone with wings.
Utils mapcidr Utility program to perform multiple operations for a given subnet/CIDR ranges cidr network ip-manipulation
Utils nuclei-wordfence-cve Every single day new templates are added to this repo based on updates on Wordfence.com nuclei-templates
Utils SerializationDumper A tool to dump Java serialization streams in a more human readable form. deserialize
Utils httpie modern, user-friendly command-line HTTP client for the API era http
Utils urlgrab A golang utility to spider through a website searching for additional links. url
Utils zip-bomb Create a ZIPBomb for a given uncompressed size (flat and nested modes). zipbomb
Utils ZipBomb A simple implementation of ZipBomb in Python zipbomb
Utils mubeng An incredibly fast proxy checker & IP rotator with ease.
Utils slackcat CLI utility to post files and command output to slack notify
Utils graphql-voyager 🛰️ Represent any GraphQL API as an interactive graph graphql
Utils missing-cve-nuclei-templates Weekly updated list of missing CVEs in nuclei templates official repository nuclei-templates
Utils h2spacex HTTP/2 Single Packet Attack low level library based on Scapy race-condition
Utils REcollapse REcollapse is a helper tool for black-box regex fuzzing to bypass validations and discover normalizations in web applications fuzz
Utils TukTuk Tool for catching and logging different types of requests. oast
Utils cf-check Cloudflare Checker written in Go
Utils s3reverse The format of various s3 buckets is convert in one format. for bugbounty and security testing. s3
Utils ob_hacky_slack Hacky Slack - a bash script that sends beautiful messages to Slack notify
Env Glue Application Security Automation
Env Crimson Web Application Security Testing automation.
Env pentest-env Pentest environment deployer (kali linux + targets) using vagrant and chef. pentest

Bookmarklets

Type Name Description Star Tags Badges

Browser Addons

Type Name Description Star Tags Badges
Proxy rep Chrome DevTools extension for capturing, modifying, and replaying HTTP requests with AI-powered security analysis http repeater
Recon Wayback Machine History of website
Recon DotGit An extension for checking if .git is exposed in visited websites
Utils Dark Reader for Safari Dark mode to any site
Utils Firefox Multi-Account Containers Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs
Utils User-Agent Switcher quick and easy way to switch between user-agents.
Utils DOMLogger++ A browser extension that allows you to monitor, intercept, and debug JavaScript sinks based on customizable configurations. dom xss
Utils ZAP Browser Extension A browser extension which allows ZAP to interact directly with the browser. browser-record
Utils Hack-Tools The all-in-one Red Team extension for Web Pentester 🛠
Utils firefox-container-proxy Assign a proxy to a Firefox container
Utils Edit-This-Cookie EditThisCookie is the famous Google Chrome/Chromium extension for editing cookies cookie
Utils cookie-quick-manager An addon to manage (view, search, create, edit, remove, backup, restore) cookies on Firefox. cookie
Utils jsonwebtoken.github.io JWT En/Decode and Verify jwt
Utils eval_villain A Firefox Web Extension to improve the discovery of DOM XSS. xss
Utils postMessage-tracker A Chrome Extension to track postMessage usage (url, domain and stack) both by logging using CORS and also visually as an extension-icon js-analysis
Utils clear-cache Add-on to clear browser cache with a single click or via the F9 key.
Utils PwnFox Firefox/Burp extension that provide usefull tools for your security audit.
Utils Dark Reader Dark mode to any site darkmode
Utils MM3 ProxySwitch Proxy Switch in Firefox and Chrome

Burpsuite, Caido and ZAP Addons

Type Name Description Star Tags Badges
Recon BurpSuite-Secret_Finder
Recon attack-surface-detector-zap The Attack Surface Detector uses static code analyses to identify web app endpoints by parsing routes and identifying parameters endpoint url attack-surface
Recon BurpJSLinkFinder js-analysis
Recon reflected-parameters param
Recon burp-retire-js js-analysis
Recon Dr. Watson Dr. Watson is a simple Burp Suite extension that helps find assets, keys, subdomains, IP addresses, and other useful information param subdomains
Recon attack-surface-detector-burp The Attack Surface Detector uses static code analyses to identify web app endpoints by parsing routes and identifying parameters endpoint url attack-surface
Recon HUNT Identifies common parameters vulnerable to certain vulnerability classes param
Fuzzer GAP This is an evolution of the original getAllParams extension for Burp. Not only does it find more potential parameters for you to investigate, but it also finds potential links to try these parameters on. param
Fuzzer param-miner Param Miner param cache-vuln
Scanner AuthMatrix aaa
Scanner collaborator-everywhere oast
Scanner http-request-smuggler smuggle
Scanner Autorize aaa
Scanner csp-auditor csp
Scanner BurpSuiteHTTPSmuggler smuggle
Utils AuthMatrix Automated HTTP Request Repeating With Burp Suite
Utils BurpBounty
utils Neonmarker
Utils femida
Utils Web3 Decoder Burp Extension for Web3 web3
Utils burp-piper
Utils gRPC-Web Pentest Suite gRPC-Pentest-Suite is set of tools for pentesting / hacking gRPC Web (gRPC-Web) applications. gRPC-Web
Utils argumentinjectionhammer A Burp Extension designed to identify argument injection vulnerabilities.
Utils BurpSuiteLoggerPlusPlus
Utils BurpCustomizer Because just a dark theme wasn't enough!
Utils notebook Notebook Caido Plugin note
Utils safecopy
Utils Decoder-Improved Improved decoder for Burp Suite
Utils AWSSigner Burp Extension for AWS Signing
Utils zap-hud
Utils Stepper
utils owasp-zap-jwt-addon jwt
Utils taborator oast
Utils turbo-intruder
Utils burp-exporter
Utils HTTPSignatures A Burp Suite extension implementing the Signing HTTP Messages draft-ietf-httpbis-message-signatures-01 draft.
Utils burp-send-to
Utils CaidoReflector Automatically look for paramater reflections in the HTTP response xss
Utils community-scripts
Utils inql
Utils EvenBetter EvenBetter is a frontend Caido plugin that makes the Caido experience even better encode ssrf darkmode
Utils reflect
Utils EvenBetterExtensions EvenBetterExtensions allows you to quicky install and keep updated Caido extensions. encode ssrf darkmode
Utils Map Local ZAP add-on which allows mapping of responses to content of a chosen local file.
Utils http-script-generator
Utils Berserko Burp Suite extension to perform Kerberos authentication
Utils caidope caidope - caido plugin
Utils blackboxprotobuf Blackbox protobuf is a Burp Suite extension for decoding and modifying arbitrary protobuf messages without the protobuf type definition.
Utils knife A burp extension that add some useful function to Context Menu 添加一些右键菜单让burp用起来更顺畅
Utils pcap-burp Pcap importer for Burp

Thanks to (Contributor)

WHW's open-source project and made it with ❤️ if you want contribute this project, please see CONTRIBUTING.md and Pull-Request with cool your contents.

2. Official Technical Reference & Guides (hahwul/docs)

File: README.md

Introduction

Amber is a web development framework written in the Crystal programming language. The framework implements the server-side MVC pattern using the object-oriented paradigm. Many of Amber's components and concepts will be familiar for developers with experience with other web frameworks like Phoenix, Ruby on Rails or Python's Django.

Amber aims to deliver developer happiness, productivity, and bare metal performance. The Crystal language is heavily inspired by Ruby, delivering familiarity, productivity, and a low learning curve for experienced Ruby developers. Meanwhile, Crystal also has some modern features like macros, first class concurrency, union types, C bindings, and a built in dependency manager. Amber takes advantage of all these features providing you an opinionated structure to develop a web application.

Amber offers a variety of familiar tools such as generators, database management, CLI, deployment tools, docker support, encrypted secrets, websockets, and more for fast prototyping and developing enterprise-grade web applications. If you come from a Ruby on Rails background you will feel right at home, but, be aware Amber is not Rails! Amber is type-safe, compiled, and embraces the best features from many different frameworks for example pipes for routing which is more similar to the Phoenix framework.

The aim of this introductory guide is to present a high-level overview of Amber Framework and the layers underneath that support it.

Getting Help

If you’re stuck, there are a number of places you can get help.

  • Gitter for quick questions.
  • Stack Overflow for questions about the Crystal Language and Amber Framework.
  • Github for getting acquainted with source code, current issues and progress.
  • Online Guides for getting down and dirty working with Amber.
  • Twitter to see latest news and announcements about Amber Framework.

Contributing

Contributing to Amber can be a rewarding way to learn, teach, and build experience in just about any skill you can imagine. You don’t have to become a lifelong contributor to enjoy participating in Amber.

Amber is a community effort and we want You to be part of ours Join Amber Community!

First Steps

Learning a new framework can be intimidating and exciting at the same time. To help you along, we have created a cookbook packed with examples and recipes to get the common tasks completed.

If you are new, you should start off with the guides.

If you want a step by step tutorial try the quick start.

Happy developing!


File: cli/README.md

CLI

Amber has a built in CLI tool, to make your life easier while developing applications.

Here is a list of the available commands:

  • db, database - Performs database maintenance tasks
  • e, encrypt - Encrypts environment YAML file. [env | -e --editor | --noedit]
  • x, exec - Executes Crystal code within the application scope
  • g, generate - Generate Amber classes
  • n, new - Generates a new Amber project
  • routes - Prints all defined application routes
  • w, watch - Starts amber development server and rebuilds on file changes

Read a long this guide to learn more about these command and how much time and efficient it can make your development experience.

Getting Command Help

You can get help from each command by running -h or --help next to the command

Eg.

text
$ amber --help

This will output to your shell the following documentation.

text
amber [OPTIONS] SUBCOMMAND

Amber - Command Line Interface

  The `amber new` command creates a new Amber application with a default
  directory structure and configuration at the path you specify.

  You can specify extra command-line arguments to be used every time
  `amber new` runs in the .amber.yml configuration file in your project
  root directory

  Note that the arguments specified in the .amber.yml file does not affect the
  defaults values shown above in this help message.

  Usage:
  amber new [app_name] -d [pg | mysql | sqlite] -t [slang | ecr] -m [granite, crecto] --deps

Subcommands:
  db, database  # Performs database maintenance tasks
  e, encrypt    # Encrypts environment YAML file. [env | -e --editor | --noedit]
  x, exec       # Executes Crystal code within the application scope
  g, generate   # Generate Amber classes
  n, new        # Generates a new Amber project
  routes        # Prints all defined application routes
  w, watch      # Starts amber development server and rebuilds on file changes

Options:
  -d, --database  # Preconfigure for selected database. Options: pg | mysql | sqlite (default: pg)
  -m, --model     # Preconfigure for selected model. Options: granite (default: granite)
  -t, --template  # Preconfigure for selected template engine. Options: slang | ecr (default: slang)
  -h, --help      # Describe available commands and usages
  -v, --version   # Prints Amber version

Example:
  amber new ~/Code/Projects/weblog
  This generates a skeletal Amber installation in ~/Code/Projects/weblog.

Usage

bash
amber new [your_app] -d [pg | mysql | sqlite] -t [slang | ecr] --deps
cd [your_app]

Options

  • -d defaults to pg
  • -t defaults to slang
  • --deps will run crystal deps for you.

File: cookbook/README.md

Cookbook

This Amber Cookbook is inspired by original Kemal Cookbook by @sdogruyol

{% page-ref page="from-scratch.md" %}

{% page-ref page="hello-world.md" %}

{% page-ref page="cors.md" %}

{% page-ref page="file-download.md" %}

{% page-ref page="file-upload.md" %}

{% page-ref page="authenticate.md" %}

{% page-ref page="json-api.md" %}

{% page-ref page="json-mapping.md" %}

{% page-ref page="websocket-chat.md" %}


File: deployment/README.md



Deployment

{% hint style="info" %}
This section contain guides for deploying amber projects to Digital Ocean and Heroku
{% endhint %}

{% hint style="warning" %}
Guides for other platforms like Amazon Web Services (AWS), Google Compute Engine (GCE) and Azure are work in progress...
{% endhint %}

{% page-ref page="manual-deploy.md" %}

{% page-ref page="digital-ocean.md" %}

{% page-ref page="heroku.md" %}

{% page-ref page="dokku.md" %}


File: examples/README.md

Examples

{% page-ref page="amber-auth.md" %}

{% page-ref page="crystal-debug.md" %}

{% page-ref page="json-api-full-crud.md" %}

{% page-ref page="minimal-configuration.md" %}


File: getting-started/README.md

Getting Started

Quick Start

This quick start guide will help you get a full stack web application running in just a few minutes by leveraging amber’s code generators.

It will take us just 7 steps. Let’s get started!

1. Install dependencies

{% hint style="info" %}
If you already have crystal, amber, and a database installed, you can skip this step.
{% endhint %}

1.1 Install `crystal` and `amber`

Instructions for OS X using Homebrew or MacPorts and Debian/Ubuntu are below. See full installation instructions here for RedHat & CentOS, ArchLinux & Derivatives, and more complete instructions.

macOS

Installing Amber with these package managers also installs Crystal.

  • Homebrew

    text
    brew tap amberframework/amber
    brew install amber
  • MacPorts

    text
    sudo port selfupdate
    sudo port install amber

Ubuntu or Debian

First install crystal (from the official install documentation):

text
curl -fsSL https://crystal-lang.org/install.sh | sudo bash

Then install Amber (from source)

text
sudo apt-get install libreadline-dev libsqlite3-dev libpq-dev libmysqlclient-dev libssl-dev libyaml-dev libpcre3-dev libevent-dev
curl -L https://github.com/amberframework/amber/archive/stable.tar.gz | tar xz
cd amber-stable/
shards install
make install

You can also install Amber with Linuxbrew

bash
brew tap amberframework/amber
brew install amber

{% hint style="info" %}
Above are the steps for building from source, the dependencies are specific to Ubuntu/Debian. See full installation instructions for other Linux Distributions.
{% endhint %}

1.2 Install a database

Amber works with postgresql (default), mysql, or sqlite.

If you don’t already have one of these installed, please follow the guides provided by each database maintainer:

{% hint style="info" %}
On OS X any of the databases can be installed with brew install [database]
{% endhint %}

{% hint style="info" %}
Docker users can opt to use a database container to develop with as well. By default, a new Amber application generates a docker-compose.yml that can be used for this purpose.
{% endhint %}

2. Generate a new Amber application

With all dependencies successfully installed, we can generate a new application with amber new

After the code for the new application is generated, we will cd into the new directory and execute a shards install.

The shards install command may take a little while - it has to download all shard dependencies.

{% hint style="info" %}
The default setup will use a postgresql database, use -d mysql or -d sqlite for mysql and sqlite, respectively.
{% endhint %}

text
amber new pet-tracker
cd pet-tracker

3. Generate a resource

With the skeleton application generated, we can generate our first RESTful resource.

The amber generate scaffold command will help us do this.

{% hint style="info" %}
g is shorthand for generate
{% endhint %}

text
amber g scaffold Pet name:string breed:string age:integer

4. Create and migrate the database

Generating the application and the scaffolded resource provides the configuration and migration files needed to set up the database.

amber db will help us do this, as you will see you can chain the db commands together.

text
amber db create migrate

This will create a new database and run the migration to create a pets table with the specified columns.

5. Build the application and run the server

We can use amber watch to both build the binary application and start the server. Additionally, amber watch will detect code changes then recompile and restart the application automatically.

text
amber watch

The watch commands will keep observing for file changes within the project and recompiling the application.

6. Use your brand new web application!

Open any browser and goto http://localhost:3000 You should see a home page load and “Pets” in the nav bar. If you click on the “Pets” link, you should be able to perform all seven RESTful actions for the “pets” resource.

7. Deploy your web application

{% page-ref page="../deployment/" %}

List of Commands

You can use these commands to create new awesome applications :-)

text
amber new pet-tracker
cd pet-tracker
shards install
amber generate scaffold Pet name:string breed:string age:integer
amber db create migrate
amber watch

Demo

Here is the Quick Start demo app and the source code is available on Github.

{% page-ref page="../guides/" %}


File: guides/controllers/cookies.md

Cookies

Cookies are read and written through Amber::Base::Controller#cookies.

The cookies being read are the ones received along with the request, the cookies being written will be sent out with the response. Reading a cookie does not get the cookie object itself back, just the value it holds.

It's advisable that you only store simple data (strings and numbers) in cookies. If you have to store complex objects, you would need to handle the conversion manually when reading the values on subsequent requests.

Amber also has an encrypted cookie jar for storing sensitive data. The encrypted cookie jar encrypts the values in addition to signing them, so that they cannot be read by the end user.

Examples of writing

ruby
class CommentsController < ApplicationController
  def new
    # Auto-fill the commenter's name if it has been stored in a cookie
    @comment = Comment.new(author: cookies[:commenter_name])
  end

  def create
    @comment = Comment.new(params[:comment])
    if @comment.save
      flash[:notice] = "Thanks for your comment!"
      if params[:remember_name]
        # Remember the commenter's name.
        cookies[:commenter_name] = @comment.author
      else
        # Delete cookie for the commenter's name cookie, if any.
        cookies.delete(:commenter_name)
      end
      redirect_to @comment.article
    else
      render action: "new"
    end
  end
end

Examples of reading

ruby
cookies[:user_name]           # => "david"
cookies.size                  # => 2
JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37]
cookies.encrypted[:discount]  # => 45

Please note that if you specify a :domain when setting a cookie, you must also specify the domain when deleting the cookie:

ruby
cookies.set "name", "a yummy cookie", expires: 1.year.from_now, domain:  "domain.com"
cookies.delete "name", domain: "domain.com"

The optional parameters for setting cookies are:

ruby
path   # The path for which this cookie applies. Defaults to the root of the application.
domain # The domain for which this cookie applies so you can restrict to the domain level. 
        # If you use a schema like www.example.com and want to share session with user.example.com 
        # set :domain to :all. Make sure to specify the :domain option with :all or Array again 
        #  when deleting cookies.

domain: nil                           # Does not set cookie domain. (default)
domain: :all                          # Allow the cookie for the top most level domain and subdomains.
domain: %w(.example.com .example.org) # Allow the cookie for concrete domain names.

tld_length # When using :domain => :all, this option can be used to explicitly set the TLD length 
            # when using a short (<= 3 character) domain that is being interpreted as part of a TLD. 
            # For example, to share cookies between user1.lvh.me and user2.lvh.me, set :tld_length to 1.

expires    # The time at which this cookie expires, as a Time object.
secure     # Whether this cookie is only transmitted to HTTPS servers. Default is false.
httponly   # Whether this cookie is accessible via scripting or only HTTP. Defaults to false.

File: guides/controllers/csrf.md

CSRF

To use CSRF, enable the pipe in your routes.cr by adding the following pipe to a pipeline.

text
plug Amber::Pipe::CSRF.new

Then, insert the csrf_tag helper in your forms.

How to use CSRF with AJAX

Simply call the csrf_tag helper inside your controller and return it as part of a JSON object:

ruby
def my_action
    {csrf: csrf_tag}.to_json
end

In your Javascript, after getting the JSON object back, refresh your CSRF tag with the one from the server.

javascript
$("input[name*=_csrf]").replaceWith(e['csrf']);

File: guides/controllers/filters.md

Filters

Filters are methods that are run "before", "after" or "around" a controller action.

Filters are inherited, so if you set a filter onApplicationController, it will be run on every controller in your application.

Before filter

"before" filters may halt the request cycle. A common "before" filter is one which requires that a user is logged in for an action to be run. You can define the filter method this way:

ruby
# Filters are methods that are run "before", "after" a controller action.
before_action do
  # runs for specified actions
  only [:index, :world, :show] { increment(1) }
  # runs for all actions
  all { increment(1) }
end

After filter

"after" filters are executed after the request cycle. A common "after" filter is one which requires to cleanup user data after an action has been run. You can define the filter method this way:

ruby
after_action do
  # runs for specified actions
  only [:index, :world] { increment(1) }
end