Skip to content

Commit

Permalink
#23 Header view, Sidebar DA one line
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinrais committed Jan 19, 2022
1 parent ee7a634 commit 5d42423
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
12 changes: 6 additions & 6 deletions src/common/components/partials/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
:class="isPageActive('dynamic-analysis') ? 'active' : ''"
class="disabled cursor-not-allowed"
>
<a class="bg-gray-2xlight">
<a class="bg-gray-2xlight w-full">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 ml-2"
Expand All @@ -126,14 +126,14 @@
/>
</svg>

Dynamic Analysis
<span class="text-base">Dynamic Analysis</span>
<span
class="
rounded-full
bg-red-500
px-2
py-1
text-xs
py-0
text-[0.5em]
font-bold
text-white
"
Expand Down Expand Up @@ -243,7 +243,7 @@ export default {
li {
a {
@apply text-base text-gray flex items-center gap-4 py-4 my-1 p-4 w-9/10 rounded-r-md;
@apply text-base text-gray flex items-center gap-4 py-4 my-1 p-2 w-11/12 rounded-r-md;
}
&.active > a,
> a:hover {
Expand All @@ -253,7 +253,7 @@ export default {
}
.sub-items {
@apply pl-8 ml-6 mr-1;
@apply pl-8 ml-4 mr-1;
max-height: 300px;
opacity: 1;
Expand Down
5 changes: 3 additions & 2 deletions src/common/helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const generateAvatar = function(username){
export const generateAvatar = function (username) {
let avatarCdn = process.env.AVATAR_BASE_URL || process.env.VUE_APP_AVATAR_BASE_URL;
return `${avatarCdn}${username}`
}
}

17 changes: 12 additions & 5 deletions src/modules/file/pages/static-analysis/PE.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<!-- Start Header -->
<card-tab :active="'Header' == currentTab">
<code>{{ get_Header }}</code>
<pre class="px-4">{{ get_Header }}</pre>
</card-tab>
<!-- End Header -->

Expand Down Expand Up @@ -90,7 +90,10 @@
:bordered="true"
:lines="[
{ key: 'Name', value: importItem.name },
{ key: 'Offset', value: importItem.offset },
{
key: 'Offset',
value: importItem.offset,
},
]"
></table-cols>
<div class="divider"></div>
Expand Down Expand Up @@ -206,6 +209,8 @@ import CardTabs from "@/common/components/elements/CardTabs.vue";
import TableCols from "@/common/components/tables/TableCols.vue";
import DosHeader from "./PE/DosHeader.vue";
import hexdump from "buffer-hexdump";
import { capitalize } from "@vue/shared";
import { fileGetters } from "@/state/helpers";
import {
Expand Down Expand Up @@ -280,6 +285,7 @@ export default {
computed: {
...fileGetters,
getItems() {
console.log(this.getFilePE[this.currentTab]);
return this.getFilePE[this.currentTab];
},
getFirstTree() {
Expand Down Expand Up @@ -377,7 +383,7 @@ export default {
get_Imports_tabs() {
return this.get_Imports.map((item) => ({
name: item.name,
title: item.offset,
title: item.name,
}));
},
get_Resources_Tabs() {
Expand All @@ -387,7 +393,8 @@ export default {
}));
},
get_Header() {
return this.getFilePE[this.currentTab];
const buffer = Buffer.from(this.getFilePE[this.currentTab], "base64");
return hexdump(buffer);
},
get_RichHeader() {
let richeader = this.getSelectedItems();
Expand Down Expand Up @@ -426,7 +433,7 @@ export default {
};
});
return {
name: `Entropy : ${_section.Entropy || ""}`,
name: `Entropy (${_section.Entropy || ""})`,
header: header,
};
});
Expand Down
6 changes: 3 additions & 3 deletions src/modules/file/pages/static-analysis/PE/DosHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{ key: 'member', title: 'Member' },
{ key: 'value', title: 'Value' },
]"
:lines="get_DosHeader"
:lines="getLines"
/>
</template>
<script>
Expand All @@ -17,12 +17,12 @@ import {
} from "@/common/utils/translate";
export default {
components: [TableCols],
components: { TableCols },
props: {
items: {},
},
computed: {
get_DosHeader() {
getLines() {
return Object.keys(this.items).map((key) => {
let val = translateValue(key, this.items[key]);
Expand Down

0 comments on commit 5d42423

Please sign in to comment.