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

Commit

Permalink
bugfix: missing icon in app list
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiChou committed Aug 7, 2018
1 parent 6e98c44 commit 3648884
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
extends: 'airbnb-base',
rules: {
semi: 0,
'nonblock-statement-body-position': 0,
'no-console': 0,
'class-methods-use-this': 0,
'space-before-function-paren': 0,
Expand Down
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const bodyParser = require('koa-bodyparser')
const send = require('koa-send')
const Router = require('koa-router')

const { FridaUtil, serializeDevice } = require('./lib/utils')
const { FridaUtil, serializeDevice, serializeApp } = require('./lib/utils')
const channels = require('./lib/channels.js')
const { KnownError, InvalidDeviceError, VersionMismatchError } = require('./lib/error')

Expand All @@ -36,7 +36,8 @@ router
// todo: refactor me
try {
const dev = await FridaUtil.getDevice(id)
ctx.body = await dev.enumerateApplications()
const apps = await dev.enumerateApplications()
ctx.body = apps.map(serializeApp)
} catch (ex) {
if (ex.message.startsWith('Unable to connect to remote frida-server'))
throw new InvalidDeviceError(id)
Expand Down
2 changes: 1 addition & 1 deletion gui/src/views/Inspect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default {
},
createSocket() {
let { device, bundle } = this.$route.params
return io('/session', { path: '/msg', query: { device, bundle } })
return io('/session', { path: '/msg', query: { device, bundle }, transports: ['websocket'] })
.on('attached', console.info.bind(console))
.on('close', console.warn.bind(console))
.on('disconnect', () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ channels.session.on('connection', async(socket) => {
const apps = await dev.enumerateApplications()
app = apps.find(item => item.identifier === bundle)
if (!app) throw new Error('app not installed')

socket.emit('app', {
device: serializeDevice(dev),
app: serializeApp(app),
Expand Down

0 comments on commit 3648884

Please sign in to comment.