Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
raianand committed Feb 14, 2024
1 parent 531ef61 commit 793e5a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ async function run() {
cp.execSync('sudo cp bolt.service /etc/systemd/system/')
cp.execSync('sudo chown root:root /etc/systemd/system/bolt.service')
cp.execSync('sudo systemctl daemon-reload')
cp.execSync('sudo systemctl restart bolt')
cp.execSync('sudo systemctl status bolt')
cp.execSync('sudo systemctl start bolt')


// const runBoltCommand = `sudo -u mitmproxyuser -H bash -c "BOLT_MODE=${mode} BOLT_ALLOW_HTTP=${ allow_http} BOLT_DEFAULT_POLICY=${default_policy} $HOME/.local/bin/mitmdump --mode transparent --showhost --set block_global=false -s /home/mitmproxyuser/intercept.py &"`
Expand Down Expand Up @@ -104,6 +103,9 @@ async function run() {
await wait(ms)
core.info('Starting bolt... done')


cp.execSync('sudo systemctl status bolt')

core.endGroup('run-bolt')

core.startGroup('setup-iptables-redirection')
Expand Down
5 changes: 2 additions & 3 deletions src/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ function getUniqueBy(arr, keys) {
}

async function summary() {
await exec('sudo systemctl status bolt')
await exec('cat /home/mitmproxyuser/bolt.log')
await exec('cat /home/mitmproxyuser/bolt-error.log')
await exec('sudo cat /home/mitmproxyuser/bolt.log')
await exec('sudo cat /home/mitmproxyuser/bolt-error.log')
await exec('sudo systemctl status bolt')
const results = await generateTestResults()
const uniqueResults = getUniqueBy(results, ['domain', 'scheme']).map(
Expand Down

0 comments on commit 793e5a9

Please sign in to comment.