gasmask icon indicating copy to clipboard operation
gasmask copied to clipboard

Hack to change 127.0.0.1 into 0

Open TraderStf opened this issue 10 years ago • 7 comments

Hello,

Is it possible to quickly hack/change/hex edit 127.0.0.1 into 0? To use 0 instead of 127 on each line.

Only the first 4 lines perhaps needs 127 I think.

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

Just that new compilation would be great.

So the editor does not highlight 0, see my other post about rather using 0.

TraderStf avatar Apr 08 '15 11:04 TraderStf

Theres lists that contain both versions zero and 127... http://someonewhocares.org/hosts/zero/hosts or you can just do a replace txt string to find 127.0.0.0 and replace it with 0.0.0.0 instead. I think even text wrangler can do it but if not just get sublime Text I know for sure that one does it.

RaDeleon avatar Dec 14 '15 03:12 RaDeleon

Thank you, I do it with BBEdit.

TraderStf avatar Dec 14 '15 06:12 TraderStf

You can do that in Gas Mask by using ⌘+F and typing 127.0.0.0 in the Find box, and 0.0.0.0 in the Replace box, then click Replace All.

GitTheHellOutaHere avatar Apr 28 '16 09:04 GitTheHellOutaHere

A single 0 is enough, save a lot of space, in Yosemite and El Capitain at least. Syntax will set it in red though. Safari does not need to be restarted (even if you edit manually the host file) Several domains can be on the same line but need to check the limit, different by browser (eg. M$ IE)

TraderStf avatar Apr 28 '16 09:04 TraderStf

No red in my hosts file - it's all black & white. Depends on your editor, I suppose (I don't use one).

I use the list (updated monthly) from http://winhelp2002.mvps.org/hosts.htm, to which I've added many of my own entries in a separate section.

You can view the list in text form, so I copy & paste over the old list right in the Gas Mask window.

GitTheHellOutaHere avatar Apr 28 '16 13:04 GitTheHellOutaHere

Red is inside gasmask editor. There are a lot of lists...

update daily: http://someonewhocares.org/hosts/

update ~3 weeks https://sourceforge.net/projects/adzhosts/

And all those you can find in all adblockers settings or website.

It depends of what you want, you can also use http://disconnect.me https://www.ghostery.com http://kablock.com http://lanceli.github.io/redirector/

adguard, littlesnitch, handsoff!, murus...

some VPN include some protection/filter cyberghost, zenmate

some DNS Resolvers also, one eg. https://dns.norton.com/homeuser.html https://www.opendns.com/home-internet-security/

Lots of possibilities.

TraderStf avatar Apr 28 '16 16:04 TraderStf

The only red color I've seen inside G.M. are the underlines from my spellchecker.

I've now switched from using the host file I previously linked to, to one from Steven Black, which merges several popular lists and removes the duplicates. https://github.com/StevenBlack/hosts

Steven's Unified Hosts File with Base Extensions list combines: The Adaway list. MVPs.org's list. Dan Pollock's list. Malware Domain List. Peter Lowe's list. Steven's own small list.

There are also several variant lists on the project page:

Host file recipe................................................Unique domains Unified hosts = (adware + malware)......................26,804 Unified hosts + gambling........................................27,519 Unified hosts + porn...............................................32,065 Unified hosts + social..............................................27,034 Unified hosts + gambling + porn.............................32,780 Unified hosts + gambling + social...........................27,749 Unified hosts + porn + social..................................32,295 Unified hosts + gambling + porn + social................33,010

I'll be trying out some of these variants.

GitTheHellOutaHere avatar Apr 28 '16 23:04 GitTheHellOutaHere