Guest User

DeFACed page

a guest
May 5th, 2012
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.33 KB | None | 0 0
  1. It will take an HTML file and will deface
  2. Use: deface.py yourpage.html
  3.  
  4.  
  5. ################################################
  6. 1 ______ __ __ _____ _ _ 1
  7. 2 | _____| | | | | | _ | | | / / 2
  8. 3 | |____ | |___| | | |_| | | |_/ / 3
  9. 4 |_____ | | ___ | | __ | | _ \ 4
  10. 5 ____| | | | | | | | | | | | \ \ 5
  11. 6 |______| |_| |_| |_| |_| |_| \_\ 6
  12. 7 7
  13. 9 ShAk Hax0r 9
  14. ################################################
  15.  
  16. [code]
  17. #!/usr/bin/python
  18. #Date:10.08.2010
  19. #Purpose: Deface HTML files
  20.  
  21.  
  22. import sys
  23. import time
  24. if len(sys.argv) < 2:
  25. print 'Usage deface.py index.html , this will create an index.html file with deface .'
  26. sys.exit()
  27.  
  28.  
  29. file = sys.argv[1]
  30. myfile = open(file,'w')
  31.  
  32. print ' Colors: '
  33. print '================================================================'
  34. print ' | black | white | '
  35. print '================================================================'
  36. while True:
  37. var = raw_input ('1.Type the color for background here => ')
  38. if var in ['black','white']: break
  39. else:
  40. print 'Wrong color..!'
  41. print >> myfile, '<body bgcolor=','"',(var),'"','>'
  42. print '================================================================'
  43. print ' Colors '
  44. print ' | black | white | green | red | purple | blue | gray | '
  45. print '================================================================'
  46.  
  47. while True:
  48. var1 = raw_input ('2.Type the text color here => ')
  49. if var1 in ['black','white','green','orange','red','purple','blue','gray']: break
  50. else:
  51. print 'Wrong color..!'
  52. print >> myfile, '<p align="center"><b><font color=','"',(var1),'"','size="3">'
  53.  
  54. if var == 'black':
  55. print '================================================================'
  56. print ' Choose an image : '
  57. print '| hacked1 | fingerprint | spy | hacked2 | silence | gameover |'
  58. print '| leg | hand | hitman | smoke | hacked3 | '
  59. print ' | other | '
  60. print '================================================================'
  61.  
  62. while True:
  63. var4 = raw_input ('3.Put the image name here => ')
  64. if var4 in ['hacked1','fingerprint','spy','hacked2','silence','gameover','leg','hand','hitman','smoke','hacked3','other']: break
  65. else:
  66. print 'Wrong image name..! '
  67. print '================================================================'
  68. if var4 == 'fingerprint':
  69. print >> myfile,' <center><img src="http://www.mandel.ro/logos/animFingerprintBlack.gif"></center>'
  70. if var4 == 'hacked1':
  71. print >> myfile,' <center><img src="http://site.mynet.com/the_chip/hacked2323.jpg"></center>'
  72. if var4 == 'spy':
  73. print >> myfile,' <center><img src="http://www.bluesilk.hu/images/stories/spy.gif"></center>'
  74. if var4 == 'hacked2':
  75. print >> myfile,' <center><img src="http://expclan.comli.com/index_files/43084476ii9.png"></center>'
  76. if var4 == 'silence':
  77. print >> myfile,' <center><img src="http://demafmipauns.files.wordpress.com/2010/05/sayu0i.jpg"></center>'
  78. if var4 == 'gameover':
  79. print >> myfile, '<center><img src="http://img10.imageshack.us/img10/4974/yumaqalt.jpg"></center>'
  80. if var4 == 'leg':
  81. print >> myfile, '<center><img src="http://img268.imageshack.us/img268/6802/thehackerericborgozone1.jpg"></center>'
  82. if var4 == 'hand':
  83. print >> myfile, '<center><img src="http://i728.photobucket.com/albums/ww286/vyc0d/owned.jpg"></center>'
  84. if var4 == 'hitman':
  85. print >> myfile, '<center><img src="http://t0.gstatic.com/images?q=tbn:lYCsFDr4o7mh1M:http://www.renoascensori.it/hacked.jpg&t=1"></center>'
  86. if var4 == 'smoke':
  87. print >> myfile, '<center><img src="http://t1.gstatic.com/images?q=tbn:YgDh8qCPAtwgoM:http://i46.tinypic.com/2gtxdo1.jpg&t=1"></center>'
  88. if var4 == 'hacked3':
  89. print >> myfile, '<center><img src="http://img.webme.com/pic/c/cobbra-g3ncii/hacked.jpg"></center>'
  90. if var4 == 'other':
  91. while True:
  92. var4 = raw_input ('Please enter the URL of your picture here: ' )
  93. if var4.endswith(('.jpg','.png','.gif','.JPG','.PNG','.GIF')) : break
  94. else:
  95. print 'Wrong image name..! '
  96. print >> myfile,'<center><img src="',(var4),'"></center>'
  97.  
  98. if var == 'white':
  99. print '================================================================'
  100. print ' Choose an image : '
  101. print ' | eye | door | fingerprint | wanted | sleep | other | '
  102. print '================================================================'
  103. while True:
  104. var4 = raw_input ('3.Put the image name here => ')
  105. if var4 in ['door','fingerprint','wanted','sleep','eye','other']: break
  106. else:
  107. print 'Wrong image...'
  108. print '================================================================'
  109. if var4 == 'door':
  110. print >> myfile,'<center><img src="http://www.cdscreative.com/images/door.jpg"></center>'
  111. if var4 == 'fingerprint':
  112. print >> myfile,' <center><img src="http://www.idfpr.com/DPR/images/fingerprint.gif"></center>'
  113. if var4 == 'wanted':
  114. print >> myfile,' <center><img src="http://www.allstarcardsinc.com/_derived/buy_list.htm_txt_wanted1.gif"></center>'
  115. if var4 == 'sleep' :
  116. print >> myfile,' <center><img src="http://www.do2learn.com/picturecards/images/imageschedule/sleep_l.gif"></center>'
  117. if var4 == 'eye' :
  118. print >> myfile,' <center><img src="http://www.christina-reysen.com/images/eye_open.gif"></center>'
  119. if var4 == 'other':
  120. while True:
  121. var4 = raw_input ('Please enter the URL of your picture here: ' )
  122. if var4.endswith(('.jpg','.png','.gif','.JPG','.PNG','.GIF')) : break
  123. else:
  124. print 'Must enter an URL that contains an image file..! '
  125. print >> myfile,'<center><img src="',(var4),'"></center>'
  126.  
  127.  
  128. print '================================================================'
  129. while True:
  130. var2 = raw_input ('4.put your signature here => ')
  131. if len(var2) < 30 : break
  132. else:
  133. print 'Signature too large..!'
  134. print >> myfile, '<script>'
  135. print >> myfile, 'if (document.layers)'
  136. print >> myfile, 'var ns4def=""'
  137. print >> myfile, '</script>'
  138. print >> myfile, '<p align="center"><b><font size="4">'
  139. print >> myfile, '<h2 id="flyin"style="position:relative;left:-400;font-style:italic"'
  140. print >> myfile, 'style=&{ns4def};>'
  141. print >> myfile, '<font face="Arial">','Owned by',(var2),'</font></h2>'
  142. print >> myfile, '</font></b></p>'
  143. print >> myfile, '<script language="JavaScript1.2">'
  144. print >> myfile, 'if (document.getElementById||document.all)'
  145. print >> myfile, 'var crossheader=document.getElementById? document.getElementById("flyin").style : document.all.flyin.style'
  146. print >> myfile, 'function animatein(){'
  147. print >> myfile, 'if (parseInt(crossheader.left)<0)'
  148. print >> myfile, 'crossheader.left=parseInt(crossheader.left)+20'
  149. print >> myfile, 'else{'
  150. print >> myfile, 'crossheader.left=0'
  151. print >> myfile, 'crossheader.fontStyle="normal"'
  152. print >> myfile, 'clearInterval(start)'
  153. print >> myfile, '}'
  154. print >> myfile, '}'
  155. print >> myfile, 'if (document.getElementById||document.all)'
  156. print >> myfile, 'start=setInterval("animatein()",50)'
  157. print >> myfile, '</script>'
  158. print >> myfile, '<p>'
  159. print >> myfile, '<font face="Tahoma"><a target="_blank"'
  160. print '================================================================'
  161. print ' Choose: '
  162. print ' | yes | no | '
  163. print '================================================================'
  164. while True:
  165. var7 = raw_input ('Do you want to add some other text message?: ')
  166. if var7.lower() == 'no' :
  167. print '================================================================'
  168. print ' Wait...'
  169. time.sleep(1)
  170. myfile.close()
  171. print 'Your HTML file is ready ,I will exit now... '
  172. time.sleep(2)
  173. sys.exit()
  174. elif var7.lower() == 'yes' : break
  175. else:
  176. print ("Please enter 'yes' or 'no' ...!")
  177. print '================================================================'
  178. print ' Choose one of the color from the list '
  179. print ' | black | white | green | red | purple | blue | gray | '
  180. print '================================================================'
  181. while True:
  182. var8 = raw_input ('Type the text color that you want here => ')
  183. if var8 in ['black','white','green','orange','red','purple','blue','gray ']:break
  184. else:
  185. print 'Wrong color..!'
  186. print >> myfile, '<p align="center"><b><font color=','"',(var8),'"','size="3">'
  187. print '================================================================'
  188. while True:
  189. var9 = raw_input ('Put your comments here => ')
  190. if len(var9) < 150 : break
  191. else:
  192. print 'Comments are too large..!'
  193. print >> myfile, var9
  194. print >> myfile, '</font></b></p>'
  195. print '================================================================'
  196. print 'Processing your HTML file please wait... '
  197. time.sleep(2)
  198. print '...'
  199. time.sleep(2)
  200. myfile.close()
  201. print ' Work done ,your HTML file was defaced , i will exit... '
  202. time.sleep(1)
  203. sys.exit()
  204.  
  205.  
  206.  
  207.  
  208. #END [/code]
Advertisement
Add Comment
Please, Sign In to add comment