Exploit database

GH-86eeaf4efa344024f10caaad61672e6a

neex/hui2ochko

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2021-43848

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files28
neex/hui2ochkoRevision 8c5ba6085431

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

patched-quic-go/internal_/utils/rand_test.go

Go · 541 bytes
package utils

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Rand", func() {
	It("generates random numbers", func() {
		const (
			num = 1000
			max = 123456
		)

		var values [num]int32
		var r Rand
		for i := 0; i < num; i++ {
			v := r.Int31n(max)
			Expect(v).To(And(
				BeNumerically(">=", 0),
				BeNumerically("<", max),
			))
			values[i] = v
		}

		var sum uint64
		for _, n := range values {
			sum += uint64(n)
		}
		Expect(float64(sum) / num).To(BeNumerically("~", max/2, max/25))
	})
})