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

How to add blocklist like * .tar.gz #94

Open
Elimelech opened this issue Jan 10, 2022 · 4 comments
Open

How to add blocklist like * .tar.gz #94

Elimelech opened this issue Jan 10, 2022 · 4 comments

Comments

@Elimelech
Copy link

Hi!
How to download files like archives, for example: dsi.ut-capitole.fr/blacklists/download/phishing.tar.gz

@hectorm
Copy link
Owner

hectorm commented Jan 11, 2022

Currently hBlock only supports plain text lists, adding support for compressed lists is not a priority for me right now, but I leave this issue open in case I implement it in the future.

@Elimelech
Copy link
Author

#!/bin/sh

I wrote a simple script:

export DISPLAY=:0.0;

su luba -c "notify-send 'Attention!' 'update deny.list'";
sleep 3
cd /tmp
mkdir /hblock
curl -o /tmp/hblock/phishing.tar.gz 'http://dsi.ut-capitole.fr/blacklists/download/phishing.tar.gz' ;
cd /tmp/hblock/
tar -xvzf /tmp/hblock/phishing.tar.gz ;
mv -f /tmp/hblock/phishing/domains /etc/hblock/deny.list;
chmod 644 /etc/hblock/deny.list;

@hectorm
Copy link
Owner

hectorm commented Jan 14, 2022

Based on your use case you can also make this one-liner:

curl -fsSL 'https://dsi.ut-capitole.fr/blacklists/download/phishing.tar.gz' | tar -xzO 'phishing/domains' | hblock -D-

@vdbhb59
Copy link

vdbhb59 commented Apr 5, 2023

https://dsi.ut-capitole.fr/blacklists

I am not a coder, so excuse my question here, but do help if you can pls.

  1. The above line, how does it get implemented/added/appended in the final hblock output?
  2. The site: https://dsi.ut-capitole.fr/blacklists/ has several nice blocklists, and I would like to add these to my list.
  3. Any idea also of how to get it to download daily and update the actual hosts output via a cron job? (download, extract, and proper the data from the tar-folder into the output file)

I know these maybe a bit extra questions, but they are nice to add. Also, I have these on a shared hosting, so I do not have root access, but I am able to run hblock via cron daily.
:)

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

No branches or pull requests

3 participants