Skip to content

Commit

Permalink
readme, 1.4.0-RC2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnybod committed Oct 13, 2020
1 parent 840368e commit 2f4f44c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
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).

## [1.4.0] - 2020-10-12
- Added real-time notifications new listeners and agents [#49](https://github.com/BC-SECURITY/Starkiller/pull/49)
- Log out the user when a connection can't be established to the Empire server

## [1.3.2] - 2020-07-29
- "Listener" option on modules now shows up as a dropdown instead of a textfield
- Correct some of the "cannot read property data of undefined" errors
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -40,6 +40,7 @@ Starkiller’s new features occasionally depend on new functionality within Empi
| 1.1.x | 3.1.5 | 3.1.5 updated the reporting endpoint to have the same result as running it in the CLI. Starkiller 1.1.x uses that reporting endpoint for the reporting tab |
| 1.2.x | 3.2.0 | 3.2.0 added an endpoint for users that is needed for the UI updates introduced in Starkiller 1.2.0
| 1.3.x | 3.3.0 | 3.3.0 categorized all of the modules in Empire with corresponding [MITRE techniques](https://attack.mitre.org/techniques/enterprise/)
| 1.4.x | 3.5.0 | 3.5.0 added real-time notifications for new listeners and agents

## Changelog

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "starkiller",
"version": "1.4.0-RC1",
"version": "1.4.0-RC2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
11 changes: 8 additions & 3 deletions src/App.vue
Expand Up @@ -3,7 +3,7 @@
<v-app :dark="isDarkMode">
<side-nav v-if="isLoggedIn" />
<confirm ref="confirm" />
<socket-notifications />
<socket-notifications v-if="isLoggedIn && versionSatisfies('>=3.5.0')" />

<!-- Sizes your content based upon application components -->
<v-main>
Expand Down Expand Up @@ -82,9 +82,9 @@ export default {
empireVersion: {
handler(val) {
if (val.length > 0) {
if (!semver.satisfies(val.split(' ')[0], '>=3.3.0')) {
if (!semver.satisfies(val.split(' ')[0], '>=3.5.0')) {
this.$toast.error(
'Starkiller 1.3.x is recommended to be used with Empire 3.3.0 or greater.'
'Starkiller 1.4.x is recommended to be used with Empire 3.5.0 or greater.'
+ ' Some features may not work properly.',
{ timeout: 8000 },
);
Expand All @@ -102,6 +102,11 @@ export default {
this.$router.push({ name: 'listeners' });
}
},
methods: {
versionSatisfies(version) {
return semver.satisfies(this.empireVersion.split(' ')[0], version);
},
},
};
</script>
<style lang="scss">
Expand Down
4 changes: 4 additions & 0 deletions src/api/axios-instance.js
Expand Up @@ -21,6 +21,10 @@ export function setInstance(url, token) {
axiosInstance.interceptors.response.use(
response => response,
(err) => {
if (!err.response) {
// check your connection
store.dispatch('application/logout');
}
if (err.response.status === 401) {
store.dispatch('application/logout');
}
Expand Down
26 changes: 15 additions & 11 deletions src/components/SocketNotifications.vue
Expand Up @@ -50,14 +50,15 @@ export default {
},
},
watch: {
socketUrl(val) {
isLoggedIn(val) {
if (val === true && !this.socket) {
this.connect();
this.setHandlers();
}
},
socketUrl() {
if (this.isLoggedIn && !this.socket) {
this.socket = io(`${val}?token=${this.apiToken}`, {
reconnection: true,
reconnectionAttempts: 10,
reconnectionDelay: 1000,
reconnectionDelayMax: 10000,
});
this.connect();
this.setHandlers();
} else {
console.log('Closing Socket');
Expand All @@ -68,16 +69,19 @@ export default {
},
mounted() {
if (!this.socket && this.socketUrl && this.isLoggedIn) {
this.connect();
this.setHandlers();
}
},
methods: {
connect() {
this.socket = io(`${this.socketUrl}?token=${this.apiToken}`, {
reconnection: true,
reconnectionAttempts: 10,
reconnectionDelay: 1000,
reconnectionDelayMax: 10000,
});
this.setHandlers();
}
},
methods: {
},
setHandlers() {
this.socket.on('listeners/new', (data) => {
this.socketNotification = {
Expand Down

0 comments on commit 2f4f44c

Please sign in to comment.