mirror of
https://github.com/Xevion/r2park.git
synced 2025-12-07 03:16:06 -06:00
Remove TODOs for various URL hits, PHPSESSID verification
This commit is contained in:
15
api.go
15
api.go
@@ -6,6 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/cookiejar"
|
"net/http/cookiejar"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"slices"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -62,12 +63,16 @@ func reload(name string) {
|
|||||||
res, _ = client.Do(req)
|
res, _ = client.Do(req)
|
||||||
onResponse(res)
|
onResponse(res)
|
||||||
|
|
||||||
// TODO: Verify that a PHPSESSID cookie is present
|
// Verify that a PHPSESSID cookie is present
|
||||||
|
site_cookies := client.Jar.Cookies(req.URL)
|
||||||
|
has_php_session := slices.ContainsFunc(site_cookies, func(cookie *http.Cookie) bool {
|
||||||
|
return cookie.Name == "PHPSESSID"
|
||||||
|
})
|
||||||
|
|
||||||
if len(name) > 0 {
|
if !has_php_session {
|
||||||
// TODO: GET https://www.register2park.com/register-get-properties-from-name
|
log.Fatal("PHPSESSID cookie not found")
|
||||||
// TODO: GET https://www.register2park.com/register?key=678zv9zzylvw
|
} else {
|
||||||
// TODO: GET https://www.register2park.com/register-get-properties-from-name
|
log.Println("PHPSESSID cookie found")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user