Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- It will take an HTML file and will deface
- Use: deface.py yourpage.html
- ################################################
- 1 ______ __ __ _____ _ _ 1
- 2 | _____| | | | | | _ | | | / / 2
- 3 | |____ | |___| | | |_| | | |_/ / 3
- 4 |_____ | | ___ | | __ | | _ \ 4
- 5 ____| | | | | | | | | | | | \ \ 5
- 6 |______| |_| |_| |_| |_| |_| \_\ 6
- 7 7
- 8 email:[email protected] 8
- 9 ShAk Hax0r 9
- ################################################
- [code]
- #!/usr/bin/python
- #Date:10.08.2010
- #Purpose: Deface HTML files
- import sys
- import time
- if len(sys.argv) < 2:
- print 'Usage deface.py index.html , this will create an index.html file with deface .'
- sys.exit()
- file = sys.argv[1]
- myfile = open(file,'w')
- print ' Colors: '
- print '================================================================'
- print ' | black | white | '
- print '================================================================'
- while True:
- var = raw_input ('1.Type the color for background here => ')
- if var in ['black','white']: break
- else:
- print 'Wrong color..!'
- print >> myfile, '<body bgcolor=','"',(var),'"','>'
- print '================================================================'
- print ' Colors '
- print ' | black | white | green | red | purple | blue | gray | '
- print '================================================================'
- while True:
- var1 = raw_input ('2.Type the text color here => ')
- if var1 in ['black','white','green','orange','red','purple','blue','gray']: break
- else:
- print 'Wrong color..!'
- print >> myfile, '<p align="center"><b><font color=','"',(var1),'"','size="3">'
- if var == 'black':
- print '================================================================'
- print ' Choose an image : '
- print '| hacked1 | fingerprint | spy | hacked2 | silence | gameover |'
- print '| leg | hand | hitman | smoke | hacked3 | '
- print ' | other | '
- print '================================================================'
- while True:
- var4 = raw_input ('3.Put the image name here => ')
- if var4 in ['hacked1','fingerprint','spy','hacked2','silence','gameover','leg','hand','hitman','smoke','hacked3','other']: break
- else:
- print 'Wrong image name..! '
- print '================================================================'
- if var4 == 'fingerprint':
- print >> myfile,' <center><img src="http://www.mandel.ro/logos/animFingerprintBlack.gif"></center>'
- if var4 == 'hacked1':
- print >> myfile,' <center><img src="http://site.mynet.com/the_chip/hacked2323.jpg"></center>'
- if var4 == 'spy':
- print >> myfile,' <center><img src="http://www.bluesilk.hu/images/stories/spy.gif"></center>'
- if var4 == 'hacked2':
- print >> myfile,' <center><img src="http://expclan.comli.com/index_files/43084476ii9.png"></center>'
- if var4 == 'silence':
- print >> myfile,' <center><img src="http://demafmipauns.files.wordpress.com/2010/05/sayu0i.jpg"></center>'
- if var4 == 'gameover':
- print >> myfile, '<center><img src="http://img10.imageshack.us/img10/4974/yumaqalt.jpg"></center>'
- if var4 == 'leg':
- print >> myfile, '<center><img src="http://img268.imageshack.us/img268/6802/thehackerericborgozone1.jpg"></center>'
- if var4 == 'hand':
- print >> myfile, '<center><img src="http://i728.photobucket.com/albums/ww286/vyc0d/owned.jpg"></center>'
- if var4 == 'hitman':
- print >> myfile, '<center><img src="http://t0.gstatic.com/images?q=tbn:lYCsFDr4o7mh1M:http://www.renoascensori.it/hacked.jpg&t=1"></center>'
- if var4 == 'smoke':
- print >> myfile, '<center><img src="http://t1.gstatic.com/images?q=tbn:YgDh8qCPAtwgoM:http://i46.tinypic.com/2gtxdo1.jpg&t=1"></center>'
- if var4 == 'hacked3':
- print >> myfile, '<center><img src="http://img.webme.com/pic/c/cobbra-g3ncii/hacked.jpg"></center>'
- if var4 == 'other':
- while True:
- var4 = raw_input ('Please enter the URL of your picture here: ' )
- if var4.endswith(('.jpg','.png','.gif','.JPG','.PNG','.GIF')) : break
- else:
- print 'Wrong image name..! '
- print >> myfile,'<center><img src="',(var4),'"></center>'
- if var == 'white':
- print '================================================================'
- print ' Choose an image : '
- print ' | eye | door | fingerprint | wanted | sleep | other | '
- print '================================================================'
- while True:
- var4 = raw_input ('3.Put the image name here => ')
- if var4 in ['door','fingerprint','wanted','sleep','eye','other']: break
- else:
- print 'Wrong image...'
- print '================================================================'
- if var4 == 'door':
- print >> myfile,'<center><img src="http://www.cdscreative.com/images/door.jpg"></center>'
- if var4 == 'fingerprint':
- print >> myfile,' <center><img src="http://www.idfpr.com/DPR/images/fingerprint.gif"></center>'
- if var4 == 'wanted':
- print >> myfile,' <center><img src="http://www.allstarcardsinc.com/_derived/buy_list.htm_txt_wanted1.gif"></center>'
- if var4 == 'sleep' :
- print >> myfile,' <center><img src="http://www.do2learn.com/picturecards/images/imageschedule/sleep_l.gif"></center>'
- if var4 == 'eye' :
- print >> myfile,' <center><img src="http://www.christina-reysen.com/images/eye_open.gif"></center>'
- if var4 == 'other':
- while True:
- var4 = raw_input ('Please enter the URL of your picture here: ' )
- if var4.endswith(('.jpg','.png','.gif','.JPG','.PNG','.GIF')) : break
- else:
- print 'Must enter an URL that contains an image file..! '
- print >> myfile,'<center><img src="',(var4),'"></center>'
- print '================================================================'
- while True:
- var2 = raw_input ('4.put your signature here => ')
- if len(var2) < 30 : break
- else:
- print 'Signature too large..!'
- print >> myfile, '<script>'
- print >> myfile, 'if (document.layers)'
- print >> myfile, 'var ns4def=""'
- print >> myfile, '</script>'
- print >> myfile, '<p align="center"><b><font size="4">'
- print >> myfile, '<h2 id="flyin"style="position:relative;left:-400;font-style:italic"'
- print >> myfile, 'style=&{ns4def};>'
- print >> myfile, '<font face="Arial">','Owned by',(var2),'</font></h2>'
- print >> myfile, '</font></b></p>'
- print >> myfile, '<script language="JavaScript1.2">'
- print >> myfile, 'if (document.getElementById||document.all)'
- print >> myfile, 'var crossheader=document.getElementById? document.getElementById("flyin").style : document.all.flyin.style'
- print >> myfile, 'function animatein(){'
- print >> myfile, 'if (parseInt(crossheader.left)<0)'
- print >> myfile, 'crossheader.left=parseInt(crossheader.left)+20'
- print >> myfile, 'else{'
- print >> myfile, 'crossheader.left=0'
- print >> myfile, 'crossheader.fontStyle="normal"'
- print >> myfile, 'clearInterval(start)'
- print >> myfile, '}'
- print >> myfile, '}'
- print >> myfile, 'if (document.getElementById||document.all)'
- print >> myfile, 'start=setInterval("animatein()",50)'
- print >> myfile, '</script>'
- print >> myfile, '<p>'
- print >> myfile, '<font face="Tahoma"><a target="_blank"'
- print '================================================================'
- print ' Choose: '
- print ' | yes | no | '
- print '================================================================'
- while True:
- var7 = raw_input ('Do you want to add some other text message?: ')
- if var7.lower() == 'no' :
- print '================================================================'
- print ' Wait...'
- time.sleep(1)
- myfile.close()
- print 'Your HTML file is ready ,I will exit now... '
- time.sleep(2)
- sys.exit()
- elif var7.lower() == 'yes' : break
- else:
- print ("Please enter 'yes' or 'no' ...!")
- print '================================================================'
- print ' Choose one of the color from the list '
- print ' | black | white | green | red | purple | blue | gray | '
- print '================================================================'
- while True:
- var8 = raw_input ('Type the text color that you want here => ')
- if var8 in ['black','white','green','orange','red','purple','blue','gray ']:break
- else:
- print 'Wrong color..!'
- print >> myfile, '<p align="center"><b><font color=','"',(var8),'"','size="3">'
- print '================================================================'
- while True:
- var9 = raw_input ('Put your comments here => ')
- if len(var9) < 150 : break
- else:
- print 'Comments are too large..!'
- print >> myfile, var9
- print >> myfile, '</font></b></p>'
- print '================================================================'
- print 'Processing your HTML file please wait... '
- time.sleep(2)
- print '...'
- time.sleep(2)
- myfile.close()
- print ' Work done ,your HTML file was defaced , i will exit... '
- time.sleep(1)
- sys.exit()
- #END [/code]
Advertisement
Add Comment
Please, Sign In to add comment