Guest User

Untitled

a guest
Jan 29th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.13 KB | None | 0 0
  1. private bool method_67(string string_21, string string_22, string string_23, ref string string_24, ref string string_25, ref CookieContainer cookieContainer_1)
  2. {
  3. string str;
  4. string str1;
  5. string str2;
  6. string str3;
  7. bool flag;
  8. bool flag1;
  9. bool flag2 = false;
  10. string_24 = "";
  11. string_25 = "";
  12. int num = 90000;
  13. bool flag3 = false;
  14. int num1 = 0;
  15. Label1:
  16. while (true)
  17. {
  18. Label2:
  19. this.method_46("Enter ProcessSBINetBanking.");
  20. if (!string_21.Contains("onlinesbi"))
  21. {
  22. string_25 = "Some thing went wrong with SBI Payment";
  23. this.method_46("Html doesn't contains onlinesbi, returning.");
  24. flag = false;
  25. break;
  26. }
  27. else
  28. {
  29. string_24 = "";
  30. string str4 = "https://www.irctc.co.in/eticketing/jpInput.jsf?cid=1";
  31. string[] strArrays = string_22.Split(new string[] { "||" }, StringSplitOptions.None);
  32. string str5 = strArrays[0].Trim();
  33. string str6 = strArrays[1];
  34. string str7 = "";
  35. string str8 = "";
  36. string str9 = "";
  37. string str10 = "";
  38. string str11 = "";
  39. if ((int)strArrays.Length >= 5)
  40. {
  41. str9 = strArrays[3];
  42. str10 = strArrays[4];
  43. str11 = strArrays[5];
  44. }
  45. if (str11 == "")
  46. {
  47. str = "otpMobile";
  48. }
  49. else
  50. {
  51. str = (str9 != "" ? "otpOffline" : "otpOnline");
  52. }
  53. string str12 = Class5.smethod_15(string_21, ref str7, false);
  54. cookieContainer_1 = null;
  55. string str13 = "";
  56. string str14 = "";
  57. int num2 = 0;
  58. int num3 = 0;
  59. if ((int)strArrays.Length > 2)
  60. {
  61. str8 = strArrays[2].Trim();
  62. }
  63. try
  64. {
  65. this.method_46(string.Concat("First Hit : Inp = ", str12));
  66. if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
  67. {
  68. this.method_46(string.Concat("First Hit Failed. err = ", str13));
  69. string_25 = "SBI Not Working - Payment Failed";
  70. cookieContainer_1 = null;
  71. flag = false;
  72. break;
  73. }
  74. else
  75. {
  76. this.method_46(string.Concat("First Output htm = ", str14));
  77. if ((string.IsNullOrEmpty(str14.Trim()) ? true : !str14.Contains("username")))
  78. {
  79. flag = flag2;
  80. break;
  81. }
  82. else
  83. {
  84. string str15 = "QlaUwr5x";
  85. string str16 = "CRIS_IR2";
  86. num2 = str14.IndexOf("name=\"keyString");
  87. num2 = str14.IndexOf("lue=\"", num2) + 5;
  88. num3 = str14.IndexOf("\"", num2) - num2;
  89. str15 = str14.Substring(num2, num3);
  90. string str17 = Class5.smethod_24(string.Concat(Class5.smethod_24(string.Concat(str5, "#", str6)), "#", str15));
  91. Class5.smethod_23(string.Concat(str5, "#", str6));
  92. string str18 = Class5.smethod_23(string.Concat(Class5.smethod_23(string.Concat(str5, "#", str6)), "#", str15));
  93. str12 = string.Concat(new string[] { "bankCode=0&merchantCode=", str16, "&keyString=", str15, "&sha2password=", str18, "&loginmode=retail&userName=", str5, "&password=", str17 });
  94. str4 = str7;
  95. str7 = "https://merchant.onlinesbi.com/merchant/loginsubmit.htm";
  96. this.method_46(string.Concat("Second Hit : Inp = ", str12));
  97. if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
  98. {
  99. this.method_46(string.Concat("Second Hit Failed. err = ", str13));
  100. string_25 = "Failed while making Payment. Payment Not Done";
  101. flag = false;
  102. break;
  103. }
  104. else
  105. {
  106. this.method_46(string.Concat("Second Hit Output = ", str14));
  107. if (str14.Contains("<form action=\"merchantinter.htm\""))
  108. {
  109. num2 = str14.IndexOf("selectAccountNo");
  110. num2 = str14.IndexOf("(", num2) + 1;
  111. num3 = str14.IndexOf(")", num2) - num2;
  112. string str19 = str14.Substring(num2, num3).Replace("'", "");
  113. string[] strArrays1 = str19.Split(new char[] { ',' });
  114. num2 = str14.IndexOf("setBankSystem");
  115. num2 = str14.IndexOf("(", num2) + 1;
  116. num3 = str14.IndexOf(")", num2) - num2;
  117. string str20 = str14.Substring(num2, num3).Replace("'", "");
  118. string[] strArrays2 = str20.Split(new char[] { ',' });
  119. num2 = str14.IndexOf("debit_accountNo");
  120. if (num2 <= 0)
  121. {
  122. str1 = strArrays1[1];
  123. str2 = strArrays1[3];
  124. str3 = strArrays1[0];
  125. }
  126. else
  127. {
  128. num2 = str14.IndexOf("lue=\"", num2) + 5;
  129. num3 = str14.IndexOf("\"", num2) - num2;
  130. str1 = str14.Substring(num2, num3);
  131. num2 = str14.IndexOf("debit_branchCode");
  132. num2 = str14.IndexOf("lue=\"", num2) + 5;
  133. num3 = str14.IndexOf("\"", num2) - num2;
  134. str2 = str14.Substring(num2, num3);
  135. num2 = str14.IndexOf("selectedNickName");
  136. num2 = str14.IndexOf("lue=\"", num2) + 5;
  137. num3 = str14.IndexOf("\"", num2) - num2;
  138. str3 = str14.Substring(num2, num3);
  139. }
  140. num2 = str14.IndexOf("name=\"corpMode");
  141. num2 = str14.IndexOf("lue=", num2) + 4;
  142. num3 = str14.IndexOf(">", num2) - num2;
  143. string str21 = str14.Substring(num2, num3).Replace("'", "").Replace("\"", "").Trim();
  144. str12 = string.Concat(new string[] { "debitAccountNo=", strArrays1[1], "&debitAccountType=", strArrays1[2], "&debitBranchCode=", strArrays1[3], "&corpMode=", str21, "&dproductDisc=", strArrays2[0], "&dbankSystem=", strArrays2[1], "&vechequeNo=&d=radiobutton&statusCount=1&debit_accountNo=", str1, "&debit_branchCode=", str2, "&selectedNickName=", str3, "&vechequeNo=&validation=--%7CRemarks%7C%7C1%7C&--=Railway+Ticket+Booking&SecurityId=CRIS&RU=https%3A%2F%2Fwww.irctc.co.in%2Feticketing%2FBankResponse&merchstatus=1&amountinwords=&txnPassword=&Submit=Confirm" });
  145. if (str11.Length > 1)
  146. {
  147. str12 = string.Concat(new string[] { "debitAccountNo=", strArrays1[1], "&debitAccountType=", strArrays1[2], "&debitBranchCode=", strArrays1[3], "&corpMode=", str21, "&dproductDisc=", strArrays2[0], "&dbankSystem=", strArrays2[1], "&vechequeNo=&d=radiobutton&statusCount=1&debit_accountNo=", str1, "&debit_branchCode=", str2, "&selectedNickName=", str3, "&vechequeNo=&validation=--%7CRemarks%7C%7C1%7C&--=Railway+Ticket+Booking&merchantName=CRIS_IR2&RU=https%3A%2F%2Fwww.irctc.co.in%2Feticketing%2FBankResponse&merchstatus=1&amountinwords=&txnPassword=&Submit=Confirm" });
  148. }
  149. str4 = "https://merchant.onlinesbi.com/merchant/merchantdisplay.htm";
  150. str7 = "https://merchant.onlinesbi.com/merchant/merchantinter.htm";
  151. this.method_46(string.Concat("Third Hit Inp = ", str12));
  152. if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
  153. {
  154. this.method_46(string.Concat("Third Hit Failed. err = ", str13));
  155. string_25 = "Failed while making Payment. Payment Not Done";
  156. flag = false;
  157. break;
  158. }
  159. else
  160. {
  161. this.method_46(string.Concat("Third Hit Output = ", str14));
  162. if (!str14.Contains("Verify and confirm IRCTC"))
  163. {
  164. string_25 = "";
  165. if (str14.Contains("errormsg"))
  166. {
  167. num2 = str14.IndexOf("errormsg");
  168. num2 = str14.IndexOf(">", num2) + 1;
  169. num3 = str14.IndexOf("<", num2) - num2;
  170. string_25 = str14.Substring(num2, num3).Trim();
  171. }
  172. if (str14.IndexOf("You have exceeded the per day transaction maximum count", StringComparison.CurrentCultureIgnoreCase) > 0)
  173. {
  174. string_25 = "You have exceeded the per day transaction maximum count";
  175. }
  176. if (string.IsNullOrEmpty(string_25))
  177. {
  178. string_25 = "Failed while Processing into SBI";
  179. }
  180. this.method_46(string.Concat("Third Hit Failed, Not valid HTML err = ", string_25));
  181. flag = false;
  182. break;
  183. }
  184. else
  185. {
  186. string str22 = "47.90";
  187. string str23 = "";
  188. num2 = str14.IndexOf("userType") - 20;
  189. num2 = str14.IndexOf("lue=\"", num2) + 5;
  190. num3 = str14.IndexOf("\"", num2) - num2;
  191. string str24 = str14.Substring(num2, num3);
  192. num2 = str14.IndexOf("transactionName") - 20;
  193. num2 = str14.IndexOf("lue=\"", num2) + 5;
  194. num3 = str14.IndexOf("\"", num2) - num2;
  195. string str25 = str14.Substring(num2, num3);
  196. num2 = str14.IndexOf("creditAmountTransfer");
  197. num2 = str14.IndexOf("lue=\"", num2) + 5;
  198. num3 = str14.IndexOf("\"", num2) - num2;
  199. str23 = str14.Substring(num2, num3);
  200. str22 = "48.10";
  201. str12 = string.Concat(new string[] { "merchantCode=", str16, "&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&userType=", str24, "&transactionName=", str25, "&processUrl=merchantconfirm.htm&smsAlert=&doRedirect=Yes" });
  202. if (str11.Length > 1)
  203. {
  204. str12 = string.Concat(new string[] { "merchantCode=", str16, "&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&userType=", str24, "&transactionName=", str25, "&processUrl=merchantconfirm.htm&otpType=", str, "&smartotpflag=Y&creditAmountTransfer=", str22, "&smsAlert=yes&doRedirect=Yes&smartOTP=", str });
  205. }
  206. str4 = str7;
  207. str7 = "https://merchant.onlinesbi.com/merchant/smsenablehighsecurity.htm";
  208. string str26 = str12 ?? "";
  209. Thread.Sleep(300);
  210. Label3:
  211. this.method_46(string.Concat("Fourth Hit Inp = ", str12));
  212. if (!this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
  213. {
  214. this.method_46(string.Concat("Fourth Hit Failed. err = ", str13));
  215. string_25 = "Failed while making Payment at SBI. Ticket Not Booked";
  216. if (str13.ToUpper().Contains("INTERNAL SERVER ERROR"))
  217. {
  218. if (Class5.bool_0)
  219. {
  220. string_25 = "OTP not bypassed in Scorpio";
  221. }
  222. else
  223. {
  224. string_25 = "OTP not bypassed in Scorpio";
  225. }
  226. }
  227. flag = false;
  228. break;
  229. }
  230. else if (str14.Contains("Sorry, unable to process your request"))
  231. {
  232. goto Label1;
  233. }
  234. else
  235. {
  236. while (true)
  237. {
  238. this.method_46(string.Concat("Fourth Hit output = ", str14));
  239. if (!str14.Contains("High security transaction password"))
  240. {
  241. break;
  242. }
  243. else
  244. {
  245. this.method_46("Loading for OTP");
  246. str12 = "";
  247. if (str11.Length > 1)
  248. {
  249. Thread.Sleep(150);
  250. string offlineToken = Class5.getOffline_Token(str9, str11, str14);
  251. if (offlineToken.Length >= 4)
  252. {
  253. str12 = string.Concat("resendFlagValue=&plainotpOffline=&otpType=otpOnline&processUrl=merchantconfirm.htm&securityPassword=", offlineToken);
  254. str12 = staticm.serial("", str14);
  255. str12 = staticm.setpost(str12, "securityPassword", offlineToken);
  256. str12 = str12.Replace("&Button4=Confirm", "");
  257. str12 = str12.Replace("&Reset=Reset", "");
  258. }
  259. else if ((!offlineToken.Contains(":") ? true : flag3))
  260. {
  261. str12 = "";
  262. string_25 = "Unable to get OTP from https://m.onlinesbi.com";
  263. flag = false;
  264. flag1 = flag;
  265. return flag1;
  266. }
  267. else
  268. {
  269. flag3 = true;
  270. str12 = str26;
  271. goto Label3;
  272. }
  273. }
  274. if (str12.Length <= 1)
  275. {
  276. frmCaptcha _frmCaptcha = new frmCaptcha(this, cookieContainer_1, "https://merchant.onlinesbi.com/merchant/resendsmsotp.htm", str7);
  277. Control control0 = this.control_0;
  278. Rectangle rectangle0 = this.rectangle_0;
  279. string[] strArrays3 = new string[] { "resendFlagValue=&processUrl=merchantconfirm.htm&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&smsAlert=yes&merchantCode=", str16, "&userType=", str24, "&otpType=&doRedirect=Yes&transactionName=MP&creditAmountTransfer=&smartotpflag=&plainotpOffline=&otpType=&processUrl=merchantconfirm.htm&securityPassword=" };
  280. _frmCaptcha.method_2(control0, rectangle0, str8, string.Concat(strArrays3), "SBI", str23, string.Concat("Account No: ", strArrays1[1]));
  281. str12 = (_frmCaptcha.bool_3 ? string.Concat(new string[] { "resendFlagValue=yes&processUrl=merchantconfirm.htm&plainotpOffline=&smsAlert=yes&otpType=&userType=", str24, "&doRedirect=Yes&transactionName=MP&resendFlagValue=&smartotpflag=&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&merchantCode=", str16, "&creditAmountTransfer=&baseURL=&plainotpOffline=&otpType=&processUrl=merchantconfirm.htm&securityPassword=", _frmCaptcha.txtImageData.Text.Trim() }) : string.Concat(new string[] { "resendFlagValue=&processUrl=merchantconfirm.htm&vechequeNo=&merchantName=IRCTC-RAILWAY+TICKET+BOOKING&smsAlert=&merchantCode=", str16, "&userType=", str24, "&doRedirect=Yes&transactionName=", str25, "&securityPassword=", _frmCaptcha.txtImageData.Text.Trim(), "&Button4=Confirm" }));
  282. if (_frmCaptcha.DialogResult == DialogResult.OK)
  283. {
  284. _frmCaptcha.Dispose();
  285. }
  286. else
  287. {
  288. _frmCaptcha.Dispose();
  289. this.method_46("OTP Cancelled by User.");
  290. string_25 = "OTP Cancelled by User";
  291. flag = false;
  292. flag1 = flag;
  293. return flag1;
  294. }
  295. }
  296. str4 = str7;
  297. str7 = "https://merchant.onlinesbi.com/merchant/smsenablehighsecurityconfirm.htm";
  298. this.method_46(string.Concat("High Security Hit Inp = ", str12));
  299. if (this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
  300. {
  301. this.method_46(string.Concat("High Security Hit output = ", str14));
  302. if (str14.Contains("Completed Successfully"))
  303. {
  304. break;
  305. }
  306. else if (!str14.Contains("High security transaction password"))
  307. {
  308. goto Label2;
  309. }
  310. else if (num1 >= 3)
  311. {
  312. break;
  313. }
  314. }
  315. else
  316. {
  317. this.method_46(string.Concat("High Security Hit Failed. err = ", str13));
  318. string_25 = "Failed while making Payment at SBI. Ticket Not Booked";
  319. flag = false;
  320. flag1 = flag;
  321. return flag1;
  322. }
  323. }
  324. }
  325. if (!str14.Contains("you will be automatically redirected to the IRCTC"))
  326. {
  327. string_25 = "";
  328. if (str14.Contains("errormsg"))
  329. {
  330. num2 = str14.IndexOf("errormsg");
  331. num2 = str14.IndexOf(">", num2) + 1;
  332. num3 = str14.IndexOf("<", num2) - num2;
  333. str13 = str14.Substring(num2, num3).Trim();
  334. }
  335. if (string.IsNullOrEmpty(string_25))
  336. {
  337. string_25 = "Failed while Processing into SBI, Ticket Not Booked";
  338. }
  339. this.method_46(string.Concat("Fourth Hit Failed, Not valid HTML err = ", string_25));
  340. flag = false;
  341. break;
  342. }
  343. }
  344. }
  345. }
  346. }
  347. else if (!str14.Contains("you will be automatically redirected to the IRCTC"))
  348. {
  349. if (str14.Contains("errormsg"))
  350. {
  351. num2 = str14.IndexOf("errormsg");
  352. num2 = str14.IndexOf(">", num2) + 1;
  353. num3 = str14.IndexOf("<", num2) - num2;
  354. string_25 = str14.Substring(num2, num3).Trim();
  355. }
  356. if (string.IsNullOrEmpty(string_25))
  357. {
  358. string_25 = "Failed while Login into SBI";
  359. }
  360. this.method_46(string.Concat("Second Hit, Not valid HTML err = ", string_25));
  361. cookieContainer_1 = null;
  362. flag = false;
  363. break;
  364. }
  365. else
  366. {
  367. this.method_46("SBIQuickPay, going to fifth hit");
  368. }
  369. str12 = "doRedirect=Yes&echequeNo=&merchantCode=&functionType=&viewType=&statusCode=00";
  370. str4 = str7;
  371. str7 = "https://merchant.onlinesbi.com/merchant/redirect.htm";
  372. this.method_46(string.Concat("Fifth Hit Inp = ", str12));
  373. if (this.method_51(str7, str12, str4, this.webProxy_2, ref cookieContainer_1, true, true, num, num, ref str14, ref str13, ref this.webException_0))
  374. {
  375. this.method_46(string.Concat("Fifth Hit Output = ", str14));
  376. if (str14.Contains("document.redirectForm.submit"))
  377. {
  378. string_24 = str14;
  379. string_25 = str7;
  380. flag = true;
  381. break;
  382. }
  383. else
  384. {
  385. string_25 = "Failed! Payment Done, Ticket Not Booked";
  386. this.method_46(string.Concat("Fifth Hit Failed, Not valid HTML err = ", string_25));
  387. flag = false;
  388. break;
  389. }
  390. }
  391. else
  392. {
  393. this.method_46(string.Concat("Fifth Hit Failed. err = ", str13));
  394. string_25 = "Failed while making Payment at SBI. Ticket Not Booked";
  395. flag = false;
  396. break;
  397. }
  398. }
  399. }
  400. }
  401. }
  402. catch (Exception exception)
  403. {
  404. this.method_47("ProcessSBINetBanking", exception.Message);
  405. flag2 = false;
  406. }
  407. flag = flag2;
  408. break;
  409. }
  410. }
  411. flag1 = flag;
  412. return flag1;
  413. }
Add Comment
Please, Sign In to add comment