Skip to content

ThatSealgair/blobphish

Repository files navigation

blobphish

Phishing analysis CLI tool.

Development Setup Guide

Prerequisites

Installing Go

  1. Download Go from the official website:
    • Visit go.dev/dl
    • Choose your operating system:
# Linux (using apt)
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
sudo rm -rf /usr/local/go 
sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz

# Add to your ~/.bashrc or ~/.zshrc:
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$(go env GOPATH)/bin

# Verify installation
go version

Installing Just

  1. Install Just using your package manager:
# Using Homebrew (macOS or Linux)
brew install just

# Using apt (Debian/Ubuntu)
sudo apt update
sudo apt install just

# Using cargo (Any OS with Rust installed)
cargo install just

# Arch Linux
sudo pacman -S just
  1. Verify installation:
just --version

Development Setup

First Time Setup

  1. Clone the repository:
git clone <repository-url>
cd <project-directory>
  1. Install all required development tools:
# This will install all necessary Go tools, debuggers, and analysis tools
just install-dev-tools
  1. Verify your setup:
# List all available commands
just list-commands

# List all available checks
just list-checks

Planned Project Structure

blobphish/
├── cmd/
│   └── blobphish/
│       └── main.go               # Entry point
├── internal/
│   ├── analyze/
│   │   ├── email.go              # Email analysis logic
│   │   ├── ip.go                 # IP analysis logic
│   │   ├── url.go                # URL analysis logic
│   │   └── webpage.go            # Webpage analysis logic
│   ├── recon/
│   │   ├── passive.go            # Passive reconnaissance
│   │   └── active.go             # Active reconnaissance
│   ├── uno/
│   │   └── vulnerabilities.go    # Vulnerability analysis
│   ├── config/
│   │   ├── config.go
│   │   └── validation.go
│   ├── integrations/
│   │   ├── misp.go               # Interface with MISP
│   │   ├── request_tracker.go    # Interface with RT
│   │   ├── open_cti.go           # Interface with OpenCTI
│   │   └── shodan.go
│   ├── shared/
│   │   └── types.go              # Shared types and interfaces
│   ├── output/
│   │   ├── logger.go             # Logging implementation
│   │   ├── formatter.go          # Output formatting
│   │   ├── report.go    	        # Generate report based on findings (markdown only)
│   │   └── writer.go             # File writing utilities
│   └── cli/
│       ├── commands.go           # Command definitions
│       └── flags.go              # Flag definitions
├── configs/
│   └── default.json              # Default configuration
├── go.mod
└── go.sum

Development Workflow

  1. Building:
# Development build with debug symbols
just build-dev

# Build with race detection
just build-race

# Optimized release build
just build-release
  1. Running Tests and Checks:
# Run all checks
just check

# Run specific checks
just check-fmt      # Format code
just check-vet      # Run go vet
just check-staticcheck
just check-errcheck
  1. Debugging:
# Using different debuggers
just debug-pwndbg ./bin/your-binary
just debug-gef ./bin/your-binary
just debug-dlv

# Record and replay execution
just rr-record ./bin/your-binary
just rr-replay
  1. Profiling:
# CPU profiling
just profile-cpu ./bin/your-binary 30s

# Memory profiling
just profile-mem ./bin/your-binary 30s
  1. Code Analysis:
# Analyze struct layouts
just analyze-structs

# Check memory issues
just check-memory

Common Development Tasks

  1. Before committing changes:
# Format code and run all checks
just check

# Run tests
just test
  1. When investigating performance:
# CPU profile
just profile-cpu ./bin/your-binary

# Memory profile
just profile-mem ./bin/your-binary
  1. When debugging issues:
# Start debug session
just debug-dlv

# Record program execution
just rr-record ./bin/your-binary
just rr-replay

Updating Tools

To update all development tools:

just install-dev-tools

Troubleshooting

  1. If you encounter permission issues:

    • Ensure your GOPATH is properly set
    • Check if you have write permissions in the installation directories
  2. If tools aren't found:

    • Verify they're in your PATH
    • Try reinstalling with just install-dev-tools
  3. For debugging tool issues:

    • Verify GDB installation: gdb --version
    • Check if rr is supported on your system: rr check

License

This project is licensed under the MIT License for non-commercial use. You are free to use, modify, and distribute the code for personal or academic purposes.

Commercial Use

If you intend to use this software for commercial purposes (e.g., in a business or for profit), you must obtain a commercial license.

For commercial licensing terms, please refer to the LICENSE-COMMERCIAL file or contact us at hunter.jay.k@gmail.com.

How to Obtain a Commercial License

Please email hunter.jay.k@gmail.com to discuss licensing terms, pricing, and support options for commercial use.

About

Phishing analysis CLI tool.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENCE
Unknown
LICENCE-COMMERCIAL

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published