Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare v1.3.0 Release #5

Merged
merged 17 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,8 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

*.exe
resources/rpv-web.ico
resources/rpv-web.rc
resources/rpv-web.res
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## v1.3.0 - July 29, 2024

### Added

* Add RPC interface filter
* Add support for negative filters
* Add RPC interface version in interface pane
* Add module base address to interface details

### Changed

* Make process filter persistent when tab is changed
* MIDL view now jumps to selected method


## v1.2.1 - July 19, 2024

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![](https://github.com/qtc-de/rpv-web/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/qtc-de/rpv-web/actions/workflows/build.yml)
[![](https://github.com/qtc-de/rpv-web/actions/workflows/build.yml/badge.svg?branch=dev)](https://github.com/qtc-de/rpv-web/actions/workflows/build.yml)
[![](https://img.shields.io/badge/version-1.2.1-blue)](https://github.com/qtc-de/rpv-web/releases)
[![](https://img.shields.io/badge/version-1.3.0-blue)](https://github.com/qtc-de/rpv-web/releases)
[![](https://img.shields.io/badge/language-v%20%26%20vue-blue)](https://vlang.io/)
[![](https://img.shields.io/badge/license-GPL%20v3.0-blue)](https://github.com/qtc-de/rpv-web/blob/master/LICENSE)
[![](https://img.shields.io/badge/Pages-fa6b05)](https://qtc-de.github.io/rpv-web/)
Expand Down
19 changes: 19 additions & 0 deletions frontend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:lts-alpine

WORKDIR /app
COPY package*.json .

RUN adduser --gecos '' --disabled-password rpv \
&& chown -R rpv:rpv /app \
&& su rpv -c "npm install" \
&& su rpv -c "npm install http-server"

COPY . .

RUN chown -R rpv:rpv /app \
&& su rpv -c "npm run build"

USER rpv:rpv
EXPOSE 5173

CMD ["npm", "run", "dev", "--", "--host"]
13 changes: 13 additions & 0 deletions frontend/dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

podman image exists rpv-web-dev

if [ $? -ne 0 ]; then
echo '[+] Building rpv-web-dev image.'
podman build -t rpv-web-dev -f Dockerfile.dev .
else
echo '[+] rpv-web-dev image already exists.'
fi

echo '[+] Starting rpv-web-dev container.'
podman run -v ${PWD}/src/:/app/src:Z -it -p 5173:5173 rpv-web-dev
2 changes: 1 addition & 1 deletion frontend/src/components/Headline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
<p id="Logo" class="d-inline-block">RP</p>
<img id="LogoPng" src="../assets/icons/rpv-web.png"/>
<p id="Web" class="d-inline-block">WEB</p>
<p class="Fs-8 mb-0 ml-4">v1.1.0</p>
<p class="Fs-8 mb-0 ml-4">v1.3.0</p>
</div>

<div id="RightHeadline">
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/InterfaceDetailPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,13 @@
v-on:blur="changeInterfaceName($event)"/></td>
</tr>
<tr>
<td>DLL</td>
<td>Module</td>
<td v-if="selectedInterface">{{ selectedInterface.location }}</td>
</tr>
<tr>
<td>Module Base</td>
<td v-if="selectedInterface">{{ selectedInterface.module_base }}</td>
</tr>
<tr>
<td>Description</td>
<td v-if="selectedInterface">{{ selectedInterface.description }}</td>
Expand Down
122 changes: 118 additions & 4 deletions frontend/src/components/InterfacePane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
setup()
{
const store = processStore();
const { selectedProcess, selectedInterface } = storeToRefs(store);
return { store, selectedProcess, selectedInterface }
const { interfaceFilter, selectedProcess, selectedInterface } = storeToRefs(store);
return { store, interfaceFilter, selectedProcess, selectedInterface }
},

components: {
components:
{
VueSimpleContextMenu,
},

Expand All @@ -31,6 +32,114 @@
this.selectedInterface = intf;
},

casualFilter(intf, filter)
{
let inverse = false;

if (filter.startsWith('!'))
{
filter = filter.substring(1);
inverse = true;
}

return (intf.id.toLowerCase().includes(filter) || intf.location.toLowerCase().includes(filter) ||
intf.description.toLowerCase().includes(filter) || intf.name.toLowerCase().includes(filter) ||
intf.annotation.toLowerCase().includes(filter)) != inverse;
},

getInterfaces: function*(filter)
{
for (const intf of this.selectedProcess.rpc_info.interface_infos)
{
if (filter)
{
let match = true;
filter = filter.toLowerCase();

if (!filter.includes(':') && !this.casualFilter(intf, filter))
{
match = false;
}

else
{
const filterArray = filter.split(/\s*\|\s*/);

for (const entry of filterArray)
{
let key, value;
let inverse = false;

[key, value] = entry.split(':', 2);

if (key === 'uuid')
{
key = 'id';
}

if (value === undefined)
{
if (!this.casualFilter(intf, key))
{
match = false;
break;
}

continue;
}

if (value.startsWith('!'))
{
value = value.substring(1);
inverse = true;
}

if (Object.hasOwn(intf, key))
{
const propValue = intf[key];

if (Array.isArray(propValue))
{
let found = false;

for (const item of propValue)
{
if (String(item).toLowerCase().includes(value))
{
found = true;
break;
}
}

if (!found != inverse)
{
match = false;
break;
}
}

else
{
if (String(propValue).toLowerCase().includes(value) == inverse)
{
match = false;
break;
}
}
}
}
}

if (!match)
{
continue;
}
}

yield intf;
}
},

interfaceClick(e, item)
{
if (item.typ != 'rpc')
Expand Down Expand Up @@ -63,23 +172,28 @@

<template>
<h3 class="ml-2">RPC Interfaces</h3>

<input v-model="interfaceFilter" class="form-control mb-1" style="width: 95%" placeholder="filter: [!]<str> | type:[!]<str> | uuid:[!]<str> | location:[!]<str> | desc:[!]<str> | name:[!]<str> | flags:[!]<str> | annotation:[!]<str> | ..."/>

<aside id="InterfacePane" class="SmallBorder">
<table class="GenericTable">
<tr>
<th class="InterfaceColumn">Type</th>
<th class="InterfaceColumn">UUID</th>
<th class="InterfaceColumn">Version</th>
<th class="InterfaceColumn">Location</th>
<th class="InterfaceColumn">Procs</th>
<th class="InterfaceColumn">Desc</th>
<th class="InterfaceColumn">Name</th>
<th class="InterfaceColumn">Annotation</th>
<th class="InterfaceColumn">EpRegistred</th>
</tr>
<tr v-if="selectedProcess" v-for="intf in selectedProcess.rpc_info.interface_infos" @contextmenu.prevent.stop="interfaceClick($event, intf)"
<tr v-if="selectedProcess" v-for="intf in getInterfaces(interfaceFilter)" @contextmenu.prevent.stop="interfaceClick($event, intf)"
:class="{ Selected: (selectedInterface && selectedInterface.id == intf.id), Rpc: intf.typ == 'rpc',
Dcom: intf.typ == 'dcom', Hybrid: intf.typ == 'hybrid' }" @click='selectRow(intf)'>
<td class="InterfaceColumn">{{ intf.typ.toUpperCase() }}</td>
<td class="InterfaceColumn">{{ intf.id }}</td>
<td class="InterfaceColumn">{{ intf.version }}</td>
<td class="InterfaceColumn">{{ intf.location }}</td>
<td class="InterfaceColumn">{{ intf.methods.length }}</td>
<td class="InterfaceColumn">{{ intf.description }}</td>
Expand Down
38 changes: 34 additions & 4 deletions frontend/src/components/MethodPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
setup()
{
const store = processStore();
const { selectedProcess, selectedInterface } = storeToRefs(store);
return { selectedInterface, selectedProcess, store }
const { selectedProcess, selectedInterface, tabs, selectedTab } = storeToRefs(store);
return { tabs, selectedTab, selectedInterface, selectedProcess, store }
},

methods:
Expand All @@ -38,8 +38,13 @@
this.editMethod = null;

let method = this.selectedInterface.methods[index];

this.store.addMethodName(methodName, method.addr, this.selectedInterface.location)

if (method.origName === undefined)
{
method.origName = method.name;
}

method.name = methodName;
},

Expand All @@ -50,6 +55,31 @@

this.store.addMethodNotes(notes, index, this.selectedInterface.id)
this.selectedInterface.methods[index].notes = notes;
},

jumpDecompiled(method)
{
for (const tab of this.tabs)
{
if (tab.origName === this.selectedInterface.id)
{
this.selectedTab = tab.name;
const tabComponent = document.getElementById(tab.origName);

if(tabComponent != null)
{
const tabElement = tabComponent.children[0];

for (const child of tabElement.children)
{
if (child.textContent.includes(` ${method.name}(`) || child.textContent.includes(` ${method.origName}(`))
{
child.scrollIntoView();
}
}
}
}
}
}
}
}
Expand All @@ -67,7 +97,7 @@
<th>Notes</th>
<th>Format Address</th>
</tr>
<tr style="cursor: pointer" v-if="selectedInterface" v-for="(method, index) in selectedInterface.methods" @click="selectedMethod = method"
<tr style="cursor: pointer" v-if="selectedInterface" v-for="(method, index) in selectedInterface.methods" @click="selectedMethod = method; jumpDecompiled(method)"
:class="{ Selected: selectedMethod == method }">
<td>{{ index }}</td>
<td v-if="selectedInterface && editMethod != method.addr" @dblclick="enableEditing(method.addr, 'Method', method.name)">{{ method.name }}</td>
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/ProcessPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
{
return {
lastTabLength: 0,
selectedTab: 'Processes',
timer: null,
editTab: null,
}
Expand All @@ -21,11 +20,11 @@
setup()
{
const store = processStore();
const { processTree, refreshTimer, tabs } = storeToRefs(store)
const { selectedTab, processTree, refreshTimer, tabs } = storeToRefs(store)

const offlineMode = (import.meta.env.VITE_OFFLINE_MODE != 0) ? true : false;

return { store, processTree, refreshTimer, tabs, offlineMode }
return { store, processTree, refreshTimer, tabs, offlineMode, selectedTab }
},

components: {
Expand Down
Loading