Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

client_hello_fuzz_test.go 466B

123456789101112131415161718192021
  1. package faketls_test
  2. import (
  3. "testing"
  4. "github.com/9seconds/mtg/v2/mtglib/internal/faketls"
  5. "github.com/stretchr/testify/require"
  6. )
  7. var FuzzClientHelloSecret = []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
  8. func FuzzClientHello(f *testing.F) {
  9. f.Add([]byte{1, 2, 3})
  10. f.Fuzz(func(t *testing.T, frame []byte) {
  11. _, err := faketls.ParseClientHello(FuzzClientHelloSecret, frame)
  12. // a probability of having != err is almost negligible
  13. require.Error(t, err)
  14. })
  15. }