Created
August 17, 2023 18:19
-
-
Save sarcasticadmin/67883da8576d3ec44c9adbbaf3e03bab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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