From 51a1e8392e039aa671efce2a73dc20cadb1a14fb Mon Sep 17 00:00:00 2001 From: Abhishek Anand Date: Wed, 14 Feb 2024 21:21:08 +0530 Subject: [PATCH] v0.2 fixes --- dist/index.js | 9 +-------- src/intercept.js | 2 -- src/main.js | 4 +--- src/summary.js | 3 --- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/dist/index.js b/dist/index.js index d6356a2..45a7f91 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4206,8 +4206,6 @@ addons = [Interceptor()] # pylint: disable=invalid-name fs.writeFileSync('intercept.py', interceptDotPy) } -createInterceptDotPy("bolt") - module.exports = { createInterceptDotPy } @@ -4251,7 +4249,7 @@ async function run() { core.info("Reading inputs... done") core.info('Installing mitmproxy...') - await exec(`sudo -u ${boltUser} -H bash -c "cd ~ && pip install --user ${boltUser} --quiet"`) + await exec(`sudo -u ${boltUser} -H bash -c "cd ~ && pip install --user mitmproxy --quiet"`) core.info('Installing mitmproxy... done') core.info('Create bolt output file...') @@ -4298,8 +4296,6 @@ async function run() { core.startGroup('run-bolt') core.info('Starting bolt...') - await exec("sudo cat /etc/systemd/system/bolt.service") - await exec(`/home/${boltUser}/.local/bin/mitmdump --mode transparent --showhost --set block_global=false -s /home/${boltUser}/intercept.py`) await exec('sudo systemctl start bolt') core.info('Waiting for bolt to start...') @@ -4401,9 +4397,6 @@ function getUniqueBy(arr, keys) { } async function summary() { - - await exec('sudo cat /home/bolt/bolt.log') - await exec('sudo cat /home/bolt/bolt-error.log') const boltUser = core.getState('boltUser') const mode = core.getInput('mode') const allow_http = core.getInput('allow_http') diff --git a/src/intercept.js b/src/intercept.js index 64a8072..4f431b0 100644 --- a/src/intercept.js +++ b/src/intercept.js @@ -218,6 +218,4 @@ addons = [Interceptor()] # pylint: disable=invalid-name fs.writeFileSync('intercept.py', interceptDotPy) } -createInterceptDotPy("bolt") - module.exports = { createInterceptDotPy } diff --git a/src/main.js b/src/main.js index c510191..e027987 100644 --- a/src/main.js +++ b/src/main.js @@ -33,7 +33,7 @@ async function run() { core.info("Reading inputs... done") core.info('Installing mitmproxy...') - await exec(`sudo -u ${boltUser} -H bash -c "cd ~ && pip install --user ${boltUser} --quiet"`) + await exec(`sudo -u ${boltUser} -H bash -c "cd ~ && pip install --user mitmproxy --quiet"`) core.info('Installing mitmproxy... done') core.info('Create bolt output file...') @@ -80,8 +80,6 @@ async function run() { core.startGroup('run-bolt') core.info('Starting bolt...') - await exec("sudo cat /etc/systemd/system/bolt.service") - await exec(`/home/${boltUser}/.local/bin/mitmdump --mode transparent --showhost --set block_global=false -s /home/${boltUser}/intercept.py`) await exec('sudo systemctl start bolt') core.info('Waiting for bolt to start...') diff --git a/src/summary.js b/src/summary.js index 9ade70f..a718f45 100644 --- a/src/summary.js +++ b/src/summary.js @@ -54,9 +54,6 @@ function getUniqueBy(arr, keys) { } async function summary() { - - await exec('sudo cat /home/bolt/bolt.log') - await exec('sudo cat /home/bolt/bolt-error.log') const boltUser = core.getState('boltUser') const mode = core.getInput('mode') const allow_http = core.getInput('allow_http')