yashsingh1/xdaforums huggingface dataset:
[Windows 10, 8, 7, XP etc.] patrickdrd:
maybe you didn't receive a notification from my message because I didn't quote you?

anyway, the truth is that I'm running a lot of software in the background (avast antivirus, avg cleanup, malwarebytes, citrix receiver, google sync),

but as I said (I think) hostsman is running perfectly fine,

I switched to your script because I thought there was no cleanup procedure in hostsman,

but I "stole" the idea from your script and I'm using "mark all updates as not installed",

in that way I think the hosts file is created from scratch.

I'm getting "cannot save hosts file" error from time to time,

I guess because firefox is running in the background too (and thunderbird and the above mentioned processes),

but I'm retrying it and it works (there was no way to make this work in your script, I retried many times).

Anyway, the above process is very fast too,

way faster than what I experienced using your script, sorry
[Windows 10, 8, 7, XP etc.] Makorus:
[MENTION=6532336]patrickdrd[/MENTION] Could be, I unsubscribed and re-subscribed this thread now. I'll see if I get notifications from now on.

I really think that one of your security software is interfering somehow. As it's bloody difficult for me to reproduce your issue without more information on your behalf. Executing this script (as is) on many different systems works perfectly fine for me and it's quick as hell. Also many other users haven't reported a similar issue so far. I've got a 20 Mbps internet connection here, the script finishes on my system within 15 seconds. Therefore I doubt questioning this script is the right approach. But of course, if you found a faster way yourself, then I'm glad for you. But so far there's nothing else I could change to satisfy your needs because I really don't see any buffer in this case. Sorry mate! :cowboy:
[Windows 10, 8, 7, XP etc.] Megalexer:
remove

hi, how can i undo the scipt i want to go to a website that it seems to be blocking
[Windows 10, 8, 7, XP etc.] androcraze:
Look for "whitelist":

https://xdaforums.com/showpost.php?p=70494890&postcount=82
[Windows 10, 8, 7, XP etc.] Poor Grammar:
Windows ?

Will this work with windows ?..
[Windows 10, 8, 7, XP etc.] araxhiel:
Not quite sure what do you mean, but yes, this works with Windows. As a matter of fact I've been using it on machines with W7 and W10.

Regards
[Windows 10, 8, 7, XP etc.] Makorus:
This is a PowerShell script, which runs basically on any Windows device (XP & Vista not supported of course). ;)
[Windows 10, 8, 7, XP etc.] t0ma5:
great script! thanks dev!!!!

I have been using HOSTSMAN for years but it was never my favorite since it is quite "clumsy"

I will now give this other option a try as well although last update was in 2017: http://blog.zhangruipeng.me/Hozz/
[Windows 10, 8, 7, XP etc.] t0ma5:
No log is created neither HOSTS file in the script's folder...

Running as admin on W10

Successfully finished apply process!
Creating new 'hosts'-file...
---> !!! ATTENTION !!! <---
An unexpected error has occurred!
---> !!! ATTENTION !!! <---

EDIT: found out what the problem was! The Script does not work if the file path name contains certain characters, in my case: space _ [ ]

Thanks again,

best script

to update HOSTS I have tried so far...
[Windows 10, 8, 7, XP etc.] rey_lagarto:
Hi, I have a question.

The Aliexpress website, I put it on the white list, and I can access it, but it doesn't show me a single image.

Is it possible to correct this by adding another address to the whitelist?

Thank you.
[Windows 10, 8, 7, XP etc.] araxhiel:
Hi Rey Lagarto.

I had take a look at that site, and it seems that you're correct with thinking that you need to whitelist another site, alicdn.com (I've used uMatrix to see which domains where involved with the site):

[IMG="uMatrix Detected domains"]https://i.imgur.com/qRLGhnL.png[/IMG]

I have "whitelisted" that domain, and the images were loaded as expected, but keep in mind that it can be used to send more than just images.

Also, keep in mind that nowadays it seems that many websites make use of external sites to serve content (CDNs) just like this one, or fbcdn.net (for Facebook stuff), and this means that even if you whitelist the main site, it could be needed to whitelist the CDN too to get it work right.

Kind regards.
[Windows 10, 8, 7, XP etc.] patrickdrd:
why can't I download any of the following lists?

https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser
https://zerodot1.gitlab.io/CoinBlockerLists/list.txt

from the browser they work fine,

ps adblock resposnds with:

---> !!! Source "https://zerodot1.gitlab.io/CoinBlockerLists/list.txt" seems to be offline !!! <---

(same message for both of them)
[Windows 10, 8, 7, XP etc.] KingRanger984:
Man, thanks for this script! May god bless you and this script! :)
[Windows 10, 8, 7, XP etc.] Makorus:
Hey there!

First of all, so sorry for my late reply. I managed to dismiss the notification on my phone screen about this thread and completely forgot about it.

Your issue seems to be related to Windows Defender, which is kind of strange as I'm a Defender user myself. Try to exclude your PS_AdBlock folder via Windows Security (see: https://support.microsoft.com/en-us/help/4028485/windows-10-add-an-exclusion-to-windows-security). This should do the trick.

Sorry again! Take care & stay healthy!
[Windows 10, 8, 7, XP etc.] Makorus:
Hey there!

I am so terribly bad at this, I'm so sorry, I managed to overlook your post.

Do you still have that issue?

Would you mind sharing your Internet Explorer' security settings with us? Might be a TLS-related issue, that's why I'd like to compare your settings to mine.

Sorry again for the inconvenience.
[Windows 10, 8, 7, XP etc.] Makorus:
Hey there!

Sorry for my late response. I myself have never used Aliexpress, so I can't tell for sure. My wildest guess would be something like a content delivery network, CDN, multiple domains. Try to search the website's source code for "img" tags and have a look at the source attribute, this will very likely be a different domain. Simply whitelist that one too and it should be working by then.
[Windows 10, 8, 7, XP etc.] patrickdrd:
I don't remember changing these settings, anyway there you go
[Windows 10, 8, 7, XP etc.] Makorus:
Hmm... Would you try changing your SSL/TLS settings (see attached screenshot) as follows:

[] Use SSL 3.0

[X] Use TLS 1.0

[X] Use TLS 1.1

[X] Use TLS 1.2

[] Use TLS 1.3

I added both "https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser" and "https://zerodot1.gitlab.io/CoinBlockerLists/list.txt" to my hostslist and using the settings above, I'm able to download all files.
[Windows 10, 8, 7, XP etc.] Makorus:
Hey there, I managed to overlook your post as well, sorry for that, mate!

Weird, spaces and underscores within the entire path should be handled correctly in my opinion. Are you using the most recent version of PsAdBlock?
[Windows 10, 8, 7, XP etc.] Makorus:
Hi everyone,

I want to apologise for my late replies. This project isn't dead, I have been just very occupied with tons of other work. I'm working on a new update and I'm planning to release future ZIP files directly via "GitHub releases".

Also, I'm trying to handle the new Windows 10 "Windows Security" issue. For those who are unaware: Windows Security now throws an error when executing PsAdBlock.

Excluding the entire PsAdBlock folder via Windows Security app works for now. However, I'd rather check different approaches to fix this issue. Give me some time, I might come up with a solution. Let's see.
[Windows 10, 8, 7, XP etc.] patrickdrd:
that's what I have, internet explorer 11
[Windows 10, 8, 7, XP etc.] Makorus:
Hmm, I don't even have that option for SSL 2.0 :p Can you try enabling that one?
[Windows 10, 8, 7, XP etc.] patrickdrd:
nope:

Downloading hosts file to: D:\PS-AdBlock\DL_Cache\54_source-hosts.txt
---> !!! Source "https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser" seems to be offline !!! <---
Trying next one...
[Windows 10, 8, 7, XP etc.] t0ma5:
yes. I use V1.6.5, 2018-07-03
[Windows 10, 8, 7, XP etc.] Makorus:
[MENTION=7567973]t0ma5[/MENTION] cpuld ypu please share your full path (where your PsAdAway binaries are stored) with me? Simply replace personal information with placeholders, e.g. C:\Users\myself\Desktop\....

[MENTION=6532336]patrickdrd[/MENTION] try the following command and share your output here:

nslookup zerodot1.gitlab.io 1.1.1.1
[Windows 10, 8, 7, XP etc.] Makorus:
[MENTION=7567973]t0ma5[/MENTION] could you please share your full path (where your PsAdAway binaries are stored) with me? Simply replace personal information with placeholders, e.g. C:\Users\myself\Desktop\...., I'd like to try to reproduce that issue.

[MENTION=6532336]patrickdrd[/MENTION] try the following command and share your output here:

nslookup zerodot1.gitlab.io 1.1.1.1
[Windows 10, 8, 7, XP etc.] patrickdrd:
nslookup zerodot1.gitlab.io 1.1.1.1
Server: one.one.one.one
Address: 1.1.1.1

Non-authoritative answer:
Name: zerodot1.gitlab.io
Address: 35.185.44.232
[Windows 10, 8, 7, XP etc.] Makorus:
I'll post a new release soon which should fix that. I'll let you know.

