Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pcre_regex or replace has no effect in Ettercap filters #1248

Open
emeraldskygroup opened this issue Mar 27, 2024 · 2 comments
Open

Pcre_regex or replace has no effect in Ettercap filters #1248

emeraldskygroup opened this issue Mar 27, 2024 · 2 comments

Comments

@emeraldskygroup
Copy link

Hi, I’m trying to get this Ettercap filter to work which has worked in the past but it seems Ettercap no longer accepts it?

if (ip.dst == ‘192.###.##.#' && tcp.dst == 80) {
if(search(DATA.data, "POST")){

msg("request POST");

if (search(DATA.data, "login.php")){
msg("Call to the login page");
pcre_regex(DATA.data, "Content-Length: [0-9]*","Content-Length: 41");
msg("Content modified");

if (pcre_regex(DATA.data, "username=[a-zA-Z]*&","username=admin&")){
msg("Data modified\n");
}

msg("Done !\n");
}
}
}

I also tried using replace and execinject, the code runs and the messages are displayed, but nothing gets replaced.

Please helpp!!

Sincerely,
Marco

@LocutusOfBorg
Copy link
Contributor

Are you using latest git?

@koeppea
Copy link
Member

koeppea commented Apr 5, 2024

any update to Gianfranco's question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants