Post Reply 
Filter not working on some web pages
Dec. 13, 2008, 07:41 PM
Post: #1
Filter not working on some web pages
I wrote a simple filter to allow Turbotax to let me in with a Windows 98 machine. The filter does NOT make any changes to the webpage:

http://turbotax.intuit.com/js/ttoReady.j...on=120108b

I put a copy of this web page on my web server, and the filter works fine.
This has me very confused. I'm running Proxomitrom 5.0.

The filter is:
Name = "Fix Turbotax system check"
Active = TRUE
Multi = TRUE
Limit = 256
Match = "return (YELLOW|RED)"
Replace = "return GREEN"


I'd really like to get this working. Any ideas?
Add Thank You Quote this message in a reply
Dec. 13, 2008, 09:07 PM
Post: #2
RE: Filter not working on some web pages
There is no "return YELLOW" or "return RED" in that page, so it can't match...

These kind of question here please: Help for newbies: First filters

BTW we would like, but Proxomitron 5.0 doesn't exists...
Add Thank You Quote this message in a reply
Dec. 13, 2008, 09:49 PM
Post: #3
RE: Filter not working on some web pages
I can't seem to get any filter matching on that page, so another option is spoofing your User-Agent with this header filter:

Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "User-Agent: Spoof Intuit - IE6 on Windows XP (out) "
URL = "(\w.|)intuit.com"
Replace = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"

Wink
Visit this user's website
Add Thank You Quote this message in a reply
Dec. 13, 2008, 11:08 PM
Post: #4
RE: Filter not working on some web pages
Changing the User Agent does not work. The page uses Javascript to check. Why would Proxomitron fail to do filter matching on this page?
Add Thank You Quote this message in a reply
Dec. 13, 2008, 11:22 PM
Post: #5
RE: Filter not working on some web pages
My filters are working fine there, and log me they changed content-type from application/javascript to text/javascript. Search in this forum for "Fix MIME-types" to fix that issue Wink

And sorry, i correct what i said before, yes, there are "return YELLOW" and "return RED" in that page, i did a search for text but something went bad.

If you use the filter from sidki's config, the line in MIME-list.txt wich will correct this will be something like:
js (^$TST(\2=text/javascript))$SET(0=text/javascript)

or maybe
js $SET(0=text/javascript)

I made some modifications to the MIME-list to match only when needed, slower but more informative.
Add Thank You Quote this message in a reply
Dec. 14, 2008, 01:38 AM
Post: #6
RE: Filter not working on some web pages
I made a filter for this case, but better use the Fix-Mime types:

Code:
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type: Fix application javascripts (better use fix mime-types) 081213{ln} (in)"
URL = "$RESP(200*)(^local.ptron/*.js)"
Match = "application/javascript"
Replace = "text/javascript $LOG(C$DTM(c): Content-Type: Fix application javascripts)"

Copy it to the clipboard, and "Merge" it later in your config Wink
Add Thank You Quote this message in a reply
Dec. 14, 2008, 12:34 PM
Post: #7
RE: Filter not working on some web pages
he posted a link to a .js file, NOT to a "web site"...

the .js DOES contain "return YELLOW" and "return RED"...


i'm at a loss in what you guys are trying to do...
my config is "filtering" that .js file just fine "as is", no 'need' for any of the filters presented in this thread...


so, "what am i missing?"
Add Thank You Quote this message in a reply
Dec. 14, 2008, 08:39 PM
Post: #8
RE: Filter not working on some web pages
(Dec. 13, 2008 09:49 PM)Kye-U Wrote:  
Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "User-Agent: Spoof Intuit - IE6 on Windows XP (out) "
URL = "(\w.|)intuit.com"
Replace = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
One note here, on the URL Match line.....

I don't know for sure, I'm not an Intuit user, but it seems to me that this might be a "secure" page, with an HTTPS protocol, not the normal HTTP. Even so, it sometimes happens that, and I've fallen for this myself (with JJoe bailing me out!), you'll see the HTTP protocol, but it's being routed through Port 443 - that's the "secure" communications port, or so they say. In order to make sure that all your bases are covered, you should probably write that line like so:

URL = "(\w.|)intuit.com\w/"

You also want the trailing slash, as Scott explains in his Help file, to make sure that all subsequent pages from that domain are also filtered.




My take on bluechalk's problematic solution is that Proxo can and will change code, even script code, if it's written directly within the page contents. However, if a script is called from an external source, then it won't be modified, unless the filter URL Match specifically calls for a $TYPE(js). As ProxRocks points out, sidki3003 does do just that in his config set.

Might give that some thought...... Wink


BTW, welcome to the Forums, bluechalk! Big Teeth


HTH



Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Dec. 14, 2008, 08:56 PM
Post: #9
RE: Filter not working on some web pages
The solution is above, posts 5 and 6

@proxrocks, you are using a sidki config, disable "fix mime types" to see why the first simple filter doesn't work
Add Thank You Quote this message in a reply
Dec. 14, 2008, 09:47 PM
Post: #10
RE: Filter not working on some web pages
lnminente:

I still can't get it working. I added the filter in post 6. I'm not sure if I also need to add something from post 5. Can you explain why this doesn't work without adding these additional filters?
Add Thank You Quote this message in a reply
Dec. 15, 2008, 02:12 AM
Post: #11
RE: Filter not working on some web pages
It works...use your filter and mine, both.
I made a config with only these two filters and works.

Proxomitron, by itself won't filter applications, so we need to change the content type from application to text, thats all Wink

This is the cfg file, load it:
Code:
##
## Proxomitron Config File
##

[Global]
Enable = TRUE
FreezeGIF = FALSE
FilterHTML = TRUE
FilterHeadersOut = TRUE
FilterHeadersIn = TRUE
EnableProxy = FALSE
EnableAutoRun = FALSE
ForceTextures = FALSE
NoTextures = TRUE
SysTray = TRUE
UseSSLeay = FALSE
PriorityBoost = TRUE
Port = 8080
MaxCapURL = 100

[WinSizes]

[Blocklists]

[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type: Fix application javascripts (better use fix mime-types) 081213{ln} (in)"
URL = "$RESP(200*)(^local.ptron/*.js)"
Match = "application/javascript"
Replace = "text/javascript $LOG(C$DTM(c): Content-Type: Fix application javascripts)"


[Patterns]
Name = "Fix Turbotax system check"
Active = TRUE
Multi = TRUE
Limit = 256
Match = "return (YELLOW|RED)"
Replace = "return GREEN"


[Proxies]
OpenLog = TRUE
Count = 1
Add Thank You Quote this message in a reply
Dec. 15, 2008, 02:58 PM
Post: #12
RE: Filter not working on some web pages
lnminente: I have it working now. Thank you very much for your help.
Add Thank You Quote this message in a reply
Dec. 15, 2008, 04:30 PM
Post: #13
RE: Filter not working on some web pages
Thanks to you for asking! I'm sure this will help more people, there are many things to know about proxo, and very few of them doccumented Wink

Anyway I recommend you the thread How to find the filter which is causing problems for localizing future problems Wink
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: