mirror of
https://github.com/rramiachraf/dumb.git
synced 2025-04-05 13:57:36 +03:00
parent
c940b4a2cd
commit
2c0f43b8f7
15 changed files with 78 additions and 450 deletions
|
@ -1,32 +0,0 @@
|
|||
package handlers
|
||||
|
||||
/*
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSendRequest(t *testing.T) {
|
||||
res, err := sendRequest("https://tls.peet.ws/api/clean")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
defer res.Body.Close()
|
||||
|
||||
type fingerprint struct {
|
||||
JA3 string `json:"ja3"`
|
||||
}
|
||||
|
||||
decoder := json.NewDecoder(res.Body)
|
||||
var fg fingerprint
|
||||
|
||||
if err := decoder.Decode(&fg); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if fg.JA3 != JA3 {
|
||||
t.Fatalf("expected %q, got %q\n", JA3, fg.JA3)
|
||||
}
|
||||
}
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue