Skip to content

Commit

Permalink
add version 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zan8in committed Aug 9, 2024
1 parent f368d83 commit 7854ce9
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/config/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/zan8in/gologger"
)

const Version = "3.1.0"
const Version = "3.1.1"

func InitBanner() {
fmt.Printf("\r\n|\tA F 🐸 O G\t|")
Expand Down
14 changes: 14 additions & 0 deletions pkg/web/template/Login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - Afrog A Security Tool for Bug Bounty, Pentest and Red Teaming.</title>
</head>

<body>

</body>

</html>
24 changes: 24 additions & 0 deletions pkg/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func StartServer(addr string) error {
return err
}

http.HandleFunc("/login", loginHandler)
http.HandleFunc("/", listHandler)

http.Handle("/static/", http.FileServer(http.FS(temp)))
Expand All @@ -30,6 +31,29 @@ func StartServer(addr string) error {

}

type User struct {
Password string
}

func loginHandler(w http.ResponseWriter, r *http.Request) {
password := r.PostFormValue("password")
if len(password) == 0 {
http.Error(w, "login failed", http.StatusBadRequest)
return
}

tmpl, err := template.ParseFiles("template/Login.html")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
err = tmpl.Execute(w, nil)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}

func listHandler(w http.ResponseWriter, r *http.Request) {
// 获取查询参数
keyword := r.URL.Query().Get("keyword")
Expand Down
2 changes: 1 addition & 1 deletion pocs/v/afrog.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.1.1

0 comments on commit 7854ce9

Please sign in to comment.