Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lionsec
GitHub Repository: lionsec/xerosploit
Path: blob/master/tools/bettercap/modules/hack_title.rb
527 views
1
=begin
2
3
BETTERCAP
4
5
Author : Simone 'evilsocket' Margaritelli
6
Email : [email protected]
7
Blog : http://www.evilsocket.net/
8
9
This project is released under the GPL 3 license.
10
11
=end
12
class HackTitle < BetterCap::Proxy::HTTP::Module
13
meta(
14
'Name' => 'HackTitle',
15
'Description' => 'Adds a "!!! HACKED !!!" string to every webpage title.',
16
'Version' => '1.0.0',
17
'Author' => "Simone 'evilsocket' Margaritelli",
18
'License' => 'GPL3'
19
)
20
21
def on_request( request, response )
22
# is it a html page?
23
if response.content_type =~ /^text\/html.*/
24
BetterCap::Logger.info "Hacking http://#{request.host}#{request.path}"
25
# make sure to use sub! or gsub! to update the instance
26
response.body.sub!( '<title>', '<title> !!! HACKED !!! ' )
27
end
28
end
29
end
30
31