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

Snap-Chromium eating disk space #200

Open
bouncingcandle opened this issue Sep 24, 2023 · 2 comments
Open

Snap-Chromium eating disk space #200

bouncingcandle opened this issue Sep 24, 2023 · 2 comments

Comments

@bouncingcandle
Copy link

Describe the bug
As Snap Chromium is used for GoWitness, it will fill up the '/tmp' directory until is has either finished or disk usage is at 100%.

To Reproduce
Steps to reproduce the behaviour:

  1. Have a list of subdomains 9190 lines long
  2. Have 9GB of disk space free
  3. Run GoWitness
  4. Wait for Subdomain on line ~4713 to be reached
  5. See process has hung and disk usage is 100%

Expected behaviour
Disk not the be filled up and clutter to be automatically removed.

Version Information:

  • OS: Ubuntu 20.04.6
  • gowitness: 2.5.0

Additional context
I have a list of 9190 subdomains. My tmp folder was empty, as I had just recently restarted my server. Upon checking back a day later, I noticed it had hung and when checking my disk usage, I was a 100% with 6.9GB '/tmp' folder, 6.9GB of which being '/tmp/snap-private-tmp/snap.chromium'. I checked what line the last subdomain was at, and it only made it to line 4713 before reaching 100% disk usage.

@bouncingcandle
Copy link
Author

I should also add that in '/tmp/snap-private-tmp/snap.chromium/tmp' I have 2756 folders of 'chromedp-runner' profiles.

@bouncingcandle
Copy link
Author

I just want to add my workaround just in case anyone faces the same issue, it may not be desirable but it works:
DISCLAIMER: Only do this is you're ONLY using Snap Chromium for GoWitness. This will delete any profiles or runners you have setup for your headless Chromium or other tools/scripts.

Add user ALL=(ALL:ALL) NOPASSWD: /bin/rm -rf /tmp/snap-private-tmp/snap.chromium to the bottom of /etc/sudoers

Before running GoWitness:

mkdir "https-split" && cd "$_"
split -l 500 "../https.txt"
cd ..

Then run GoWitness with:

for file in https-split/*; do
  gowitness file -X 2560 -Y 1440 -F -f "$file" -t 1
  sudo rm -rf /tmp/snap-private-tmp/snap.chromium*
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant