Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
doc /
articles /
wiki /
[ HOME SHELL ]
Name
Size
Permission
Action
edit.html
216
B
-rw-r--r--
final-noclosure.go
2.26
KB
-rw-r--r--
final-noerror.go
1.14
KB
-rw-r--r--
final-parsetemplate.go
2.16
KB
-rw-r--r--
final-template.go
1.49
KB
-rw-r--r--
final.go
2.13
KB
-rw-r--r--
final_test.go
413
B
-rw-r--r--
go.mod
34
B
-rw-r--r--
http-sample.go
277
B
-rw-r--r--
index.html
22.39
KB
-rw-r--r--
notemplate.go
1.29
KB
-rw-r--r--
part1-noerror.go
688
B
-rw-r--r--
part1.go
745
B
-rw-r--r--
part2.go
891
B
-rw-r--r--
part3-errorhandling.go
1.67
KB
-rw-r--r--
part3.go
1.26
KB
-rw-r--r--
test_Test.txt.good
12
B
-rw-r--r--
test_edit.good
183
B
-rw-r--r--
test_view.good
79
B
-rw-r--r--
view.html
100
B
-rw-r--r--
wiki_test.go
4.45
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : final-noclosure.go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "errors" "html/template" "io/ioutil" "log" "net/http" "regexp" ) type Page struct { Title string Body []byte } func (p *Page) save() error { filename := p.Title + ".txt" return ioutil.WriteFile(filename, p.Body, 0600) } func loadPage(title string) (*Page, error) { filename := title + ".txt" body, err := ioutil.ReadFile(filename) if err != nil { return nil, err } return &Page{Title: title, Body: body}, nil } func viewHandler(w http.ResponseWriter, r *http.Request) { title, err := getTitle(w, r) if err != nil { return } p, err := loadPage(title) if err != nil { http.Redirect(w, r, "/edit/"+title, http.StatusFound) return } renderTemplate(w, "view", p) } func editHandler(w http.ResponseWriter, r *http.Request) { title, err := getTitle(w, r) if err != nil { return } p, err := loadPage(title) if err != nil { p = &Page{Title: title} } renderTemplate(w, "edit", p) } func saveHandler(w http.ResponseWriter, r *http.Request) { title, err := getTitle(w, r) if err != nil { return } body := r.FormValue("body") p := &Page{Title: title, Body: []byte(body)} err = p.save() if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } http.Redirect(w, r, "/view/"+title, http.StatusFound) } func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) { t, err := template.ParseFiles(tmpl + ".html") if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } err = t.Execute(w, p) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } } var validPath = regexp.MustCompile("^/(edit|save|view)/([a-zA-Z0-9]+)$") func getTitle(w http.ResponseWriter, r *http.Request) (string, error) { m := validPath.FindStringSubmatch(r.URL.Path) if m == nil { http.NotFound(w, r) return "", errors.New("invalid Page Title") } return m[2], nil // The title is the second subexpression. } func main() { http.HandleFunc("/view/", viewHandler) http.HandleFunc("/edit/", editHandler) http.HandleFunc("/save/", saveHandler) log.Fatal(http.ListenAndServe(":8080", nil)) }
Close