0

Suppose I have an extension that send requests to pages api.ext.com/addWord and api.ext.com/getTranscr

Where to start to write an application that will intercept all requests to one page (the site will not receive them), but leave intact requests to other pages

srghma
  • 4,770
  • 2
  • 38
  • 54
  • I don't understand your question; What's the context here? What have you tried? What's the webserver? – James Mills Jun 16 '15 at 21:42
  • Look into Netfilter: https://pypi.python.org/pypi/NetfilterQueue/0.3 - this is how packet interception is mostly handled on Linux. You usually block by IP instead of domain, though. – Matthew Jun 16 '15 at 21:47
  • @Matthew geniously, that`s what I need – srghma Jun 17 '15 at 16:22

1 Answers1

0

Thanks to Matthew, the answer on Linux is iptables -I OUTPUT -p tcp -m string --string "POST /addword?port=1001" --algo kmp -j DROP

Community
  • 1
  • 1
srghma
  • 4,770
  • 2
  • 38
  • 54