This repository contains examples, tools, and practical exercises inspired by the book Hacking with Go, reimplemented in Ruby and Swift, with a focus on offensive security.
But this is not just a code dump. This is a real learning journey β and youβre invited to follow along.
This project is part of my personal learning path in offensive security. Iβve been inspired by Hacking with Go, and instead of just reading or copying code, Iβm rebuilding everything from scratch in Ruby and Swift.
β Iβm using ChatGPT as a mentor β not to generate the answers, but to guide me through concepts and help me structure the project while I learn each piece for real.
Everything here is:
- Written with understanding
- Explained in simple, beginner-friendly language
- Organized as if it were ready for production
The project is split into three language tracks, following the same structure and topics in each:
hacking_with/
βββ ruby/ # Ruby scripts and modules (with bin/ and lib/)
βββ swift/ # Swift project using Swift Package Manager (SPM)
βββ swiftc/ # Direct Swift scripts compiled with swiftc (no package)
Each chapter is written independently in all three versions, and includes modular code, clear examples, and CLI-ready scripts.
This series is about rebuilding the concepts from Hacking with Go in both Ruby and Swift, with a focus on clean scripting, offensive tooling, and explaining everything with clarity.
- Development Environment β setting up Ruby and Swift for CLI scripting
- Language Fundamentals β variables, types, functions, control structures
- Useful Packages β parsing, automation, colors, output
- Networking β TCP, UDP, proxies, SSH, scanning
- File Parsing β analyzing file formats for recon and analysis
- Fuzzing β writing simple fuzzers to test and break things
Each chapter includes:
- β Idiomatic code in both Ruby and Swift
- β Clean, versioned commits
- β CLI-focused scripts (no frameworks)
- β Real-world analogies that even non-programmers can understand
- Ruby 3.3.5 (via rbenv or rvm)
- Swift 6.1 (via Xcode or official binaries)
- macOS or Linux with Swift support
This project is helping me learn by building. Iβm organizing everything as if I were teaching it to someone else β because thatβs how I best learn myself.
Every file, method, and script is written with this principle:
βIβm not trying to impress. Iβm trying to understand β and share that understanding clearly.β