Skip to content

Instantly share code, notes, and snippets.

@sarcasticadmin
Created August 17, 2023 18:19
Show Gist options
  • Save sarcasticadmin/67883da8576d3ec44c9adbbaf3e03bab to your computer and use it in GitHub Desktop.
Save sarcasticadmin/67883da8576d3ec44c9adbbaf3e03bab to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
http.HandleFunc("/", getRoot)
http.HandleFunc("/hello", getRoot)
http.ListenAndServe("0.0.0.0:3333", nil)
}
func getRoot(w http.ResponseWriter, r *http.Request) {
fmt.Printf("got / request from %s\n", r.RemoteAddr)
io.WriteString(w, "defcon_prizes_txt_404-301-0455\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment