web

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

This file allows you to download source code of a website through Symfony Profiler (if enabled, rare case but happens). It also requires open dir

Index

Constants

View Source
const (
	PB_IIS        = "iis"
	PB_APACHE     = "apache"
	PB_NGINX      = "nginx"
	PB_PHP        = "php"
	PB_PHP_OLD    = "php_old" // PHP 5.x and older, a category on its own because of the large number of vulnerabilities
	PB_CLOUDFLARE = "cloudflare"
	PB_CLOUDFRONT = "cloudfront"
	PB_UNKNOWN    = "unknown"
)

PB - Powered By

View Source
const (
	ST_WORDPRESS = "wordpress"
	ST_JOOMLA    = "joomla"
	ST_DRUPAL    = "drupal"
	ST_OPENDIR   = "open" // Directory listing
	ST_DBA       = "dba"  // Database Administration System (phpMyAdmin, phpPgAdmin, etc.)
	ST_JENKINS   = "jenkins"
	ST_ASPNET    = "aspnet" // ASP.NET errors/web services, can possibly be IIS shortname scanned
	ST_REACT     = "react"  // React App (create-react-app), could have map files
	ST_GITLAB    = "gitlab"
	ST_FORGEJO   = "forgejo"
	ST_JIRA      = "jira"
	ST_SNRS      = "snrs"   // Synerise API
	ST_MSLOGIN   = "msl"    // Microsoft Login page
	ST_GMLOGIN   = "gml"    // Google Mail Login page
	ST_CFACCESS  = "cfa"    // Cloudflare Access login page
	ST_NGINX     = "nginx"  // Nginx default page
	ST_APACHE    = "apache" // Apache default page
	ST_IIS       = "iis"    // IIS default page

)

ST - Service Type

Variables

This section is empty.

Functions

func DownloadSymfonyProfilerSRC

func DownloadSymfonyProfilerSRC(openDirUrl string, profilerUrl string) (*io.Directory, error)

both openDirUrl and profilerUrl are absolute URLs, not relative paths. openDirUrl is the root of the website which has to be opendir, profilerUrl is the URL of the profiler Example usage: DownloadSymfonyProfilerSRC("http://localhost:8000", "http://localhost:8000/_profiler")

func GetEmailsFromHTML

func GetEmailsFromHTML(html string) []string

Try grabbing all emails from the HTML

func GrabReactLinksFromHTML

func GrabReactLinksFromHTML(html string) []string

Grabs internal links from a React HTML file, adding .map to the end has a chance of working returns a list of links (without .map or url, only relative path)

func HTMLDecode

func HTMLDecode(s string) string

func ListOpenDirFilesRecursive

func ListOpenDirFilesRecursive(openDirBaseUrl string, relativePath string) ([]string, error)

func RecognizeContentFromHTML

func RecognizeContentFromHTML(html string) []string

func RecognizePBFromHeaders

func RecognizePBFromHeaders(headers map[string]string) []string

func UnpackReactMaps

func UnpackReactMaps(jsonFiles [][]byte, inSrc bool) (*io.Directory, error)

jsonFiles is multiple .map file contents inSrc is whether the sources should be in src/ or not (true recommended) returns a virtual disk with the files that can be saved as a zip

Types

type CRWebsite

type CRWebsite struct {
	URL             string
	PoweredBy       string
	DetectedContent []string
	Emails          []string
}

Content Recognized Website

type CorsAnywhere

type CorsAnywhere struct {
	// contains filtered or unexported fields
}

func NewCorsAnywhere

func NewCorsAnywhere(url string) *CorsAnywhere

func (*CorsAnywhere) GetOpenPorts

func (c *CorsAnywhere) GetOpenPorts() []*CorsAnywherePort

func (*CorsAnywhere) TestPort

func (c *CorsAnywhere) TestPort(port uint16) *CorsAnywherePort

func (*CorsAnywhere) TestPorts

func (c *CorsAnywhere) TestPorts(ports []uint16, threads uint8) []*CorsAnywherePort

type CorsAnywherePort

type CorsAnywherePort struct {
	Port           uint16
	AsUrl          string
	IsOpen         bool
	IsHttp         bool
	IsCorsAnywhere bool
}

type ReactMap

type ReactMap struct {
	// Version        int      `json:"version"`
	// File           string   `json:"file"`
	// Mappings       string   `json:"mappings"`
	// Names          []string `json:"names"`
	// SourceRoot     string   `json:"sourceRoot"`
	// commented out until i find a use for these
	Sources        []string `json:"sources"`
	SourcesContent []string `json:"sourcesContent"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL