PDA

View Full Version : Bad Ip Ranges Updater



VB
07-29-2003, 12:59 PM
A small stand-alone tool with the following functionality:


- It should download two textfiles. The urls of these textfiles are stored in an INI file.
- The first textfile contains 3 lines. The first to lines are the urls of the textfiles (to keep the INI up-to-date). The third line contains the date of the latest version of the second textfile. This should be compared to a value stored in the ini file to see if the second textfile needs to be downloaded or not.
- The second textfile contains IP ranges just like the file that is currently used by KL does.
- The current file should be replaced by the downloaded file (#2) if there is a newer version. (filename should not change!)


Instead of a stand-alone program, it might be better as a plugin for KL Extensions. It should add a menu item to Options to update the blocklist (or access the GUI of the plugin if it has one).


Extra functionality that could be added after the initial release:

- GUI (with update button, date of current blocklist)
- Option to manually add an IP or IP range. This should be stored in a separate textfile and merged with the blocklist after each update.

aldo
07-29-2003, 03:13 PM
Check:
http://www.aldostools.com/temp/badipupdater.zip

The file include an example of the client-side ini (updater.ini) and the server-side info file (serverside.txt)

Notice that the date is at the beginning of the file. This allow that future versions include more than the 3 alternative URLs currently supported.

The program also supports the command line parameters:
/quiet = do not show the popup message when the file have been updated
/update = execute the updater inmediately

I have the idea of a user file that could be appended to the updated file. This way, the user can add his/her own IP ranges, without have to worry that the changes would be lost.

Note: if the BannedIPRanges.txt is read-only, it is not modified.

___
Aldo Vargas
http://www.aldostools.com

VB
07-29-2003, 06:17 PM
I have tested it.

It says 'no new file found', even though there is a newer one available on the urls that I used.

BannedIpRangesInfo.txt
2003/7/29
http://kazaalite.tech-critic.com/dl/BannedIpRanges.txt

updater.ini
[main]
BannedIPFile=C:\Program Files\Kazaa Lite K++\BannedIPs\BannedIpRanges.txt
LastUpdate=2003/6/6
url1=http://kazaalite.tech-critic.com/dl/BannedIpRangesInfo.txt

aldo
07-29-2003, 06:58 PM
I have fixed the problem. The program was expecting the text file in DOS format, not in Unix format.

Also added the option to auto-append the file UserBannedIpRanges.txt, if it exists in the same path of the updater.

Please download the file from the same URL.

___
Aldo Vargas
http://www.aldostools.com

mpman2003
07-29-2003, 06:59 PM
try this one out:

Download Link (http://edward.j.free.fr/downloads/KLite_IP_Updater.zip)
Extract the two files to the folder where the bad ip text file is and run the .bat file. norton detects it as a malicious script but all it is trying to do is create a new texte file. iff you are not convinced, rename the files to .txt and read the script.

mpman2003
07-29-2003, 07:09 PM
aldo: could you update your program so that it goes to the line after each entry in the bannedipranges.txt file?

mpman2003
07-29-2003, 07:13 PM
also could you make it update from this url:
http://www.simply-click.org/uploadertest/p...2_plaintext.asp (http://www.simply-click.org/uploadertest/pg2_plaintext.asp)
the page has doesn't only have the bad ip ranges on it so the updater should be able to filter the necesary data.

Only
07-29-2003, 07:34 PM
When I update, That create a BannedIpRanges.txt.bak file?

mpman2003
07-29-2003, 07:36 PM
it's a backup of the original bannedipranges.txt file from before the update. rename it back to .txt if you want to restore it.

Only
07-29-2003, 07:38 PM
Ok thanks :lol:

VB
07-29-2003, 07:39 PM
norton detects it as a malicious script
That's why I won't use this one.

VB
07-29-2003, 07:40 PM
@ Aldo,

It works now :D

aldo
07-29-2003, 07:57 PM
Originally posted by mpman2003@29 July 2003 - 20:09
aldo: could you update your program so that it goes to the line after each entry in the bannedipranges.txt file?
I didn't understand your request. Anyway I updated the program with the option to use the PGdb.

___
Aldo Vargas
http://www.aldostools.com

mpman2003
07-29-2003, 08:17 PM
okey i will try again:

1/can you make the BannedIPrange.txt look like this:

RIAA:208.225.90.0-208.225.90.255
OverPeer:65.160.0.0-65.160.127.225
Teosto:194.194.240.0-194.194.240.255
Ranger:216.122.0.0-216.122.255.255
(one after the other and not all stuck together.)
This makes it easier to see which IPranges have been added.

2/ The BannedIpranges file on this site http://kazaalite.tech-critic.com/dl/BannedIpRanges.txt does not seem to be as up2date as this one: http://www.simply-click.org/uploadertest/p...2_plaintext.asp (http://www.simply-click.org/uploadertest/pg2_plaintext.asp) However your program cannot update from the site as it has the .asp extension and there is this on the top of the page:


PeerGuardian 2
I P   D A T A B A S E
PeerGuardian is still undergoing testing. To report any errors or problems with the submitted IP ranges, click here. PG v1.96b should fix some of the problems people had with runtime errors, this update was forced as the project is again getting increased exposure. It's also the full installer so people won't need to email me asking where MSCOMCTL.ocx is!!;)

Clicking on an organisation name will add the profile to PeerGuardian.
Clicking on the IPs will perform a 'WhoIs' on the address to verify IP owners, etc.

Submit | Download v1.96b | PeerGuardian Version | Feedback/Comments


Plain Text Version

RIAA:208.225.90.0-208.225.90.255
OverPeer:65.160.0.0-65.160.127.225
...


In the text version of the updater can you make it ignore the introduction on the page?

aldo
07-29-2003, 08:28 PM
Originally posted by mpman2003@29 July 2003 - 21:17
okey i will try again:

1/can you make the BannedIPrange.txt look like this:

RIAA:208.225.90.0-208.225.90.255
OverPeer:65.160.0.0-65.160.127.225
Teosto:194.194.240.0-194.194.240.255
Ranger:216.122.0.0-216.122.255.255
(one after the other and not all stuck together.)
This makes it easier to see which IPranges have been added.

2/ The BannedIpranges file on this site http://kazaalite.tech-critic.com/dl/BannedIpRanges.txt does not seem to be as up2date as this one: http://www.simply-click.org/uploadertest/p...2_plaintext.asp (http://www.simply-click.org/uploadertest/pg2_plaintext.asp) However your program cannot update from the site as it has the .asp extension and there is this on the top of the page:

In the text version of the updater can you make it ignore the introduction on the page?
1) it's possible, but I'm not in the mood of do it :P
2) The update from PeerGuardian Database (.asp) is already implemented in the newer version of the updater. Just put a check mark and the program will update from the asp page and remove the introduction and footer text.

