Advertisement
Guest User

a

a guest
Jun 21st, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.86 KB | None | 0 0
  1. #include <GUIConstantsEx.au3>
  2. #include <StaticConstants.au3>
  3. #include <ComboConstants.au3>
  4. #include <String.au3>
  5. #include <IE.au3>
  6.  
  7. #Region ### START Koda GUI section ### Form=D:\HOC TAP\AutoIT\koda_1.7.3.0\Forms\Get link 4share 3.kxf
  8. $form1 = GUICreate("Getlink up.4share.vn with accout VIP", 780, 530, -1, -1)
  9. GUISetBkColor(0xFE7C00)
  10. $label1 = GUICtrlCreateLabel("", 8, 15, 753, 27, $ss_center)
  11. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  12. $label2 = GUICtrlCreateLabel("", 8, 40, 753, 17, $ss_center)
  13. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  14. $edit1 = GUICtrlCreateEdit("Nhập link up.4share.vn cần get vào đây, mỗi dòng một link. Chú ý không có dòng trắng.", 8, 72, 761, 175)
  15. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  16. $edit2 = GUICtrlCreateEdit("D-link download sẽ xuất ra ở đây.", 8, 304, 761, 175)
  17. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  18. $button1 = GUICtrlCreateButton("Get Link", 24, 256, 80, 33)
  19. GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  20. $button2 = GUICtrlCreateButton("Hướng dẫn sử dụng và download phiên bản mới", 504, 256, 264, 33)
  21. GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  22. $button3 = GUICtrlCreateButton("Import to IDM", 120, 256, 90, 33)
  23. GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  24. $combo1 = GUICtrlCreateCombo("Acc 1", 328, 264, 145, 33, BitOR($cbs_dropdown, $cbs_autohscroll))
  25. GUICtrlSetData(-1, "Acc 1|Acc 2|Acc 3", "")
  26. GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  27. $label3 = GUICtrlCreateLabel("Chọnn account", 220, 264, 108, 25)
  28. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  29. $label4 = GUICtrlCreateLabel("", 8, 500, 756, 17, $ss_center)
  30. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  31. GUISetState(@SW_SHOW)
  32. #EndRegion ### END Koda GUI section ###
  33. WinSetTitle("", "", "Getlink up.4share.vn v3.0.1 with accout VIP – Release Date : September 13, 2012")
  34. ProcessClose("iexplore.exe")
  35. Sleep(100)
  36. ProcessClose("iexplore.exe")
  37. $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
  38. Global $status = _stringbetween($acc, "<3>", "</3>")
  39. Global $status2 = _stringbetween($acc, "<4>", "</4>")
  40. Global $urlhelp = _stringbetween($acc, "<5>", "</5>")
  41. GUICtrlSetData($label1, $status[0])
  42. GUICtrlSetData($label2, $status2[0])
  43. Global $status3 = _stringbetween($acc, "<8>", "</8>")
  44. GUICtrlSetData($label4, $status3[0])
  45. While 1
  46. $nmsg = GUIGetMsg()
  47. Switch $nmsg
  48. Case $gui_event_close
  49. Exit
  50. Case $button1
  51. ProcessClose("iexplore.exe")
  52. Sleep(100)
  53. ProcessClose("iexplore.exe")
  54. GUICtrlSetData($edit2, "D-link download sẽ xuất ra ở đây")
  55. _getlink()
  56. Case $button2
  57. _iecreate($urlhelp[0], 1, 1, 0)
  58. Case $button3
  59. ClipPut(GUICtrlRead($edit2))
  60. Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
  61. Run($pathidm)
  62. WinActivate("Internet Download Manager")
  63. WinWaitActive("Internet Download Manager")
  64. Send("{ALTDOWN}tc{ALTUP}")
  65. WinActivate("Batch download from clipboard.")
  66. WinWaitActive("Batch download from clipboard.")
  67. ControlClick("Batch download from clipboard.", "", "Check All")
  68. ControlClick("Batch download from clipboard.", "", "OK")
  69. MsgBox(0, "Thông báo", "Bạn hãy cho IDM download về là xong")
  70. EndSwitch
  71. WEnd
  72.  
  73. Func _getlink()
  74. Select
  75. Case (GUICtrlRead($combo1)) = "Acc 1"
  76. $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
  77. Global $user_mahoa = _stringbetween($acc, "<b>", "</b>")
  78. $user = _hextostring(_stringreverse($user_mahoa[0]))
  79. Global $pass_mahoa = _stringbetween($acc, "</b><b>", "</b></br>")
  80. $pass = _hextostring(_stringreverse($pass_mahoa[0]))
  81. Case (GUICtrlRead($combo1)) = "Acc 2"
  82. $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
  83. Global $user_mahoa = _stringbetween($acc, "<1>", "</1>")
  84. $user = _hextostring(_stringreverse($user_mahoa[0]))
  85. Global $pass_mahoa = _stringbetween($acc, "<2>", "</2>")
  86. $pass = _hextostring(_stringreverse($pass_mahoa[0]))
  87. Case (GUICtrlRead($combo1)) = "Acc 3"
  88. $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
  89. Global $user_mahoa = _stringbetween($acc, "<6>", "</6>")
  90. $user = _hextostring(_stringreverse($user_mahoa[0]))
  91. Global $pass_mahoa = _stringbetween($acc, "<7>", "</7>")
  92. $pass = _hextostring(_stringreverse($pass_mahoa[0]))
  93. Case Else
  94. MsgBox(0, "", "Bạn chỉ được chọn từ Acc 1 đến Acc 3.")
  95. EndSelect
  96. GUICtrlSetData($label1, "Đang kết nối tài acc VIP. Quá trình này hơi lâu, vui lòng chờ kết nối")
  97. GUICtrlSetData($label2, "Nếu acc VIP bị hết BW thì sẽ không get được link, bấm sau bạn get link tiếp nhé")
  98. $username = $user
  99. $password = $pass
  100. $oie = ObjCreate("InternetExplorer.Application")
  101. $oie.visible = False
  102. $oie.navigate("http://up.4share.vn/?control=login")
  103. _ieloadwait($oie)
  104. $oie.document.getelementbyid("inputUserName").value = $username
  105. $oie.document.getelementbyid("inputPassword").value = $password
  106. $oform = _ieformgetcollection($oie, 0)
  107. _ieformsubmit($oform, 0)
  108. _ieloadwait($oie)
  109. GUICtrlSetData($label1, "Đang kiểm tra dung lượng download của accout")
  110. $oie.navigate("http://up.4share.vn/?control=login")
  111. _ieloadwait($oie)
  112. $laybw = _iedocreadhtml($oie)
  113. $bw = _stringbetween($laybw, " : <strong>", "</strong>")
  114. $loaiacc = _stringbetween($laybw, "(<strong>", "</strong>)")
  115. GUICtrlSetData($label2, "Acc " & $loaiacc[0] & " này đã sử dụng hết " & $bw[0] & " Nếu bị lỗi là do acc đã hết BW nên các bạn hãy get link vào hôm sau nhé")
  116. Global $linkbd = (GUICtrlRead($edit1))
  117. _filecreate(@TempDir & "\DLink.txt")
  118. Sleep(200)
  119. _filecreate(@TempDir & "\Link.txt")
  120. Global $file = FileOpen(@TempDir & "\Link.txt", 0)
  121. Global $file2 = FileOpen(@TempDir & "\DLink.txt", 1)
  122. FileWrite(@TempDir & "\Link.txt", $linkbd & @CRLF)
  123. If $file = -1 Then
  124. MsgBox(0, "Error", "Lỗi không thể đọc được dữ liệu, hãy khởi động lại tool")
  125. Exit
  126. EndIf
  127. Global $file = FileOpen(@TempDir & "\Link.txt", 128)
  128. While 1
  129. Local $line = FileReadLine($file)
  130. If @error = -1 Then ExitLoop
  131. $oie.navigate($line)
  132. GUICtrlSetData($label1, "Get link " & $line)
  133. _ieloadwait($oie)
  134. Local $str = _iedocreadhtml($oie)
  135. Global $link = _stringbetween($str, "http://sv", ‘"’)
  136. $linkdl = StringRegExpReplace("http://sv" & $link[0], "&amp;", "&")
  137. FileWrite(@TempDir & "\DLink.txt", $linkdl & @CRLF)
  138. Global $xuatdlink = FileRead(@TempDir & "\DLink.txt")
  139. GUICtrlSetData($edit2, $xuatdlink)
  140. WEnd
  141. _filecreate(@DesktopDir & "Direct Link up.4share.vn.txt")
  142. FileWrite(@DesktopDir & "\Direct Link up.4share.vn.txt", $xuatdlink)
  143. FileClose($file)
  144. FileClose($file2)
  145. $oie.quit
  146. GUICtrlSetData($label1, "ĐÃ HOÀN THÀNH QUÁ TRÌNH LẤY DIRECT LINK.")
  147. ClipPut(GUICtrlRead($edit2))
  148. MsgBox(0, "THÔNG BÁO", "ĐÃ LẤY XONG DIRECT LINK." & @CRLF & "DIRECT LINK ĐỤOC LƯU TRONG FILE Direct Link up.4share.vn.txt ở DESKTOP." & @CRLF & "DIRECT LINK ĐÃ ĐƯỢC COPY VÀO CLIPBOARD.")
  149. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement