Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per sensor add download button for ARM and AMD64 binaries #95

Open
glaslos opened this issue Oct 19, 2023 · 0 comments
Open

Per sensor add download button for ARM and AMD64 binaries #95

glaslos opened this issue Oct 19, 2023 · 0 comments

Comments

@glaslos
Copy link
Member

glaslos commented Oct 19, 2023

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 glaslos converted this from a draft issue Oct 19, 2023
@glaslos glaslos changed the title Per sensor add download button for ARM and AMD64 binaries. UUID baked into binary Per sensor add download button for ARM and AMD64 binaries Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant