ochi icon indicating copy to clipboard operation
ochi copied to clipboard

Per sensor add download button for ARM and AMD64 binaries

Open glaslos opened this issue 1 year ago • 0 comments

The backend will have access to binaries for each architecture. UUID of the sensor needs to be baked into binary. Use the following snippet to replace a placeholder sensor UUID in the binary:

// IndexReplace uses the optimized offset finding
func IndexReplace(b, old, new []byte) []byte {
	i := bytes.Index(b, old)
	if i == -1 {
		return b
	}
	copy(b[i:], new)
	return b
}

glaslos avatar Oct 19 '23 14:10 glaslos