Exploit database

GH-1ed41190d39137d2562192918f201e7b

wjlin0/cve-2024-23897

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-23897

38 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files1
wjlin0/cve-2024-23897Revision 2acd0f63d325

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

pkg/input/input.go

Go · 992 bytes
package input

import (
	"fmt"
	"github.com/wjlin0/CVE-2024-23897/pkg/utils"
)

type Target struct {
	// Host is the host input on which match was found.
	Host string `json:"host,omitempty"`
	// Port is port of the host input on which match was found (if applicable).
	Port int `json:"port,omitempty"`
	// Scheme is the scheme of the host input on which match was found (if applicable).
	Scheme string `json:"scheme,omitempty"`
	// OriginURL is the Base URL of the host input on which match was found (if applicable).
	OriginURL string `json:"origin-url,omitempty"`
}

func (t *Target) ToString() string {
	return fmt.Sprintf("%s://%s", t.Scheme, t.HostAndPort())
}
func (t *Target) HostAndPort() string {
	if t.Port != 0 {
		return fmt.Sprintf("%s:%d", t.Host, t.Port)
	}

	return t.Host
}

func NewTarget(target string) *Target {
	Scheme, Host, Port := utils.GetSchemeHostAndPort(target)
	return &Target{
		Host:      Host,
		Port:      Port,
		Scheme:    Scheme,
		OriginURL: target,
	}
}