Code injector.py: no test alert

I’m working on code_injector.py in “complte ethical hacking course” and the “test” alert does not show on bing.com. I couldn’t find the problem in my code and everything looked fine…
When I checked if HTML decoding works properly, not all responses were in HTML and were in the encoded form like x17/x84 … Also, when I open bing…com page source it doesn’t have the replaced test alert java code… that looks like the problem but I don’t see why that is happening… any help is appreciated and thank you all.

Hi @seyunkim0114, did you try this with other websites like vulnhub.com?

I tried vulnweb.com and it still doesn’t work

Did you successfully ARP spoof the windows machine from your Kali? I don’t see any other possible problem apart from a successful ARP spoof.

I haven’t tried it on Windows yet. I’m trying to make it work on my Kali machine for now but I haven’t been able to follow up with the lecture since DNS spoofer. I followed everything the instructor said but it doesn’t work on mine. You mentioned about network error for DNS spoofer error but I don’t think this one is also network related problem.

Can you tell me which course and lecture you are following for this?

It is Learn Python & Ethical Hacking from Scratch by Zaid Al Quraishi and I’m stuck on the lecture “Modifying HTTP Responses and Injecting JavaScript code in HTML pages” of "Writing a Code Injector "chapter.

This is what I got for vulnweb.com after running code_injector.py. It seems the injected javascript code is deleted in the middle. I have no idea why this is happening…

Are you able to successfully get the Raw packets from vulnhub.com after running the code without replacing the html? That is running the code from the lecture “Analysing HTTP responses”