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

Commit

Permalink
quickfix
Browse files Browse the repository at this point in the history
- footer displayed wrong, changed paddings

Conflicts:
	cuckoo/web/static/css/vendor.css
  • Loading branch information
Koen Houtman authored and jbremer committed Apr 12, 2017
1 parent 2b90a47 commit ae4171a
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 86 deletions.
21 changes: 19 additions & 2 deletions cuckoo/web/src/scripts/analysis_network.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ class HexView {

var displayBody,
outputMode,
content = this.raw;
content = this.raw,
textArea = true;

let body = this.displayBody;
let output = this.displayOutput;
Expand All @@ -188,7 +189,7 @@ class HexView {
// this.container.removeClass('empty-body');
}

this.container.empty().text(content);
this.container.empty().text(HexView.unescapeHTML(content));

}

Expand Down Expand Up @@ -245,6 +246,15 @@ class HexView {
}
}

// http://stackoverflow.com/questions/22279231/using-js-jquery-how-can-i-unescape-html-and-put-quotes-back-in-the-str
static unescapeHTML(safe) {
return safe.replace(/&/g, '&')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&quot;/g, '"')
.replace(/&#039;/g, "'");
}

}

/*
Expand Down Expand Up @@ -352,13 +362,16 @@ class RequestDisplay {
this.el.removeClass('is-loading');
summaryElement.find('.fa-chevron-right').removeClass('fa-spinner fa-spin');


this.hex_view = new HexView(this.el, {
request: self.request_body,
response: self.response_body
}, {
container: '[data-draw="source"]'
}).initialise();

console.log(this.hex_view)


self.open();
}
Expand Down Expand Up @@ -680,15 +693,19 @@ $(function() {
network_nav.transition('network-analysis-http');

if($("#network-analysis-tcp").length) {

let packet_display_tcp = new PacketDisplay($("#network-analysis-tcp"), {
skip_empty: true
});

}

if($("#network-analysis-udp").length) {

let packet_display_udp = new PacketDisplay($('#network-analysis-udp'), {
skip_empty: true
});

}

$("#http-requests .network-display__request").each(function() {
Expand Down
4 changes: 3 additions & 1 deletion cuckoo/web/src/scss/components/_cuckoo-analysis.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

font-family: "Roboto";
background-color: #fafafa;
margin-top: -20px;
padding-top: 80px;

&:focus {
outline: none;
Expand Down Expand Up @@ -35,7 +37,7 @@
font-size: 36px;
color: #555;
margin: 0;
padding-top: 30px;
padding-top: 0px;

@include cuckoo-theme('cyborg') { color: $cyborg_text_color; }
@include cuckoo-theme('night') { color: $night_text_color; }
Expand Down
6 changes: 6 additions & 0 deletions cuckoo/web/src/scss/components/_network-display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@
padding: 15px;
border-bottom: 1px solid #D8D8D8;

textarea {
font-family: monospace;
overflow-x: scroll;
width: 100%;
}

pre {
padding: 0;
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion cuckoo/web/src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ body#analysis {
@import "components/app-nav";
@import "components/buttons";
@import "components/analysis-sidebar";
@import "components/cuckoo-analysis";
@import "components/flex-navigation";
@import "components/cuckoo-analysis";
@import "components/network-http-request";
@import "components/dndupload";
@import "components/nav";
Expand Down
171 changes: 89 additions & 82 deletions cuckoo/web/static/css/main.css

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

0 comments on commit ae4171a

Please sign in to comment.