cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Former Member
Not applicable
Report Inappropriate Content
Message 1 of 4

Page body inspection example rule?

Anyone have an example rule to block a specific pattern in the body of a page? I understand the possible load ramifications of doing this and we are using a regex filter to cut down on hits. Currently it would be about 5k hits per week to the rule based on our url regex filtering.

I just want to block a specific string in the first 300 bytes of the page. I have tried Body.ToString, Body.PositionOfPattern, Body.Text... Nothing seems to be working. If someone has a working copy of a rule that can do this I would really appreciate being let in on the secret.

I dont want to give the actual string here but it would be something like:  <table width="300" border="1" cellpadding="3" bordercolor="#000FFF"><tr><td><div align="center">Doing this here...</div></td></tr></table></a>

Message was edited by: consoul on 2/28/14 12:43:58 PM CST
3 Replies
eelsasser
McAfee Retired
McAfee Retired
Report Inappropriate Content
Message 2 of 4

Re: Page body inspection example rule?

Will the "Doing this here..." always be within a <div> tag?

We can use the HTML opener and target the content in the <div> only, as opposed to matching on the entire Body.Text.

Also, do you want to block the entire page if there is a match or simply remove the content inside the <div>?

I do something similar with the HTML opener when i want to remove specific content from a page, but leave the rest of the page intact.

I've attached a set of rules i use for removing certain named <div> elements from a facebook page. you might be able to do something similar.

Message was edited by: eelsasser -- typos on 3/1/14 12:07:16 PM EST
Former Member
Not applicable
Report Inappropriate Content
Message 3 of 4

Re: Page body inspection example rule?

Thank you for the quick reply. Unfortunately I am on 7.3.2.3 and it's complaining that the rule you supplied is from 7.4.1.1.0

Do you by chance have a screenshot of your awesome sauce rule?

Former Member
Not applicable
Report Inappropriate Content
Message 4 of 4

Re: Page body inspection example rule?

Never mind, I edited the xml and replaced your version with mine (7.3.2.3.0-16052) and it worked. 

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community