___
Aldo Vargas
http://www.aldostools.com

mpman2003
07-29-2003, 08:32 PM
Thanks a lot aldo, i have abandoned my shitty .bat file now!
For some reason your updater leaves a space and a tab in front of the first IP range in the Banned Ip Range file. maybe you could correct that

aldo
07-29-2003, 09:07 PM
Ok I fixed the additional CRLF and the 2 spaces at the begining of the file.

Download the new (hopefully the last for now) version of the updater from http://www.aldostools.com/temp/badipupdater.zip

___
Aldo Vargas
http://www.aldostools.com

mpman2003
07-30-2003, 10:51 AM
it's perfect now! paul: have you added this to the klite installer?

cosmic doobie
07-30-2003, 10:57 AM
Thanks Aldo, working sweet this end.
Hopefully will be included in new 2.42 ? Paul ? Random Nut?

Livy
07-30-2003, 12:04 PM
or what about an rc with updated startpage aswell. :D

Donny_Brasco
07-30-2003, 02:19 PM
Aldo,

Your url for the proggy is down

dgmortal
07-30-2003, 02:20 PM
Originally posted by Donny_Brasco@30 July 2003 - 09:19
Aldo,

Your url for the proggy is down
look above your post ;) .

aldo
07-30-2003, 02:28 PM
my server is up again.

Edit the updater.ini, it should look like:


[main]
BannedIPFile=C:\Program Files\KaZaA Lite K++\BannedIPs\BannedIpRanges.txt
PGdbUrl=http://www.simply-click.org/uploadertest/pg2_plaintext.asp
UsePGdb=0
LastUpdate=2003/7/6
url1=http://kazaalite.tech-critic.com/dl/BannedIpRangesInfo.txt
url2=
url3=


___
Aldo Vargas
http://www.aldostools.com

mpman2003
07-30-2003, 03:07 PM
I would like to make a .bat file which will run the updater for the BannedIpRanges then open kazaa (klrun.exe) Does anybody know the script for that?

aldo
07-30-2003, 03:40 PM
try:


@echo off
cd c:\program files\kazaa lite k++
BadIPUpdater.exe /update
pause
klrun.exe


___
Aldo Vargas
http://www.aldostools.com

VB
07-30-2003, 04:10 PM
Yes, this will be included in 2.4.2


And the textfile on my site isn't up-to-date because that was only a test.



Plain text html version:

http://homepage.ntlworld.com/tim.leonard1/pg_plain.htm

VB
07-30-2003, 04:15 PM
Up-to-date now.

TedKord
07-31-2003, 02:25 AM
Fantastic, Aldo! Great work as usual.

If you ever work on it again, how about an option to auto-update on startup,
before loading K++. Like the batch file above, but actually in the updater.


BTW, I still can't get your toolbar to show. It loads (confirmed in TaskManager),
and loads K++, but it isn't visible. I just can't figure it out. (Win98SE)

-WiGGY-
07-31-2003, 03:08 AM
If auto-update is implemented into the program itself or into Kazaa Lite K++ it should be optional, IMO, a checkbox similar to the PG database option for example.

secfan
07-31-2003, 07:23 AM
Originally posted by WiGGY-@31 July 2003 - 11:08
If auto-update is implemented into the program itself or into Kazaa Lite K++ it should be optional, IMO, a checkbox similar to the PG database option for example.
And don't forget Auto-Update/Auto-Run before startup of KLK++ options or something similar for Hosts Updater. (Maybe merging both Hosts/Bad IP Ranges Updaters together into one??? And include both in KLK++ 2.42!!! ;) )

aldo
07-31-2003, 01:57 PM
Originally posted by TedKord@31 July 2003 - 03:25
Fantastic, Aldo! Great work as usual.

If you ever work on it again, how about an option to auto-update on startup,
before loading K++. Like the batch file above, but actually in the updater.


BTW, I still can't get your toolbar to show. It loads (confirmed in TaskManager),
and loads K++, but it isn't visible. I just can't figure it out. (Win98SE)
I don't plan to include the auto-update in the program. The best solution is to include the updater in Windows Scheduled Tasks. Then you can configure that check for updates once per week or every days.

About KTool, try running Kazaa Lite K++ maximized without skins. Delete from the registry key "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Kazaa Toolbar", then restart KTool again.

___
Aldo Vargas
http://www.aldostools.com

TedKord
07-31-2003, 03:48 PM
Originally posted by WiGGY-@31 July 2003 - 04:08
If auto-update is implemented into the program itself or into Kazaa Lite K++ it should be optional, IMO, a checkbox similar to the PG database option for example.
That was what I meant. Sorry for being (as usual) unclear.

TedKord
07-31-2003, 03:51 PM
Originally posted by aldo+31 July 2003 - 14:57--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (aldo &#064; 31 July 2003 - 14:57)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-TedKord@31 July 2003 - 03:25
Fantastic, Aldo&#33; Great work as usual.

If you ever work on it again, how about an option to auto-update on startup,
before loading K++. Like the batch file above, but actually in the updater.


BTW, I still can&#39;t get your toolbar to show. It loads (confirmed in TaskManager),
and loads K++, but it isn&#39;t visible. I just can&#39;t figure it out. (Win98SE)
I don&#39;t plan to include the auto-update in the program. The best solution is to include the updater in Windows Scheduled Tasks. Then you can configure that check for updates once per week or every days.

About KTool, try running Kazaa Lite K++ maximized without skins. Delete from the registry key "HKEY_CURRENT_USER&#092;Software&#092;VB and VBA Program Settings&#092;Kazaa Toolbar", then restart KTool again.

___
Aldo Vargas
http://www.aldostools.com [/b][/quote]
Can I include a command line in the toolbar config file to run the update
whenever I load K++?

BTW, I&#39;ve already deleted that regkey, and I don&#39;t even have any skins installed.
And, Ktool loads KPP, like it&#39;s supposed to, but doesn&#39;t close when I shut down
KL. I have to shut it down in taskmanager.

acebrain01
08-13-2003, 02:55 AM
your sites are out of date..........
or there hasn&#39;t been any new ip&#39;s in quite a while

aldo
08-15-2003, 04:02 AM
@Paul,
I have updated the BadIpUpdater.exe.

What&#39;s new?
- The urls downloaded from the server now are selected pseudo-randomly (based on the clock). Helping in the traffic balance in the servers.
- Increased the number of possible servers from 3 to 5.

Previously, the urls were selected in sequence order, causing a possible overhead on the first servers listed in the file downloaded from the main server, and practically any traffic in the other servers.

*LINK FIXED*
Download: http://www.aldostools.com/temp/badipupdater.zip

If you want a special version for the HOSTS file, let me know.

___
Aldo Vargas
http://www.aldostools.com

VB
08-15-2003, 11:15 AM
Link is broken.

aldo
08-15-2003, 01:57 PM
check the post again, the link is fixed... I should stop posting at 3:00am :P

___
Aldo Vargas
http://www.aldostools.com

ksc218
08-15-2003, 02:33 PM
Originally posted by aldo@15 August 2003 - 14:57
check the post again, the link is fixed... I should stop posting at 3:00am&nbsp; :P

___
Aldo Vargas
http://www.aldostools.com
I dont see the point of the tech-critc site as a server all it is is a page that has two urls its own and one that has the ranges. does it forword ovber to the good site? and also i dont see how anything changed or did you just change the exe because it only has 3 servers still unless you can add on to the list yourself

Supernatural
09-11-2003, 12:38 PM
I think an auto-update option would be great. It doesn&#39;t have to be enabled by default, but AT LEAST give us the option to enable it if we want. :&#39;(

hackattack142
09-11-2003, 01:00 PM
just posted how to make a batch file to auto update it in the tips section. Check my latest post @

http://www.klboard.ath.cx/index.php?showto...30&#entry488194 (http://www.klboard.ath.cx/index.php?showtopic=56710&st=30&#entry488194)

Supernatural
09-11-2003, 02:21 PM
Yeah but, that&#39;s not really an auto-update. It&#39;s more like a single-click update.

SlimShady
09-11-2003, 02:35 PM
If you link the batch file in "Planned Tasks" you have auto-update.
Really.

Supernatural
09-11-2003, 05:26 PM
Too much work. An integrated solution would be much better, leaving no room for error.

hackattack142
09-11-2003, 11:10 PM
ok, here is another batch file to create a task for you. I am sure it will probably run on NT and up but dont know about Win9x.


@echo off
echo Create Auto Update Task
echo.
echo Creating Task...
schtasks /create /ru &#34;&#34; /sc daily /mo 2 /st 17&#58;00&#58;00 /tn &#34;IP Update&#34; /tr &#34;C&#58;&#092;Program Files&#092;Kazaa Lite K++&#092;Auto Update.bat&#34;
echo Done&#33;
Exit
Just copy and save this as a bat file an make sure you have the batch file from my previous post and name it "Auto Update" and put it in the KLite folder. If you didnt install it to the default location, then you will have to edit the path in the code above. This will create a task that will run every two days at 5:00 PM.

Supernatural
09-12-2003, 01:57 PM
Originally posted by hackattack142@11 September 2003 - 18:10
ok, here is another batch file to create a task for you. I am sure it will probably run on NT and up but dont know about Win9x.


@echo off
echo Create Auto Update Task
echo.
echo Creating Task...
schtasks /create /ru &#34;&#34; /sc daily /mo 2 /st 17&#58;00&#58;00 /tn &#34;IP Update&#34; /tr &#34;C&#58;&#092;Program Files&#092;Kazaa Lite K++&#092;Auto Update.bat&#34;
echo Done&#33;
Exit
Just copy and save this as a bat file an make sure you have the batch file from my previous post and name it "Auto Update" and put it in the KLite folder. If you didnt install it to the default location, then you will have to edit the path in the code above. This will create a task that will run every two days at 5:00 PM.
How can it be tested?

hackattack142
09-12-2003, 10:52 PM
If you are wondering if it is going to do what it says, first make the batch file, then execute it. After that, go to your control panel and look in shedualed tasks and there should be a task named "IP Update". You can simply right click on it and click execute to run it or if you can run the batch file before 5:00 PM and it should run it when 5:00 comes around. If you see the update batch file, then you know it is working.

Supernatural
09-16-2003, 12:12 AM
I think this should be included in the next build.