Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Untangle Ninja
    WebFooL's Avatar
    Join Date
    Jan 2009
    Location
    Sweden (Eskilstuna)
    Posts
    5,244

    Default

    the only error i see is the one that gets printed to the user:
    <span id="ext-gen61" class="ext-mb-text">Import failed. Settings must be formatted as a JSON Array.</span>
    There might just be one record that makes it all go to hell. but i can't find it.

  2. #12
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,747

    Default

    Yeah, thats probably the issue.

    some weird characters mess things up.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  3. #13
    Untangle Ninja
    WebFooL's Avatar
    Join Date
    Jan 2009
    Location
    Sweden (Eskilstuna)
    Posts
    5,244

    Default

    might be the " in
    ##a[href^="http://ad-apac.doubleclick.net/"]
    ~ebay.de##a[href^="http://ad-emea.doubleclick.net/"]
    ~zdnet.de##a[href^="http://ad.doubleclick.net/"]
    ##a[href^="http://adserving.liveuniversenetwork.com/"]
    ##a[href^="http://galleries.pinballpublishernetwork.com/"]
    ##a[href^="http://galleries.securewebsiteaccess.com/"]
    ##a[href^="http://install.securewebsiteaccess.com/"]
    ##a[href^="http://latestdownloads.net/download.php?"]
    ##a[href^="http://secure.signup-page.com/"]
    ##a[href^="http://secure.signup-way.com/"]
    ##a[href^="http://www.FriendlyDuck.com/AF_"]
    ##a[href^="http://www.adbrite.com/mb/commerce/purchase_form.php?"]
    ##a[href^="http://www.firstload.de/affiliate/"]
    ##a[href^="http://www.friendlyduck.com/AF_"]
    ##a[href^="http://www.google.com/aclk?"]
    ##a[href^="http://www.liutilities.com/aff"]
    ##a[href^="http://www.liutilities.com/products/campaigns/adv/"]
    ##a[href^="http://www.my-dirty-hobby.com/?sub="]
    ##a[href^="http://www.ringtonematcher.com/"]

  4. #14
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,747

    Default

    Yes, you'll need to escape the quotes otherwise the JSON isnt valid
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  5. #15
    Untanglit
    Join Date
    Sep 2011
    Posts
    18

    Default

    Quote Originally Posted by dmorris View Post
    Yes, you'll need to escape the quotes otherwise the JSON isnt valid
    I'll try to remove the " and test the list, thanks for all the help!

  6. #16
    Untanglit
    Join Date
    Sep 2011
    Posts
    18

    Default

    Any clue what that list does? May I replace/edit it, how is it imported into Untangle as Ad Block rules (is it imported via a script?)

    Code:
    /usr/share/untangle/adblocker/rules # ls -al                                                                                       [root @ hostname]
    total 120
    drwxr-xr-x 2 root root  4096 2011-09-25 01:28 ./
    drwxr-xr-x 3 root root  4096 2011-09-22 22:22 ../
    -rw-r--r-- 1 root root 51277 2011-08-15 14:26 adblock_rick752.txt

  7. #17
    Untanglit
    Join Date
    Sep 2011
    Posts
    18

    Default

    Would it be hard to implement "on error resume next" thing into the import Ad Block rules module?

    I've converted a Ad Block plus list into Untangle JSON format and there are a few rows that Untangle doesn't like.

    As an example:

    [{"string":"a-kiltojenliitto.fi##TABLE[align="center"]","javaClass":"com.untangle.uvm.node.StringRule","live":true},]

    Untangle doesn't like that "center" in the row above. It took me a while to figure that out..

    EDIT: to be more precise, if there is a "]" in the middle of a row, the import process shits itself
    Last edited by su_root; 09-27-2011 at 02:41 PM.

  8. #18
    Untanglit
    Join Date
    Sep 2011
    Posts
    18

    Default

    I forgot to add that I can upload the rules "manually" (not via the import feature) and the rule seems to work.

    I guess that the .json upload scheme is not 100% compatible with Ad Block plus lists ("]" in the middle of a row and upload hangs). Could this be the reason why Ad Block rules in Untangle are very old?

    However, the next step is to fiddle with the SQL Ad Block table directly since I can not see a better solution to update the rules at this point.

    If I had the necessary coding knowledge, I would re-write the Ad Block update/import module as follows:

    1) Add/enable/disable single rule
    2) Possibility to update rules from Ad Block plus .txt file (http or manual file upload)
    2.1) .txt rules update with bash script => import to SQL database
    2.2) (If author allows) add schedule (cron) rule update possibility (once a week, month etc.)

    I'll take a look at the SQL Ad Block tables when I have time. I'll try to convert Ad Block plus list to .csv and then hopefully a bash script that can import the .csv rules.

  9. #19
    some dude hlarsen's Avatar
    Join Date
    Jul 2010
    Location
    sfba
    Posts
    1,385

    Default

    you've verified the rules are working when you manually enter them?
    perhaps there is a way to escape the brackets in the JSON, i'm not sure.
    Last edited by hlarsen; 09-28-2011 at 07:18 AM.

  10. #20
    Untangle Ninja mrunkel's Avatar
    Join Date
    Jul 2008
    Posts
    3,040

    Default

    Quote Originally Posted by su_root View Post
    Would it be hard to implement "on error resume next" thing into the import Ad Block rules module?

    I've converted a Ad Block plus list into Untangle JSON format and there are a few rows that Untangle doesn't like.

    As an example:

    [{"string":"a-kiltojenliitto.fi##TABLE[align="center"]","javaClass":"com.untangle.uvm.node.StringRule","live":true},]

    Untangle doesn't like that "center" in the row above. It took me a while to figure that out..

    EDIT: to be more precise, if there is a "]" in the middle of a row, the import process shits itself
    There is no "Untangle JSON" format. It's just JSON.

    You can't have quotes in there without escaping them. The ] isn't the issue, it's the ".

    {"string":"a-kiltojenliitto.fi##TABLE[align=\"center\"]","javaClass":"com.untangle.uvm.node.StringRule","live":true}

    Should work.
    m.


    Big Frickin Disclaimer:
    While I'm pretty sure, I can't guarantee that I know what I'm doing. There might be a better way to do this, and this way might actually suck. Make sure you understand the implications of what you're doing before trying to follow these directions.

    It often helps troubleshooting if you have a good network map. Look here if you want my advice on how to draw one.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2