Skip to content

Boot URL component-encoded boot sector? #1010

Answered by SuperMaxusa
jaredkrinke asked this question in Q&A
Discussion options

You must be logged in to vote

I saw mention of a fda.url query parameter, but I believe those URLs are relative to the host domain.

I found that XHR can works with Data URI:

let xhr = new XMLHttpRequest();

xhr.open("GET", "data:,hello!");

xhr.onload = function() {
    console.log(xhr.response); // output: "hello!"
};

xhr.send();

So after converting binary to base64 uri (as octet-stream data):

import base64

# https://gist.github.com/SuperMaxusa/7a84325c73d0ed47d6f5678fef780063
with open("bootsector.bin", "rb") as f:
	print("data:file/octet-stream;base64," + base64.b64encode(f.read()).decode("ascii"))

And here is example link: https://copy.sh/v86?profile=custom&fda.url=data:file/octet-stream;base64,McCOwDD/vRp8tBO…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jaredkrinke
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants