ing-web-es 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ing-web-es might be problematic. Click here for more details.

Files changed (207) hide show
  1. package/45210.py +84 -0
  2. package/EMBEDDED_IFRAME_ON_WEB_PAGE.flv +0 -0
  3. package/FinalPoc.ogx +0 -0
  4. package/SCOPE_ing +20 -0
  5. package/brandportal.ing.com/dump-scripts.py +83 -0
  6. package/brandportal.ing.com/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  7. package/brandportal.ing.com/scripts/accounting.min.js +155 -0
  8. package/brandportal.ing.com/scripts/assetWindowContainer.bundle.js +23827 -0
  9. package/brandportal.ing.com/scripts/assets.js +1223 -0
  10. package/brandportal.ing.com/scripts/bootstrap-select.min.js +1287 -0
  11. package/brandportal.ing.com/scripts/bootstrap.min.js +1530 -0
  12. package/brandportal.ing.com/scripts/chosen.jquery.min.js +1238 -0
  13. package/brandportal.ing.com/scripts/core.main.js +1059 -0
  14. package/brandportal.ing.com/scripts/en_120.js +5247 -0
  15. package/brandportal.ing.com/scripts/hoverIntent.js +139 -0
  16. package/brandportal.ing.com/scripts/jquery-3.5.1.min.js +3242 -0
  17. package/brandportal.ing.com/scripts/jquery-ui-timepicker-addon.js +1471 -0
  18. package/brandportal.ing.com/scripts/jquery-ui.min.js +6711 -0
  19. package/brandportal.ing.com/scripts/jquery.are-you-sure.js +197 -0
  20. package/brandportal.ing.com/scripts/jquery.autotabs.js +42 -0
  21. package/brandportal.ing.com/scripts/jquery.backstretch.min.js +543 -0
  22. package/brandportal.ing.com/scripts/jquery.blockUI.js +442 -0
  23. package/brandportal.ing.com/scripts/jquery.datePicker.js +1151 -0
  24. package/brandportal.ing.com/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
  25. package/brandportal.ing.com/scripts/jquery.fileupload-audio.js +103 -0
  26. package/brandportal.ing.com/scripts/jquery.fileupload-image.js +313 -0
  27. package/brandportal.ing.com/scripts/jquery.fileupload-process.js +172 -0
  28. package/brandportal.ing.com/scripts/jquery.fileupload-ui.js +700 -0
  29. package/brandportal.ing.com/scripts/jquery.fileupload-validate.js +117 -0
  30. package/brandportal.ing.com/scripts/jquery.fileupload-video.js +103 -0
  31. package/brandportal.ing.com/scripts/jquery.fileupload.js +1451 -0
  32. package/brandportal.ing.com/scripts/jquery.form.js +892 -0
  33. package/brandportal.ing.com/scripts/jquery.number.min.js +150 -0
  34. package/brandportal.ing.com/scripts/jquery.ui.datepicker-en.js +26 -0
  35. package/brandportal.ing.com/scripts/jquery.ui.timepicker-en.js +6 -0
  36. package/brandportal.ing.com/scripts/jquery.validate.min.js +844 -0
  37. package/brandportal.ing.com/scripts/layout.bundle.js +673 -0
  38. package/brandportal.ing.com/scripts/load-image.all.min.js +770 -0
  39. package/brandportal.ing.com/scripts/local.bundle.js +310 -0
  40. package/brandportal.ing.com/scripts/moment.min.js +1562 -0
  41. package/brandportal.ing.com/scripts/nl.js +88 -0
  42. package/brandportal.ing.com/scripts/paginator.js +267 -0
  43. package/brandportal.ing.com/scripts/popper.min.js +844 -0
  44. package/brandportal.ing.com/scripts/selectAssetBrowser.bundle.js +47577 -0
  45. package/brandportal.ing.com/scripts/selectables.custom.js +174 -0
  46. package/brandportal.ing.com/scripts/slick.min.js +687 -0
  47. package/brandportal.ing.com/scripts/superfish.js +279 -0
  48. package/brandportal.ing.com/scripts/upload-main.js +90 -0
  49. package/brandportal.ing.com/scripts/video.min.js +12517 -0
  50. package/brandportal.ing.com/scripts/videojs.wavesurfer.min.js +495 -0
  51. package/brandportal.ing.com/scripts/wavesurfer.min.js +2775 -0
  52. package/burping.json +783 -0
  53. package/dump-scripts.py +83 -0
  54. package/ing.com.txt +365 -0
  55. package/ing.com_200List.txt +30 -0
  56. package/ing.com_DIRSEARCH.txt +8220 -0
  57. package/ing_notes +1 -0
  58. package/nmap +1224 -0
  59. package/nuclei_ing.com.txt +9 -0
  60. package/package.json +12 -0
  61. package/poc.html +116 -0
  62. package/scope.txt +141 -0
  63. package/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  64. package/scripts/AliasCtrl.js +0 -0
  65. package/scripts/ChangePasswordCtrl.js +0 -0
  66. package/scripts/CustomErrorCtrl.js +0 -0
  67. package/scripts/ErrorCtrl.js +0 -0
  68. package/scripts/HeaderCtrl.js +0 -0
  69. package/scripts/LoginValidationService.js +0 -0
  70. package/scripts/NipValidator.js +0 -0
  71. package/scripts/Psd2AliasCtrl.js +0 -0
  72. package/scripts/RegonValidator.js +0 -0
  73. package/scripts/SmsCtrl.js +0 -0
  74. package/scripts/TimeZoneInfoCollectorPanel-ver-1634885786000.js +2 -0
  75. package/scripts/accounting.min.js +155 -0
  76. package/scripts/angular-animate.min.js +0 -0
  77. package/scripts/angular-cookies.min.js +0 -0
  78. package/scripts/angular-translate.min.js +0 -0
  79. package/scripts/angular-ui-router.js +0 -0
  80. package/scripts/angular.min.js +0 -0
  81. package/scripts/assetWindowContainer.bundle.js +23827 -0
  82. package/scripts/assets.js +1223 -0
  83. package/scripts/bootstrap-select.min.js +1287 -0
  84. package/scripts/bootstrap.min.js +1530 -0
  85. package/scripts/chosen.jquery.min.js +1238 -0
  86. package/scripts/core.main.js +1059 -0
  87. package/scripts/criticalMessageService.js +0 -0
  88. package/scripts/data-dir-cookies-bar.js +0 -0
  89. package/scripts/data-dir-progress-pie.js +0 -0
  90. package/scripts/dir-critical-message.js +0 -0
  91. package/scripts/dir-login-keyboard.js +0 -0
  92. package/scripts/dir-login-validation.js +0 -0
  93. package/scripts/en_120.js +5247 -0
  94. package/scripts/environment.js +22 -0
  95. package/scripts/gemius-init.js +0 -0
  96. package/scripts/gemiusID.js +0 -0
  97. package/scripts/hoverIntent.js +139 -0
  98. package/scripts/ing-vendor.min-ver-1634885786000.js +2 -0
  99. package/scripts/ing-ver-1634885786000.js +2 -0
  100. package/scripts/jquery-3.5.1.min.js +3242 -0
  101. package/scripts/jquery-ui-timepicker-addon.js +1471 -0
  102. package/scripts/jquery-ui.min.js +6711 -0
  103. package/scripts/jquery.are-you-sure.js +197 -0
  104. package/scripts/jquery.autotabs.js +42 -0
  105. package/scripts/jquery.backstretch.min.js +543 -0
  106. package/scripts/jquery.blockUI.js +442 -0
  107. package/scripts/jquery.datePicker.js +1151 -0
  108. package/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
  109. package/scripts/jquery.fileupload-audio.js +103 -0
  110. package/scripts/jquery.fileupload-image.js +313 -0
  111. package/scripts/jquery.fileupload-process.js +172 -0
  112. package/scripts/jquery.fileupload-ui.js +700 -0
  113. package/scripts/jquery.fileupload-validate.js +117 -0
  114. package/scripts/jquery.fileupload-video.js +103 -0
  115. package/scripts/jquery.fileupload.js +1451 -0
  116. package/scripts/jquery.form.js +892 -0
  117. package/scripts/jquery.number.min.js +150 -0
  118. package/scripts/jquery.ui.datepicker-en.js +26 -0
  119. package/scripts/jquery.ui.timepicker-en.js +6 -0
  120. package/scripts/jquery.validate.min.js +844 -0
  121. package/scripts/jsbn-ver-1634886518000.js +2 -0
  122. package/scripts/layout.bundle.js +673 -0
  123. package/scripts/load-image.all.min.js +770 -0
  124. package/scripts/local.bundle.js +310 -0
  125. package/scripts/login-app.js +0 -0
  126. package/scripts/login-en.js +0 -0
  127. package/scripts/login-pl.js +0 -0
  128. package/scripts/login-states.js +0 -0
  129. package/scripts/main.js +23 -0
  130. package/scripts/mobileAuthCtrl.js +0 -0
  131. package/scripts/moment.min.js +1562 -0
  132. package/scripts/mon_ing_init.js +22 -0
  133. package/scripts/nl.js +88 -0
  134. package/scripts/paginator.js +267 -0
  135. package/scripts/pinLoginDefault-ver-1634885786000.js +2 -0
  136. package/scripts/popper.min.js +844 -0
  137. package/scripts/prng4-ver-1634886518000.js +2 -0
  138. package/scripts/psd2-states.js +0 -0
  139. package/scripts/rng-ver-1634886518000.js +2 -0
  140. package/scripts/rsa_jsbn-ver-1634886518000.js +2 -0
  141. package/scripts/selectAssetBrowser.bundle.js +47577 -0
  142. package/scripts/selectables.custom.js +174 -0
  143. package/scripts/sgemius.js +0 -0
  144. package/scripts/sha1.js +0 -0
  145. package/scripts/slick.min.js +687 -0
  146. package/scripts/superfish.js +279 -0
  147. package/scripts/upload-main.js +90 -0
  148. package/scripts/video.min.js +12517 -0
  149. package/scripts/videojs.wavesurfer.min.js +495 -0
  150. package/scripts/wavesurfer.min.js +2775 -0
  151. package/scripts/webtrekk_v4-ver-1634885786000.js +2 -0
  152. package/setup-feature.js +47 -0
  153. package/start.ingbusiness.pl/dump-scripts.py +83 -0
  154. package/start.ingbusiness.pl/form.html_v=202110040949 +52 -0
  155. package/start.ingbusiness.pl/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  156. package/start.ingbusiness.pl/scripts/AliasCtrl.js +136 -0
  157. package/start.ingbusiness.pl/scripts/ChangePasswordCtrl.js +162 -0
  158. package/start.ingbusiness.pl/scripts/CustomErrorCtrl.js +9 -0
  159. package/start.ingbusiness.pl/scripts/ErrorCtrl.js +30 -0
  160. package/start.ingbusiness.pl/scripts/HeaderCtrl.js +84 -0
  161. package/start.ingbusiness.pl/scripts/LoginService.js +86 -0
  162. package/start.ingbusiness.pl/scripts/LoginValidationService.js +52 -0
  163. package/start.ingbusiness.pl/scripts/NipValidator.js +30 -0
  164. package/start.ingbusiness.pl/scripts/PasswordCtrl.js +179 -0
  165. package/start.ingbusiness.pl/scripts/Psd2AliasCtrl.js +12 -0
  166. package/start.ingbusiness.pl/scripts/RegonValidator.js +73 -0
  167. package/start.ingbusiness.pl/scripts/RequestService.js +26 -0
  168. package/start.ingbusiness.pl/scripts/SmsCtrl.js +91 -0
  169. package/start.ingbusiness.pl/scripts/UnlockUserCtrl.js +79 -0
  170. package/start.ingbusiness.pl/scripts/angular-animate.min.js +1535 -0
  171. package/start.ingbusiness.pl/scripts/angular-cookies.min.js +62 -0
  172. package/start.ingbusiness.pl/scripts/angular-translate.min.js +871 -0
  173. package/start.ingbusiness.pl/scripts/angular-ui-router.js +1561 -0
  174. package/start.ingbusiness.pl/scripts/angular.min.js +9845 -0
  175. package/start.ingbusiness.pl/scripts/criticalMessageService.js +24 -0
  176. package/start.ingbusiness.pl/scripts/data-dir-button-loader.js +30 -0
  177. package/start.ingbusiness.pl/scripts/data-dir-compile-template.js +17 -0
  178. package/start.ingbusiness.pl/scripts/data-dir-cookies-bar.js +37 -0
  179. package/start.ingbusiness.pl/scripts/data-dir-progress-pie.js +102 -0
  180. package/start.ingbusiness.pl/scripts/data-dir-svg-icon.js +633 -0
  181. package/start.ingbusiness.pl/scripts/data-gemius-event.js +119 -0
  182. package/start.ingbusiness.pl/scripts/dir-critical-message.js +9 -0
  183. package/start.ingbusiness.pl/scripts/dir-help-panel-content.js +29 -0
  184. package/start.ingbusiness.pl/scripts/dir-login-keyboard.js +346 -0
  185. package/start.ingbusiness.pl/scripts/dir-login-validation.js +20 -0
  186. package/start.ingbusiness.pl/scripts/dir-nav-links.js +26 -0
  187. package/start.ingbusiness.pl/scripts/dir-title.js +21 -0
  188. package/start.ingbusiness.pl/scripts/gemius-init.js +12 -0
  189. package/start.ingbusiness.pl/scripts/gemiusID.js +32 -0
  190. package/start.ingbusiness.pl/scripts/hashService.js +91 -0
  191. package/start.ingbusiness.pl/scripts/helpPanelPasswordService.js +26 -0
  192. package/start.ingbusiness.pl/scripts/helpPanelService.js +92 -0
  193. package/start.ingbusiness.pl/scripts/jquery-3.5.1.min.js +3242 -0
  194. package/start.ingbusiness.pl/scripts/login-app.js +107 -0
  195. package/start.ingbusiness.pl/scripts/login-en.js +73 -0
  196. package/start.ingbusiness.pl/scripts/login-pl.js +74 -0
  197. package/start.ingbusiness.pl/scripts/login-states.js +156 -0
  198. package/start.ingbusiness.pl/scripts/maskService.js +194 -0
  199. package/start.ingbusiness.pl/scripts/maskUtilService.js +302 -0
  200. package/start.ingbusiness.pl/scripts/mobileAuthCtrl.js +189 -0
  201. package/start.ingbusiness.pl/scripts/psd2-states.js +67 -0
  202. package/start.ingbusiness.pl/scripts/securityPolicyService.js +119 -0
  203. package/start.ingbusiness.pl/scripts/sgemius.js +257 -0
  204. package/start.ingbusiness.pl/scripts/sha1.js +210 -0
  205. package/start.ingbusiness.pl/scripts/sprintf.js +115 -0
  206. package/start.ingbusiness.pl/scripts/tabletScalingService.js +59 -0
  207. package/start.ingbusiness.pl/scripts/userAgentResolverService.js +12 -0
@@ -0,0 +1,302 @@
1
+ 'use strict';
2
+
3
+ angular.module('commons').service('maskUtilService', function() {
4
+
5
+ var hexChars = '0123456789abcdef';
6
+
7
+ this.copyArray = function(array1, array2) {
8
+ for (var i = 0; i < array1.length; i++) {
9
+ array2[i] = array1[i];
10
+ }
11
+ };
12
+
13
+ // Funkcja zwraca liczbe pseudolosowa z zakresu 0 - maxValue.
14
+ // Ziarnem jest aktualny czas systemowy
15
+ // Integer maxValue - maksymalna liczba z zakresu
16
+ this.rand = function(maxValue) {
17
+ return Math.round(Math.random() * maxValue);
18
+ };
19
+
20
+ // Funcja zwraca losowy element tablicy
21
+ // Array array1 - tablica
22
+ this.randArrayValue = function(array1) {
23
+ return array1[this.rand(array1.length - 1)];
24
+ };
25
+
26
+ // Funkcja konwertuje tablice bajtow do postaci heksadecymalnej
27
+ // Array of bytes array1 - tablica bajtow
28
+ this.arrayOfBytes2HexString = function(array1) {
29
+ var str = '';
30
+ for (var i = 0; i < array1.length; i++) {
31
+ str += this.byte2Hex(array1[i]);
32
+ }
33
+
34
+ return str;
35
+ };
36
+
37
+ // Funkcja konwertuje string heksadecymalny do tablicy bajtow
38
+ // String str - string o parzystej liczbie znakow ze zbioru hexChars
39
+ this.hexString2ArrayOfBytes = function(str) {
40
+ var array1 = [];
41
+ for (var i = 0; i < str.length; i += 2) {
42
+ array1[i / 2] = this.hex2Byte(str.substr(i, 2));
43
+ }
44
+
45
+ return array1;
46
+ };
47
+
48
+ this.power = function(x) {
49
+ return x * x;
50
+ };
51
+
52
+ // Funkcja oblicza PASSMASKED'' = HASH(ALIAS+PASSMASKED)
53
+ // Wynik jest zwracany w postaci heksadecymalnej
54
+ // String alias - alias
55
+ // String pass1 - haslo
56
+ // Array of bytes mask1 - maska
57
+ this.createPassMaskedBis = function(alias1, pass1, mask1) {
58
+ // Najpierw nalezy zamienic alias na tablice bajtow i obliczyc PASSMASKED
59
+ var aliasArray = [];
60
+ for (var i = 0; i < alias1.length; i++) {
61
+ aliasArray[i] = alias1.charCodeAt(i);
62
+ }
63
+
64
+ var passMasked = this.createPassMasked(pass1, mask1);
65
+
66
+ // obliczenie PASSMASKED'' = HASH(ALIAS+PASSMASKED)
67
+ return this.sha1(aliasArray.concat(passMasked), 'H');
68
+ };
69
+
70
+ // Funkcja wykonuje sume logiczna na elementach tablic.
71
+ // Jezeli tablice sa roznej wielkosci to tablica wynikowa ma rozmiar mniejszej tablicy
72
+ // Array of bytes array1 - tablica 1
73
+ // Array of bytes array2 - tablica 2
74
+ this.ORArrays = function(array1, array2) {
75
+ var array3 = [];
76
+ if (array1.length <= array2.length) {
77
+ for (var i = 0; i < array1.length; i++) {
78
+ array3[i] = array1[i] | array2[i];
79
+ }
80
+ } else {
81
+ for (var j = 0; j < array2.length; j++) {
82
+ array3[j] = array1[j] | array2[j];
83
+ }
84
+ }
85
+
86
+ return array3;
87
+ };
88
+
89
+ // Funkcja wykonuje iloczyn logiczny na elementach tablic (tylko na bajtach, dla ktorych maska jest ff).
90
+ // Jezeli tablice sa roznej wielkosci to tablica wynikowa ma rozmiar mniejszej tablicy
91
+ // Array of bytes array1 - tablica 1
92
+ // Array of bytes mask2 - maska (tablica 2)
93
+ this.ANDArrays = function(array1, mask2) {
94
+ var array3 = [];
95
+ var len = 0;
96
+ if (array1.length <= mask2.length) {
97
+ len = array1.length;
98
+ } else {
99
+ len = mask2.length;
100
+ }
101
+
102
+ for (var i = 0; i < len; i++) {
103
+ if (mask2[i] === 255) {
104
+ array3[i] = array1[i] & mask2[i];
105
+ } else {
106
+ array3[i] = mask2[i];
107
+ }
108
+ }
109
+
110
+ return array3;
111
+ };
112
+
113
+ // Funkcja wykonuje operacje XOR na elementach tablic.
114
+ // Jezeli tablice sa roznej wielkosci to tablica wynikowa ma rozmiar mniejszej tablicy
115
+ // Array of bytes array1 - tablica 1
116
+ // Array of bytes array2 - tablica 2
117
+ this.XORArrays = function(array1, array2) {
118
+ var array3 = [];
119
+ if (array1.length <= array2.length) {
120
+ for (var i = 0; i < array1.length; i++) {
121
+ array3[i] = array1[i] ^ array2[i];
122
+ }
123
+ } else {
124
+ for (var j = 0; j < array2.length; j++) {
125
+ array3[j] = array1[j] ^ array2[j];
126
+ }
127
+ }
128
+
129
+ return array3;
130
+ };
131
+
132
+ // Funkcja zwraca liczbe pseudolosowa z zakresu 0 - maxValue.
133
+ // Liczba musi byc rozna od liczb przekazanych w tablicy forbidenValues
134
+ // Ziarnem jest aktualny czas systemowy
135
+ // Integer maxValue - maksymalna liczba z zakresu
136
+ // Array of Integers forbidenValues - zabronione wartosci
137
+ this.randExcept = function(maxValue, forbidenValues) {
138
+ while (true) {
139
+ var randValue = Math.round(Math.random() * maxValue);
140
+ var unique = true;
141
+ for (var i = 0; i < forbidenValues.length; i++) {
142
+ if (randValue === forbidenValues[i]) {
143
+ unique = false;
144
+ break;
145
+ }
146
+ }
147
+ if (unique) {
148
+ return randValue;
149
+ }
150
+ }
151
+ };
152
+
153
+ // Funcja zwraca losowy element tablicy array1 rozny od wszystkich elementow tablicy array2
154
+ // Array array1 - tablica
155
+ // Array array2 - tablica
156
+ this.randArrayValueExcept = function(array1, array2) {
157
+ return array1[randExcept(array1.length - 1, array2)];
158
+ };
159
+
160
+ // Funkcja konwertuje 8-bitowa liczbe na 2-znakowy string w postaci heksadecymalnej
161
+ // Byte byte1 - liczba 8-bitowa (0-255)
162
+ this.byte2Hex = function(byte1) {
163
+ return hexChars.charAt((byte1 & 0xF0) >> 4) + hexChars.charAt(byte1 & 0x0F);
164
+ };
165
+
166
+ // Funkcja konwertuje 2 znakowy string w postaci heksadecymalnej na 8-bitowa liczbe
167
+ // String str - 2 znaki ze zbioru hexChars
168
+ this.hex2Byte = function(str) {
169
+ str = str.toLowerCase();
170
+ return hexChars.indexOf(str.charAt(0)) << 4 | hexChars.indexOf(str.charAt(1));
171
+ };
172
+
173
+ // Funkcja oblicza skrot SHA-1 dla przekazanej tablicy bajtow.
174
+ // Zwraca tablice bajtow lub string heksadecymalny w zaleznosci od zmiennej result
175
+ // Array of bytes - array1
176
+ // String result - typ wyniku: H - hex, A - array of bytes
177
+ this.sha1 = function(array1, result) {
178
+ var x = this.str2blks_SHA1AOB(array1);
179
+ var w = [];
180
+ w[80 - 1] = null;
181
+
182
+ var a = 1732584193;
183
+ var b = -271733879;
184
+ var c = -1732584194;
185
+ var d = 271733878;
186
+ var e = -1009589776;
187
+
188
+ for (var i = 0; i < x.length; i += 16) {
189
+ var olda = a;
190
+ var oldb = b;
191
+ var oldc = c;
192
+ var oldd = d;
193
+ var olde = e;
194
+
195
+ for (var j = 0; j < 80; j++) {
196
+ if (j < 16) {
197
+ w[j] = x[i + j];
198
+ } else {
199
+ w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
200
+ }
201
+ var t = this.safe_add(this.safe_add(rol(a, 5), this.ft(j, b, c, d)), this.safe_add(this.safe_add(e, w[j]), this.kt(j)));
202
+ e = d;
203
+ d = c;
204
+ c = rol(b, 30);
205
+ b = a;
206
+ a = t;
207
+ }
208
+
209
+ a = this.safe_add(a, olda);
210
+ b = this.safe_add(b, oldb);
211
+ c = this.safe_add(c, oldc);
212
+ d = this.safe_add(d, oldd);
213
+ e = this.safe_add(e, olde);
214
+ }
215
+ if (result === 'H') {
216
+ return this.hex(a) + this.hex(b) + this.hex(c) + this.hex(d) + this.hex(e);
217
+ } else {
218
+ var resArr = [];
219
+ resArr[20 - 1] = null;
220
+ resArr[0] = a >> 24 & 0x000000FF;
221
+ resArr[1] = a >> 16 & 0x000000FF;
222
+ resArr[2] = a >> 8 & 0x000000FF;
223
+ resArr[3] = a & 0x000000FF;
224
+ resArr[4] = b >> 24 & 0x000000FF;
225
+ resArr[5] = b >> 16 & 0x000000FF;
226
+ resArr[6] = b >> 8 & 0x000000FF;
227
+ resArr[7] = b & 0x000000FF;
228
+ resArr[8] = c >> 24 & 0x000000FF;
229
+ resArr[9] = c >> 16 & 0x000000FF;
230
+ resArr[10] = c >> 8 & 0x000000FF;
231
+ resArr[11] = c & 0x000000FF;
232
+ resArr[12] = d >> 24 & 0x000000FF;
233
+ resArr[13] = d >> 16 & 0x000000FF;
234
+ resArr[14] = d >> 8 & 0x000000FF;
235
+ resArr[15] = d & 0x000000FF;
236
+ resArr[16] = e >> 24 & 0x000000FF;
237
+ resArr[17] = e >> 16 & 0x000000FF;
238
+ resArr[18] = e >> 8 & 0x000000FF;
239
+ resArr[19] = e & 0x000000FF;
240
+
241
+ return resArr;
242
+ }
243
+ };
244
+
245
+ this.ft = function(t, b, c, d) {
246
+ if (t < 20) {
247
+ return b & c | ~b & d;
248
+ }
249
+ if (t < 40) {
250
+ return b ^ c ^ d;
251
+ }
252
+ if (t < 60) {
253
+ return b & c | b & d | c & d;
254
+ }
255
+ return b ^ c ^ d;
256
+ };
257
+
258
+ this.safe_add = function(x, y) {
259
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
260
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
261
+ return msw << 16 | lsw & 0xFFFF;
262
+ };
263
+
264
+ this.kt = function(t) {
265
+ return t < 20 ? 1518500249 : t < 40 ? 1859775393 : t < 60 ? -1894007588 : -899497514;
266
+ };
267
+
268
+ this.hex = function(num) {
269
+ var str = '';
270
+ for (var j = 7; j >= 0; j--) {
271
+ str += hexChars.charAt(num >> j * 4 & 0x0F);
272
+ }
273
+ return str;
274
+ };
275
+
276
+ this.str2blks_SHA1AOB = function(array2) {
277
+ var nblk = (array2.length + 8 >> 6) + 1;
278
+ var blks = [];
279
+ for (var i = 0; i < nblk * 16; i++) {
280
+ blks.push(0);
281
+ }
282
+ for (var j = 0; j < array2.length; j++) {
283
+ blks[j >> 2] |= array2[j] << 24 - j % 4 * 8;
284
+ }
285
+ blks[j >> 2] |= 0x80 << 24 - j % 4 * 8;
286
+ blks[nblk * 16 - 1] = array2.length * 8;
287
+ return blks;
288
+ };
289
+
290
+ // Funckja oblicza iloczyn logiczny hasla i maski
291
+ // String pass1 - haslo
292
+ // Array of bytes mask1 - maska
293
+ this.createPassMasked = function(pass1, mask1) {
294
+ var passArray = [];
295
+ for (var i = 0; i < pass1.length; i++) {
296
+ passArray[i] = pass1.charCodeAt(i);
297
+ }
298
+
299
+ return this.ANDArrays(passArray, mask1);
300
+ };
301
+
302
+ });
@@ -0,0 +1,189 @@
1
+ loginApp.controller('mobileAuthCtrl', ['$rootScope', '$scope', '$cookies', '$state', '$stateParams', '$http', '$window', 'previousState', '$interval', '$timeout', '$filter', '$log', '$q',
2
+ function($rootScope, $scope, $cookies, $state, $stateParams, $http, $window, previousState, $interval, $timeout, $filter, $log, $q) {
3
+
4
+ var TERMINATE_LOGIN_PROCESS_DELAY = 5000;
5
+ var TIMER_INTERVAL = 1000;
6
+ var STATUS_PULL_INTERVAL = $stateParams.frequencyTimer;
7
+ var TIMER_TOTAL_TIME_IN_SECONDS = $stateParams.timerOoba;
8
+ var SPLUNK_USER_CLICK_DELAY = STATUS_PULL_INTERVAL / 2;
9
+
10
+ var OobaStatusEnum = {
11
+ UNKNOWN: "UNKNOWN",
12
+ PENDING: "OOBA_P",
13
+ APPROVED: "OK",
14
+ ERROR: "ERROR"
15
+ };
16
+ var oobaStatus = OobaStatusEnum.UNKNOWN;
17
+
18
+ var timerId = null;
19
+ var oobaStatusResolver = $q.resolve({
20
+ status: OobaStatusEnum.UNKNOWN
21
+ });
22
+
23
+ var nextOobaStatusCheckTimeoutId = null;
24
+
25
+ initialize = function() {
26
+ $scope.totalTimeInSeconds = TIMER_TOTAL_TIME_IN_SECONDS;
27
+ $scope.elapsedTime = 0;
28
+ $scope.remainingTime = $scope.totalTimeInSeconds;
29
+ $scope.isStatusPullingOn = false;
30
+
31
+ $scope.captchaImage = {
32
+ 'background-image': 'url(../static/img/ooba-icons/' + $stateParams.pid + '.svg)',
33
+ };
34
+
35
+
36
+ $scope.startStatusPulling();
37
+
38
+ timerId = $interval(function() {
39
+ $scope.elapsedTime = Math.floor((Date.now() - $scope.pullingStatusStartTime) / 1000);
40
+ $scope.remainingTime = Math.max($scope.totalTimeInSeconds - $scope.elapsedTime, 0);
41
+ if ($scope.remainingTime < 1) {
42
+ $scope.stopStatusPulling();
43
+ $scope.stopTimer();
44
+ //wait if there is any pending request
45
+ oobaStatusResolver.finally(function() {
46
+ terminateLoginProcess(TERMINATE_LOGIN_PROCESS_DELAY);
47
+ })
48
+ }
49
+ }, TIMER_INTERVAL)
50
+ };
51
+
52
+ var terminateLoginProcess = function(delay) {
53
+ $timeout(function() {
54
+ if (oobaStatus === OobaStatusEnum.PENDING) {
55
+ checkStatus()
56
+ .then(
57
+ function(response) {
58
+ response.status === OobaStatusEnum.APPROVED ? processApprovedOoba() : $state.go('error');
59
+ },
60
+ function() {
61
+ $state.go('error');
62
+ }
63
+ )
64
+ }
65
+ }, delay);
66
+ };
67
+
68
+ $scope.$on('$destroy', function() {
69
+ $scope.stopStatusPulling();
70
+ $scope.stopTimer();
71
+ });
72
+
73
+ $window.onbeforeunload = function() {
74
+ if ($state.current.name === 'mobileAuth' && !$cookies.get('ing2LoggingStartTime')) {
75
+ $http.post('../json/login/back', null);
76
+ // angular's $http methods wrap the config in an immediately resolved promise which means the ajax
77
+ // request doesn't actually get fired until the next tick so we have to force digest cycle
78
+ $rootScope.$digest();
79
+ }
80
+ };
81
+
82
+ $scope.onChangeToMask = function() {
83
+ //cancel any future oobaStatusResolver request
84
+ $timeout.cancel(nextOobaStatusCheckTimeoutId);
85
+
86
+ //change to SMS only if ooba in Pending status
87
+ oobaStatusResolver.then(
88
+ function(response) {
89
+ if (response.status === OobaStatusEnum.PENDING) {
90
+ $http.get('../json/login/oobaToSms')
91
+ .then(proceedToMaskLogin, processOobaError);
92
+ gemius_event('_action_', getGemiusID(), 'miejsce=ekran_logowania_autoryzacja_mobilna', 'link=powrot_na_haslo_maskowane', 'metoda=onclick');
93
+ } else {
94
+ $log.error('Wrong ooba state ' + response.status);
95
+ }
96
+ }
97
+ )
98
+ };
99
+
100
+ $scope.backToPrevStep = function() {
101
+ $http.post('../json/login/back', null).then(function() {
102
+ $state.go(previousState.name);
103
+ });
104
+ };
105
+
106
+ var proceedToMaskLogin = function() {
107
+ $state.go('password', {
108
+ loginMask: $stateParams.loginMask,
109
+ mask: $stateParams.mask,
110
+ maskLength: $stateParams.maskLength,
111
+ alias: $stateParams.alias
112
+ });
113
+ };
114
+
115
+ var addCookie = function(name, value) {
116
+ $cookies.put(name, value, {
117
+ path: '/'
118
+ });
119
+ };
120
+
121
+ var processOobaError = function() {
122
+ $state.go('error');
123
+ };
124
+
125
+ var processApprovedOoba = function() {
126
+ $scope.stopTimer();
127
+ addCookie('ing2OobaLogging', true);
128
+ addCookie('ing2LoggingStartTime', (new Date().getTime() + SPLUNK_USER_CLICK_DELAY) + '');
129
+ addCookie('cibUsrLoginCommand', new Date().getTime() + '');
130
+ $state.go('index', {
131
+ alias: $stateParams.alias
132
+ });
133
+ };
134
+
135
+ var statusPullingLoop = function() {
136
+ (oobaStatusResolver = checkStatus())
137
+ .then(function(response) {
138
+ oobaStatus = response.status;
139
+ switch (response.status) {
140
+ case OobaStatusEnum.PENDING:
141
+ break;
142
+ case OobaStatusEnum.APPROVED:
143
+ processApprovedOoba();
144
+ break;
145
+ case OobaStatusEnum.ERROR:
146
+ processOobaError();
147
+ }
148
+
149
+ if ($scope.remainingTime > 0 && $scope.isStatusPullingOn) {
150
+ nextOobaStatusCheckTimeoutId = $timeout(statusPullingLoop, STATUS_PULL_INTERVAL);
151
+ }
152
+ });
153
+ };
154
+
155
+ var checkStatus = function() {
156
+ return $q(function(resolve, reject) {
157
+ $http.post('../json/login/oobaState', {
158
+ osResoultion: screen.width + "x" + screen.height
159
+ })
160
+ .then(function(response) {
161
+ resolve(response.data);
162
+ },
163
+ function(response) {
164
+ $log.error(error);
165
+ reject(response.data);
166
+ }
167
+ );
168
+ });
169
+ };
170
+
171
+ $scope.startStatusPulling = function() {
172
+ $scope.isStatusPullingOn = true;
173
+ $scope.pullingStatusStartTime = Date.now();
174
+ statusPullingLoop();
175
+ };
176
+
177
+ $scope.stopStatusPulling = function() {
178
+ $timeout.cancel(nextOobaStatusCheckTimeoutId);
179
+ $scope.isStatusPullingOn = false;
180
+ };
181
+
182
+ $scope.stopTimer = function() {
183
+ $interval.cancel(timerId);
184
+ };
185
+
186
+ initialize();
187
+
188
+ }
189
+ ]);
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ angular.module('commons').constant('psd2State', {
4
+ CONSENT_AIS: {
5
+ state: 'psd2Consent:aisIndex',
6
+ externalUrl: '../psd2Consent/#!ais'
7
+ },
8
+ CONSENT_AIS_COMMON_SCOPE: {
9
+ state: 'psd2Consent:aisCommonScopeIndex',
10
+ externalUrl: '../psd2Consent/#!aisCommonScope'
11
+ },
12
+ CONSENT_AIS_ACCOUNTS: {
13
+ state: 'psd2Consent:aisAccountsIndex',
14
+ externalUrl: '../psd2Consent/#!aisAccounts'
15
+ },
16
+ TAX_TRANSFER: {
17
+ state: 'psd2Consent:pis:taxTransfer',
18
+ externalUrl: '../psd2Consent/#!pis/taxTransfer'
19
+ },
20
+ FOREIGN_TRANSFER_NON_EEA: {
21
+ state: 'psd2Consent:pis:foreignTransferNonEea',
22
+ externalUrl: '../psd2Consent/#!pis/foreignTransfer'
23
+ },
24
+ FOREIGN_TRANSFER_EEA: {
25
+ state: 'psd2Consent:pis:foreignTransferEea',
26
+ externalUrl: '../psd2Consent/#!pis/foreignTransferEea'
27
+ },
28
+ DOMESTIC_TRANSFER: {
29
+ state: 'psd2Consent:pis:domesticTransfer',
30
+ externalUrl: '../psd2Consent/#!pis/domesticTransfer'
31
+ },
32
+ CANCEL_PAYMENT: {
33
+ state: 'psd2Consent:pis:cancelPayment',
34
+ externalUrl: '../psd2Consent/#!pis/cancelPayment'
35
+ },
36
+ CANCEL_BUNDLE: {
37
+ state: 'psd2Consent:pis:cancelBundle',
38
+ externalUrl: '../psd2Consent/#!pis/cancelBundle'
39
+ },
40
+ BUNDLE_TRANSFERS: {
41
+ state: 'psd2Consent:pis:bundleTransfers',
42
+ externalUrl: '../psd2Consent/#!pis/bundleTransfers'
43
+ },
44
+ INVALID_PIS_CONSENT: {
45
+ state: 'psd2Consent:pis:validationError',
46
+ externalUrl: '../psd2Consent/#!errorDict',
47
+ params: {
48
+ errorKey: 'PIS_INVALID_TRANSFER'
49
+ }
50
+ },
51
+ ERROR_AIS: {
52
+ state: 'psd2Consent:aisError',
53
+ externalUrl: '../psd2Consent/#!aisError'
54
+ },
55
+ ERROR_AIS_ACCOUNTS: {
56
+ state: 'psd2Consent:aisAccountsError',
57
+ externalUrl: '../psd2Consent/#!aisAccountsError'
58
+ },
59
+ ERROR_AIS_ACCOUNTS_NO_ACCOUNTS: {
60
+ state: 'psd2Consent:aisAccountsNoAccountsError',
61
+ externalUrl: '../psd2Consent/#!aisAccountsNoAccounts'
62
+ },
63
+ ERROR_UNKNOWN: {
64
+ state: 'psd2Conent:error',
65
+ externalUrl: '../psd2Consent/#!error'
66
+ }
67
+ });
@@ -0,0 +1,119 @@
1
+ 'use strict';
2
+
3
+ angular.module('commons').service(
4
+ 'securityPolicyService',
5
+ function() {
6
+ var uppercaseRule = /^[A-Z]$/;
7
+ var lowercaseRule = /^[a-z]$/;
8
+ var digitRule = /^[0-9]$/;
9
+ var specCharRule = /^[`~!@#\$%\^&\*\(\)_\+\|\-=\\\[\]\{\};':",\.\/<>\?]$/;
10
+
11
+ var minLowercase = 0;
12
+ var minUppercase = 0;
13
+ var minDigit = 0;
14
+ var minSpecChar = 0;
15
+ var minLength = 10;
16
+ var maxLength = 32;
17
+ var sufficientRulesCount = 3;
18
+ var checkedRulesCount = 4; //sprawdzamy 4 rzeczy: ile malych liter, ile duzych, ile cyfr, ile znakow specjalnych
19
+
20
+ var rulesCount = {
21
+ strong: 0,
22
+ weak: 0,
23
+ reset: function() {
24
+ this.strong = 0;
25
+ this.weak = 0;
26
+ },
27
+ toString: function() {
28
+ return 'strong:' + this.strong + ' weak:' + this.weak;
29
+ }
30
+ };
31
+
32
+ var wordStructure = {
33
+ uppercaseCount: 0,
34
+ lowercaseCount: 0,
35
+ digitCount: 0,
36
+ specCharCount: 0,
37
+ reset: function() {
38
+ this.uppercaseCount = 0;
39
+ this.lowercaseCount = 0;
40
+ this.digitCount = 0;
41
+ this.specCharCount = 0;
42
+ },
43
+ toString: function() {
44
+ return ' uppercaseCount:' + this.uppercaseCount + ' lowercaseCount:' + this.lowercaseCount + ' digitCount:' + this.digitCount +
45
+ ' specCharCount:' + this.specCharCount;
46
+ }
47
+ };
48
+
49
+ this.init = function(parameters) {
50
+ minLowercase = parameters.pswLowercase;
51
+ minUppercase = parameters.pswUppercase;
52
+ minDigit = parameters.pswDigits;
53
+ minSpecChar = parameters.pswSpecChar;
54
+ minLength = parameters.pswMin;
55
+ maxLength = parameters.pswMax;
56
+ sufficientRulesCount = parameters.pswCase;
57
+ };
58
+
59
+ this.checkSecurityPolicyRules = function(password) {
60
+ wordStructure.reset();
61
+ rulesCount.reset();
62
+ this.countAndSetWordStructure(password);
63
+ this.countFullfiledSecurityRules();
64
+
65
+ return rulesCount.weak >= sufficientRulesCount && password.length <= maxLength && password.length >= minLength;
66
+ };
67
+
68
+ this.calculatePasswordStrength = function(password) {
69
+ var strength = 0;
70
+ if (password == null || password == '') {
71
+ return strength;
72
+ }
73
+
74
+ this.checkSecurityPolicyRules(password);
75
+
76
+ var weakRulesScore = (rulesCount.weak / checkedRulesCount) / 2;
77
+ var strongRulesScore = (rulesCount.strong / checkedRulesCount) / 2;
78
+
79
+ strength = weakRulesScore + strongRulesScore;
80
+
81
+ return strength; //zwracamy spolczynnik miedzy 0 a 1 - prezentacja zalezy od formatki
82
+ };
83
+
84
+ this.checkMinSecurityPolicyRule = function(securityPolicyParam, countedElements) {
85
+ if (countedElements >= securityPolicyParam) {
86
+ rulesCount.weak++;
87
+ }
88
+ if (countedElements >= securityPolicyParam + 1) {
89
+ rulesCount.strong++;
90
+ }
91
+ };
92
+
93
+ this.sumOfSecurityRules = function() {
94
+ return minLowercase + minUppercase + minDigit + minSpecChar;
95
+ };
96
+
97
+ this.countAndSetWordStructure = function(password) {
98
+ for (var i = 0; i < password.length; i++) {
99
+ var letter = password.charAt(i);
100
+ if (uppercaseRule.test(letter)) {
101
+ wordStructure.uppercaseCount++;
102
+ } else if (lowercaseRule.test(letter)) {
103
+ wordStructure.lowercaseCount++;
104
+ } else if (digitRule.test(letter)) {
105
+ wordStructure.digitCount++;
106
+ } else if (specCharRule.test(letter)) {
107
+ wordStructure.specCharCount++;
108
+ }
109
+ }
110
+ };
111
+
112
+ this.countFullfiledSecurityRules = function() {
113
+ this.checkMinSecurityPolicyRule(minUppercase, wordStructure.uppercaseCount);
114
+ this.checkMinSecurityPolicyRule(minLowercase, wordStructure.lowercaseCount);
115
+ this.checkMinSecurityPolicyRule(minDigit, wordStructure.digitCount);
116
+ this.checkMinSecurityPolicyRule(minSpecChar, wordStructure.specCharCount);
117
+ };
118
+
119
+ });