Skip to content

Instantly share code, notes, and snippets.

@johnwunder
Created May 9, 2019 20:53
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 johnwunder/9b1680a3989e05481bd42c05adfe908f to your computer and use it in GitHub Desktop.
Save johnwunder/9b1680a3989e05481bd42c05adfe908f to your computer and use it in GitHub Desktop.
Display Navigator in Jupyter Lab
from IPython.display import IFrame
token = "<your Jupyter Lab token, from startup>" # Get this from the terminal when Jupyter Lab starts up
layer_url = "http://localhost:8888/files/layer.json" # Get this from right-clicking the file in the Jupyter Lab file manager and hitting Copy Download URL
navigator_url = "https://mitre-attack.github.io/attack-navigator/enterprise/"
IFrame(src="{}#layerURL={}?token={}".format(navigator_url, layer_url, token), width='100%', height='500px')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment