/*
©AngelaMos | 2026
phpmyadmin.go
Fake phpMyAdmin login page for the HTTP honeypot
Serves a realistic phpMyAdmin 5.2 login page that captures database
credential submissions. phpMyAdmin is one of the most commonly
probed web applications by automated scanning tools targeting
exposed database management interfaces.
*/
package httpd
import (
"fmt"
"net/http"
)
const pmaLoginHTML = `
phpMyAdmin
phpMyAdmin5.2.1
`
const pmaErrorHTML = `
phpMyAdmin
Error: Cannot log in to the MySQL server
`
func handlePMA(w http.ResponseWriter, r *http.Request) {
w.Header().Set(
"Content-Type", "text/html; charset=UTF-8",
)
w.Header().Set("X-Powered-By", "PHP/8.1.2-1ubuntu2.19")
if r.Method == http.MethodPost {
w.WriteHeader(http.StatusForbidden)
fmt.Fprint(w, pmaErrorHTML)
return
}
fmt.Fprint(w, pmaLoginHTML)
}