You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

28 lines
722B

  1. package main
  2. import (
  3. "net/http"
  4. )
  5. func main() {
  6. // serve the index page
  7. http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){
  8. http.ServeFile(w, r, "CyberChef_v9.0.1.html")
  9. })
  10. // server the static css
  11. http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets"))))
  12. // server the static css
  13. http.Handle("/images/", http.StripPrefix("/images/", http.FileServer(http.Dir("images"))))
  14. // server the static css
  15. http.Handle("/modules/", http.StripPrefix("/modules/", http.FileServer(http.Dir("modules"))))
  16. // start listening to incomming connections and serve the appropriate files
  17. panic(http.ListenAndServe(":80", nil))
  18. }