Hmm, ok next try. please post the output from following commands in PowerShell:

[Net.ServicePointManager]::SecurityProtocol
[Net.SecurityProtocolType]
[enum]::GetNames([Net.SecurityProtocolType])

Then try the following command which forces current PowerShell session to use TLS 1.2 (so, this is a temporary change only, no worries):

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

After that, run the PowerShell script from the same PowerShell console and see if it succeeds this time.
[Windows 10, 8, 7, XP etc.] patrickdrd:
nope, still no success..

[Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls
[Net.SecurityProtocolType]

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True SecurityProtocolType System.Enum

[enum]::GetNames([Net.SecurityProtocolType])
SystemDefault
Ssl3
Tls
Tls11
Tls12
Tls13

Downloading hosts file to: D:\Utilities\PortableApps\HostsmanPortable\PS-AdBlock\DL_Cache\54_source-hosts.txt
---> !!! Source "https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser" seems to be offline !!! <---
[Windows 10, 8, 7, XP etc.] patrickdrd:
I replied, maybe you didn't see it because I didn't quote you?

anyway, I'm quoting you now
[Windows 10, 8, 7, XP etc.] Clamtacos:
Great stuff, worked exactly as expected in Windows 10 Pro 20H2 with Powershell 5.
[Windows 10, 8, 7, XP etc.] patrickdrd:
strange,

I can't download anything from

https://raw.githubusercontent.com/*

what could be wrong?
[Windows 10, 8, 7, XP etc.] araxhiel:
There's any Error Message displayed, or something like that? Or is just like in previous comments where you receive an error about the source being offline?

I ask as I periodically run this script, and pull quite a few sources from that domain, and have no problems at all.
[Windows 10, 8, 7, XP etc.] patrickdrd:
yes, it just says the source is offline :(
[Windows 10, 8, 7, XP etc.] araxhiel:
Ok... Uhm, can we try something?

(DISCLAIMER: I'll apologize beforehand for the wall of text)

Could you run the following code on a Powershell console, and see if it returns any message?:

try { (New-Object System.Net.WebClient).DownloadFile("[LINK]", "test.txt") } catch [System.Net.WebException], [System.Exception] { Write-Warning $Error[0] }

That snippet of code is basically the same as the one internally used on the PS_AdBlock.ps1 file, but slightly modified to return the actual error message. It's a simple try..catch clause that attempts to do something (whatever is inside the try), and in case that something goes wrong, it does whatever is inside the catch part.

So, inside those "sections" we have the following:

(New-Object System.Net.WebClient).DownloadFile("[LINK]", "test.txt") - This attempts to download the hosts file, and save it as test.txt (without quotes). PLEASE REPLACE [LINK] with the correct URL for the host file that you are trying to download, and keep the quotes, those are required. Please note that, as far as I have tested, the test.txt file is saved on your local profile (i.e. C:\Users\YOUR_PROFILE), and although it could be not the ideal, for testing purposes it's somewhat irrelevant.

Write-Warning $Error[0] - This writes, or displays, the actual error message on the Powershell console.

That should either give us a more detailed error message, and therefore, a better idea what's going wrong on your end, or it should be able to download the file.

Using that syntax, the error message should be displayed something like this:

PS C:\> try { (New-Object System.Net.WebClient).DownloadFile("https://raw.githubusercontent.com/greatis/Anti-WebMiner/master/hosts_", "test.txt") } catch [System.Net.WebException], [System.Exception] { Write-Warning $Error[0] }
WARNING: Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."

In that example, I modified the file to download, adding an underscore at the end of the name of the file (hosts_) to force a "Not Found". The error message was printed below the try..catch, and it clearly states that the remote server returned an error message.

I am hoping that something like that (although not the very exact message) would be displayed on your end, and that could give us any idea about whats going on.

Please let me know if you have any questions.

Kind regards.
[Windows 10, 8, 7, XP etc.] patrickdrd:
@araxhiel

WARNING: Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."

it worked after adding

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

so I added it on top of the PS_AdBlock.ps1 and it finally worked,

the previous url still doesn't work though:

PS C:\Users\xxx> try { (New-Object System.Net.WebClient).DownloadFile("https://zerodot1.gitlab.io/CoinBlockerLists/hos
ts_browser", "test.txt") } catch [System.Net.WebException], [System.Exception] { Write-Warning $Error[0] }
WARNING: Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS
secure channel."

anyway I download this one manually

edit: I never received a quote notification (email) like I used to, maybe these stopped?

and they only work through the app?

I tried once to install this famous app and it was bs, play store rating of 1.8 says it all I think,

please bring back tapatalk guys, or at least enable email notifications for quotes!
[Windows 10, 8, 7, XP etc.] araxhiel:
@patrickdrd

Hey there,

Glad to hear that at least part of the issue was solved.

Now, based on you previous comments, can we try something else?

I was taking a look at that error, and I found this StackOverflow answer which, basically, expands a little further what you have already done. So, instead using [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12, you could use

[Net.ServicePointManager]::SecurityProtocol = "tls13, tls12, tls11, Ssl3, Tls"

(Please note that I'm adding Ssl3, Tls at the end as this was already present on your system, as per your previous comment)

Based on my current configuration (see below), I think that such configuration change could be helpful on your issue, as I haven't had any issues while downloading the hosts file from Gitlab (I did a test a few moments ago).

PS C:\> [System.Net.ServicePointManager]::SecurityProtocol
Tls, Tls11, Tls12

Hope that helps.

Kind regards,
[Windows 10, 8, 7, XP etc.] patrickdrd:
@araxhiel nope :(

PS C:\Users\xxx> [Net.ServicePointManager]::SecurityProtocol = "tls13, tls12, tls11, Ssl3, Tls"
PS C:\Users\xxx> try { (New-Object System.Net.WebClient).DownloadFile("https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser", "test.txt") } catch [System.Net.WebException], [System.Exception] { Write-Warning $Error[0] }
WARNING: Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."

meanwhile I'm having trouble whitelisting the script in kaspersky,

I tried whitelisting powershell.exe, PS_AdBlock.ps1, nothing :(

I'm getting "Trojan.Win32.Hosts2.gen" alerts when downloading is about to start and

I have to click twice (!!) in order to start,

I'll post on their forum as well
[Windows 10, 8, 7, XP etc.] araxhiel:
Damn, @patrickdrd , that's not good... I can't think on anything else to try to fix that, as it seems that there's some "funny" stuff going on on your end/environment. I'm sorry not being able to help you further (or, at least not until I can think on something else, or find more info).

And yeah, I remember those Kaspersky errors LOL - IIRC the error itself is not against Powershell, or the script itself, but against the host file.

I can't remember right now the exact root cause for that, but I hope that you'll be able to find a solution (I used to have that issue some years ago, and have moved on from Kaspersky as it was causing me a lot of other issues with BT devices).
[Windows 10, 8, 7, XP etc.] patrickdrd:
it seems that the gitlab issue was a url issue,

I changed it from

https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser

to

https://gitlab.com/ZeroDot1/CoinBlockerLists/-/raw/master/hosts_browser

and it worked,

also kaspersky support replied that they acknowledged the false alarm and they will have fixed it by tomorrow,

so all issues resolved :)

thanks for your help @araxhiel
[Windows 10, 8, 7, XP etc.] araxhiel:
Hey @patrickdrd ,

Glad to hear that the issue is now solved. Awesome! Also it's great that the Kaspersky's team gave a helpful reply/solution, that's nice.

And, woah, that's a pretty weird thing, the URL change... Oh well, while it works, it should be cool LOL

Have a great day (or rest of the day).

Kind regards.
[Windows 10, 8, 7, XP etc.] Atob12:
what if i want to restore my pc to origial state with add. pls guide
[Windows 10, 8, 7, XP etc.] Makorus:
Hi there

Simply head to "C:\Windows\System32\drivers\etc". There you should find multiple "hosts" files:

- "hosts" - the current one which should be much larger in size than the others

- "hosts.old" - the previous version of your current "hosts" file

- "hosts.original" - a replica of the original file

All you need to do is:

1. Delete the current "hosts" file

2. Rename "hosts.original" to "hosts"

3. A prompt will appear, something like "if you change a filename extension, the file might become unusable, are you sure?" - hit "yes"
[Windows 10, 8, 7, XP etc.] persona78:
Hi!

I dont know if the same happens with you but if you add to much data in to Hosts file, Windows take to much time to connect to Internet when initiating because is reading Hosts file...

I had to delete half of the file data to go back to "normal".
[Windows 10, 8, 7, XP etc.] psychoela:
please help guys
[Windows 10, 8, 7, XP etc.] holistone:
I just ran the _Run_Admin.bat on a Win 11 machine and the resulting hosts file contained a large amount of html "garbage" at the start and end.

If I edit out the html it seems to work fine, but there is clearly a problem with the script. The file is too large to include here but I do have links to Google Drive:

hosts

LogFile_PS_AdBlock.ps1.log

Any suggestions?
[Windows 10, 8, 7, XP etc.] wombatch:
I just installed the script and have this too. It seems to be a load of **** from "http://www.malwaredomainlist.com/hostslist/hosts.txt" but this site doesn't seem to exist anymore and reroutes to "https://www.namecheap.com".

Looking at the **** it puts in the front (end end) of the hosts file it seems to be transmitting an ID to a data collection service??? (I'm really not sure about that, just looking at where the file points too) I removed this "malwaredomainlist.com" entry from the "hostlists.ini" and the hosts file looks a lot better (I am always wary of stuff with xxx.com as an ID anyway). I'll check what adaway on android uses and probably include those.
[Google Chromecast] Majik895:
First of all if someone else asked about this I apologize, I searched and found nothing on the matter.

What I am trying to do is to bypass the Google DNS for the Chromecast. The RG for AT&T is a Motorola NVG589 Serial Number	255307917359184 Software Version	9.1.0h12d34 I do not want to use a VPN and I am not sure on using a dynamic DNS service. With the millions of people who use the lame AT&T I cannot believe that there is not a work around for the Chromecast. I do not have the money to use any services for this so if you want to say that $5 is cheap please. Try being disabled and living off that. All I want to do is make the Chromecast region free. Hola works on the PC but when you use Hola it is unable to cast the video. Don't really want to sit in front of the PC to watch a video, that's why I got a Chromecast. I have another router and have tried that but it is old and the range on it sucks. I don't have dd-wrt or tomato and according to some reading the old router I have is not flashable for that. I hate AT&T but where I live there are only two options for internet and I picked the lesser of the two evils. Really hoping Verizon FIOS comes to town but not holding my breath. Anyways back on point. Is there anyway to accomplish setting up the crap AT&T router to accomplish this? Thought about assigning the Chromecast a static IP but not sure what that would accomplish. Set up bridge mode for the CC? I just don't like paying for internet and have restrictions laid upon me. I pay for the service and it is supposed to be world wide, Says so in the address. Maybe turn my PC into a virtual router then connect that way? Any help would be appreciated.
[PDA2, XDA IIi, 2020i General] timekeeper:
Has anyone tried this with the alpine? I'm thinking of testing it out, to get VGA resolution, and it lists compatibility with the IIi. The only thing is that it may require me to hard-reset in case of problems or brick my phone.
[AT&T HTC One (M9)] BriniaSona:
Has the bell HTC m9 been rooted yet for stock android?
[AT&T HTC One (M9)] clsA:
Yes the TWRP thread is here >> http://xdaforums.com/showpost.php?p=59745198&postcount=3
[AT&T HTC One (M9)] BriniaSona:
Dumb question that's probably been asked and answered infinit times.

Are there idiot proof instructions on how to do it?

EDIT: Googled how to root bell htc m9 and it gave me this thread as the top search. Damnnnn.
[AT&T HTC One (M9)] clsA:
You unlock the bootloader at htcdev.com

You flash TWRP 2.8.6.4 beta

You make a nandroid backup from within TWRP.

Next reboot recovery and choose yes to root

Next choose reboot system and choose yes to root

After the phone boots up go to SuperSU

It will ask to update say yes choose TWRP

When it reboots your rooted
[AT&T HTC One (M9)] BriniaSona:
When I go to the HTC Dev site, it doesnt give me the option for M9, just the M7 and M8. I went down to All Other Models, and then I get stuck at option 2

""Step 2

Use the Volume buttons to select up or down. Highlight Fastboot and press the Power button""

This option isnt there

""

System Info

Show Barcode

Reboot to Bootloader

Reboot to Download Mode

Reboot

Power Down""

Which do I select?
[AT&T HTC One (M9)] clsA:
Download mode
[AT&T HTC One (M9)] BriniaSona:
https://www.youtube.com/watch?v=Stl4A-ue5IE

this was the perfect tutorial for anyone else looking. I don't know android rooting at all and I followed this perfectly.

Now onto step 2

How do you flash things, it might be frustrating answering me when the web has 23847239472 different showings on how to do it. But I want help here so I don't mess things up.

EDIT: No, no, how do you do all the next instructions after you've unlocked the bootloader. Like everything with detailed how to's and links. I don't want to brick the phone. And I don't need to be stress raging anymore than I am now. I'm no developer, I just want the stock android experience on my Bell M9.

EDIT: all of the video's Ive seen, are for GSM. is the Bell one GSM or CDMA?
[AT&T HTC One (M9)] BriniaSona:
TWRP is installed 2.8.6.4. I am inside the recovery now. But the touchscreen doesnt work, and I cant power the device off.

It is now fully rooted. Took a while, but I did it.