Commit ca6a670a authored by Nicolas Wavrant's avatar Nicolas Wavrant

Proof-of-concept to show shellinabox in a frame with auto-log,

using javascript
parent e7521673
......@@ -90,3 +90,13 @@ function bindRemove() {
}
});
}(jQuery, document, this));
/********************************/
$(document).ready(function () {
$("#linkshell").click(function () {
"use strict";
$("#main").empty();
//XXX It is not finished
$("#main").append("<iframe id=\"shellinabox\" src=\"https://login:password@[2001:67c:1254:3b:fc93:4aff:feca:66ac]:50005/shellinabox\"></iframe>");
});
});
......@@ -58,7 +58,7 @@
<div class="line"></div>
<a href="{{ url_for('manageProject') }}" style="float:left" title="Manage Your repositories"><img alt="" src="{{ url_for('static', filename='images/manage_repo-little.png') }}" /></a>
<div class="line"></div>
<a href="{{ url_for('shell') }}" style="float:left" title="Use the shell"><img alt="" src="{{ url_for('static', filename='images/terminal.png') }}" /></a>
<span id="linkshell" style="float:left" title="Use the shell"><img alt="" src="{{ url_for('static', filename='images/terminal.png') }}" /></span>
<div class="line"></div>
<a href="{{ url_for('dologout') }}" style="float:left" title="Close your session"><img alt="" src="{{ url_for('static', filename='images/logout.png') }}" /></a>
<h2 class="info">{% block title %}{% endblock %} - {{session.title}}</h2>
......
{% extends "layout.html" %}
{% block title %} Shell {% endblock %}
{% block body %}
<iframe id="shellinabox" src="/shellinabox"></iframe>
{% endblock %}
......@@ -703,7 +703,7 @@ def editFile():
@login_required()
def shell():
return render_template('shell.html')
return "<iframe id=\"shellinabox\" src=\"/shellinabox\"></iframe>"
#Setup List of URLs
app.add_url_rule('/', 'home', home)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment