aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: recognize comment char # in ipfilter.dat  (Read 3670 times)

Arichy

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 224
recognize comment char # in ipfilter.dat
« on: September 26, 2009, 12:03:32 PM »

On some ed2k related internet sites is a link to a recent ipfilter.dat is given:

http://megahorst.com/Get/8d2c67256dc59ecebe4b602558b06e08

This file cannot be read with amule 2.2.6: "unknown format"

If the first comment lines (starting with #) are deleted from the file, it is accepted by amule.
Logged
Gentoo i686

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: recognize comment char # in ipfilter.dat
« Reply #1 on: September 26, 2009, 12:14:18 PM »

Code: [Select]
#»» 0 - (main title) • Ipfilter v134 (03-03-2009) by R3Qu13M
#>> [based on Meuh6879´s ipfilter format]
#
#>> Updated all lists (03-03-2009)
#>> Removed some IP ranges to level 095
#>> Fixed IP range´s Level 1 to allow Sharing Kingdom 1-4.
Well, it sure isn't recent. And it has the same problem with strange characters that break aMule's text file recognition as the emulepawcio list (see here) had. Actually it's simply  an outdated copy of it I believe.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Arichy

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 224
Re: recognize comment char # in ipfilter.dat
« Reply #2 on: September 26, 2009, 12:29:27 PM »

Output from linux file command:
without # lines:
ipfilter.dat: ASCII English text, with CRLF line terminators

with # lines:
ipfilter.dat: Non-ISO extended-ASCII English text, with CRLF line terminators

The code
Quote
314                                         // Comments and empty lines are ignored
315                                         line = line.Strip(wxString::both);
316
317                                         if (!line.IsEmpty() && !line.StartsWith(wxT("#"))) {
318                                                 discardedCount++;
319                                                 AddDebugLogLineM(false, logIPFilter, wxT(
320                                                         "Invalid line found while reading ipfilter file: ") + line);
321                                         }
in IPFilter.cpp seems to not work correctly. So maybe it's more a bug report than a feature request.
« Last Edit: September 26, 2009, 12:41:12 PM by Arichy »
Logged
Gentoo i686

^marcell^

  • Developer
  • Hero Member
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 524
Re: recognize comment char # in ipfilter.dat
« Reply #3 on: September 26, 2009, 12:40:31 PM »

In that case the error message should have been a different one to what you posted above. ::)
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: recognize comment char # in ipfilter.dat
« Reply #4 on: September 26, 2009, 12:54:00 PM »

You are at the wrong piece of code. Problem occurs before when aMule tries to decide if it's a text file or an archive which needs to be unpacked. And the strange characters throw it off track.

The original filter list comes without these chars meanwhile, so there is nothing to do.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

digger07

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re: recognize comment char # in ipfilter.dat
« Reply #5 on: October 27, 2009, 02:30:18 PM »

Yes I agree with Stu.

Edit by Wuischke: User had spam links in signature, will be banned on further offense.
« Last Edit: October 27, 2009, 03:05:01 PM by wuischke »
Logged