xvertile / akamai-bmp-generator

Generate sensor data for Akamai's Bot Management Protocol (BMP) to bypass bot detection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(untyped int constant) as int value in array or slice literal (overflows)

byMonaco opened this issue · comments

Don't building. Can you fix it? Thx!

..\sdk\sdk.go:37:22: cannot use 3523407757 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:34: cannot use 2768625435 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:70: cannot use 3580832660 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:82: cannot use 2724731650 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:117: cannot use 3705235391 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:129: cannot use 2883475241 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:164: cannot use 3686048678 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:176: cannot use 2897449776 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:211: cannot use 3484811241 (untyped int constant) as int value in array or slice literal (overflows) ..\sdk\sdk.go:37:223: cannot use 3098726271 (untyped int constant) as int value in array or slice literal (overflows)

I have updated the code to use a uint32 please get the latest version and try again.

I have updated the code to use a uint32 please get the latest version and try again.

Thank you!

But new one error:

..\sdk\sdk.go:1041:27: 0xffffffff (untyped int constant 4294967295) overflows int

Fixed, but, generate not valid sensor for my android app. Akamai version is 3.3.4

func FeistelEncode(longValue, eventCount, key int) uint32 {
	var0 := ((uint32(eventCount) & uint32(0xffffffff)) | (uint32(longValue) << 32))
	var2 := int32(key)
	var3 := int32(var0)
	var5 := int32(var0 >> 32)
	var4 := 0

	for {
		var6 := int32(var4)
		if var4 >= 16 {
			var9 := uint32(var5)
			var0 = uint32(var3)
			return var9<<32 | var0&uint32(0xffffffff)
		}
		var4++
		var6 = int32(int32(var5) ^ (var2) ^ int32(var3))
		var2 *= 2
		var5 = int32(var3)
		var3 = int32(var6)
	}
}