Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #37 from rep/development
Browse files Browse the repository at this point in the history
Added simple web utility for files submission
  • Loading branch information
Nex committed Jul 4, 2012
2 parents 69b5eb9 + 236c87e commit 9a59f9e
Show file tree
Hide file tree
Showing 15 changed files with 3,625 additions and 31 deletions.
9 changes: 9 additions & 0 deletions data/html/bootstrap/css/bootstrap-responsive.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions data/html/bootstrap/css/bootstrap.min.css

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/html/bootstrap/img/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions data/html/bootstrap/js/bootstrap.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions data/html/bootstrap/js/jquery-1.7.2.min.js

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions data/html/style.css
Expand Up @@ -56,6 +56,7 @@ body {
#menu li {
float: right;
margin-right: 10px;
line-height: 35px;
}
#menu a:link, #menu a:visited {
text-decoration: none;
Expand Down Expand Up @@ -259,3 +260,41 @@ td.form {
background-color: #ff6060;
margin-bottom: 3px;
}
.headline {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 24px;
margin-top: 5px;
margin-bottom: 0px;
text-align: center;
font-weight: normal;
color: #222;
}
.subheadline {
font-family: "Lucida Grande", Tahoma;
font-size: 10px;
font-weight: lighter;
font-variant: normal;
text-transform: uppercase;
color: #666666;
margin-top: 10px;
text-align: center!important;
letter-spacing: 0.3em;
}
.title {
color: #222;
font-size: 18px;
font-weight: bold;
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: normal;
margin-top: 30px;
}
.box {
background: #ecf2f5;
border: 1px solid #bcd;
padding: 20px;
}
.tasks .table {
margin-top: 10px;
}
46 changes: 46 additions & 0 deletions data/html/webif/base.html
@@ -0,0 +1,46 @@
<!--
Cuckoo Sandbox - Automated Malware Analysis
Copyright (C) 2010-2012 Claudio "nex" Guarnieri (nex@cuckoobox.org)
http://www.cuckoobox.org
This file is part of Cuckoo.
Cuckoo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Cuckoo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Cuckoo Sandbox<%def name="title()" />${self.title()}</title>
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<style>
<%include file="../style.css" />
</style>
<script type="text/JavaScript" src="/static/bootstrap/js/jquery-1.7.2.min.js"></script>

<script type="text/JavaScript">
<%include file="../bootstrap/js/bootstrap.min.js" />
<%include file="../functions.js" />
</script>
</head>
<body>
<tag id="top"></tag>
<div id="container">
<div id="header"><%include file="../images/logo.html" /></div>
<%def name="content()" />
${self.content()}
</div>
<div id="footer">&copy;2010-2012 <a href="http://www.cuckoobox.org">Cuckoo Sandbox</a>.</div>
</body>
</html>
16 changes: 16 additions & 0 deletions data/html/webif/base2.html
@@ -0,0 +1,16 @@
<%inherit file="base.html" />
<%def name="title()"> - Web interface</%def>
<%def name="content()">
<section id="code">
<div id="menu">
<ul id="menu">
<li style="margin-right: 20px;"><a href="http://cuckoosandbox.org/">Cuckoo Website</a></li>
<li><a href="/browse">Browse Results</a></li>
<li><a href="/">Submit file</a></li>
</ul>
</div>
<div id="content">
${self.subcontent()}
</div>
</section>
</%def>
16 changes: 16 additions & 0 deletions data/html/webif/browse.html
@@ -0,0 +1,16 @@
<%inherit file="base2.html" />
<%def name="subcontent()">
<h1 class="headline">Cuckoo Sandbox</h1>
<div class="subheadline">Automated Malware Analysis System</div>
<div class="tasks">
<div class="title">Analysis Tasks</div>
<table class="table table-striped">
<thead><tr><th>ID</th><th style="width: 20%;">md5 sum</th><th style="width: 40%;">File name</th><th>Added</th><th>Status</th></tr></thead>
<tbody>
% for r in rows:
<tr><td>${r.id}</td><td>${r.md5}</td><td>${os.path.basename(r.file_path)}</td><td>${r.added_on}</td><td>${r.status}</td></tr>
% endfor
</tbody>
</table>
</div>
</%def>
72 changes: 72 additions & 0 deletions data/html/webif/submit.html
@@ -0,0 +1,72 @@
<%inherit file="base2.html" />
<%def name="subcontent()">
<h1 class="headline">Cuckoo Sandbox</h1>
<div class="subheadline">Automated Malware Analysis System</div>
<div class="fileupload">
<div class="title">New Analysis</div>
<p>This form can be used to submit files for analysis.</p>
<form method="POST" action="/submit" class="form-horizontal" enctype="multipart/form-data">
<fieldset>
<div class="control-group ${'error' if context.get('error_file','') else ''}">
<label class="control-label" for="input01">File to upload</label>
<div class="controls">
<input type="file" name="file" class="input-xlarge" id="input01">
% if error_file != UNDEFINED:
<span class="help-inline">${error_file}</span>
% endif
</div>
</div>

<div class="control-group ${'error' if context.get('error_package','') else ''}">
<label class="control-label" for="input02">Package to use</label>
<div class="controls">
<input type="text" name="package" class="input-xlarge" id="input02" value="${context.get('package','')}">
% if error_package != UNDEFINED:
<span class="help-inline">${error_package}</span>
% endif
</div>
</div>

<div class="control-group ${'error' if context.get('error_options','') else ''}">
<label class="control-label" for="input03">Options</label>
<div class="controls">
<input type="text" name="options" class="input-xlarge" id="input03" value="${context.get('options','')}">
% if error_options != UNDEFINED:
<span class="help-inline">${error_options}</span>
% endif
</div>
</div>

<div class="control-group ${'error' if context.get('error_timeout','') else ''}">
<label class="control-label" for="input04">Timeout</label>
<div class="controls">
<input type="text" name="timeout" class="input-xlarge" id="input04" value="${context.get('timeout','120')}">
% if error_timeout != UNDEFINED:
<span class="help-inline">${error_timeout}</span>
% endif
</div>
</div>

<div class="control-group ${'error' if context.get('error_priority','') else ''}">
<label class="control-label" for="select01">Priority</label>
<div class="controls">
<select id="select01" name="priority">
<option ${'selected' if context.get('priority',1) == 1 else ''}>1</option>
<option ${'selected' if context.get('priority',None) == 2 else ''}>2</option>
<option ${'selected' if context.get('priority',None) == 3 else ''}>3</option>
</select>
% if error_priority != UNDEFINED:
<span class="help-inline">${error_priority}</span>
% endif
<p class="help-block">Can be 1 / 2 / 3</p>
</div>
</div>

<div class="form-actions">
<button type="submit" class="btn btn-primary">Submit</button>
<button class="btn">Cancel</button>
</div>
</fieldset>
</form>
</div>
</%def>
12 changes: 12 additions & 0 deletions data/html/webif/success.html
@@ -0,0 +1,12 @@
<%inherit file="base2.html" />
<%def name="subcontent()">
<h1 class="headline">Cuckoo Sandbox</h1>
<div class="subheadline">Automated Malware Analysis System</div>
<div class="fileupload">
<div class="title">New Analysis</div>
<br />
<div class="box" style="text-align: center;font-size: 14px;">
<p>File ${submitfile} was submitted for analysis with Task ID ${taskid}.</p>
</div>
</div>
</%def>

0 comments on commit 9a59f9e

Please sign in to comment.