Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <ComboConstants.au3>
- #include <String.au3>
- #include <IE.au3>
- #Region ### START Koda GUI section ### Form=D:\HOC TAP\AutoIT\koda_1.7.3.0\Forms\Get link 4share 3.kxf
- $form1 = GUICreate("Getlink up.4share.vn with accout VIP", 780, 530, -1, -1)
- GUISetBkColor(0xFE7C00)
- $label1 = GUICtrlCreateLabel("", 8, 15, 753, 27, $ss_center)
- GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
- $label2 = GUICtrlCreateLabel("", 8, 40, 753, 17, $ss_center)
- GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
- $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)
- GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
- $edit2 = GUICtrlCreateEdit("D-link download sẽ xuất ra ở đây.", 8, 304, 761, 175)
- GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
- $button1 = GUICtrlCreateButton("Get Link", 24, 256, 80, 33)
- GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
- $button2 = GUICtrlCreateButton("Hướng dẫn sử dụng và download phiên bản mới", 504, 256, 264, 33)
- GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
- $button3 = GUICtrlCreateButton("Import to IDM", 120, 256, 90, 33)
- GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
- $combo1 = GUICtrlCreateCombo("Acc 1", 328, 264, 145, 33, BitOR($cbs_dropdown, $cbs_autohscroll))
- GUICtrlSetData(-1, "Acc 1|Acc 2|Acc 3", "")
- GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
- $label3 = GUICtrlCreateLabel("Chọnn account", 220, 264, 108, 25)
- GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
- $label4 = GUICtrlCreateLabel("", 8, 500, 756, 17, $ss_center)
- GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- WinSetTitle("", "", "Getlink up.4share.vn v3.0.1 with accout VIP – Release Date : September 13, 2012")
- ProcessClose("iexplore.exe")
- Sleep(100)
- ProcessClose("iexplore.exe")
- $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
- Global $status = _stringbetween($acc, "<3>", "</3>")
- Global $status2 = _stringbetween($acc, "<4>", "</4>")
- Global $urlhelp = _stringbetween($acc, "<5>", "</5>")
- GUICtrlSetData($label1, $status[0])
- GUICtrlSetData($label2, $status2[0])
- Global $status3 = _stringbetween($acc, "<8>", "</8>")
- GUICtrlSetData($label4, $status3[0])
- While 1
- $nmsg = GUIGetMsg()
- Switch $nmsg
- Case $gui_event_close
- Exit
- Case $button1
- ProcessClose("iexplore.exe")
- Sleep(100)
- ProcessClose("iexplore.exe")
- GUICtrlSetData($edit2, "D-link download sẽ xuất ra ở đây")
- _getlink()
- Case $button2
- _iecreate($urlhelp[0], 1, 1, 0)
- Case $button3
- ClipPut(GUICtrlRead($edit2))
- Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
- Run($pathidm)
- WinActivate("Internet Download Manager")
- WinWaitActive("Internet Download Manager")
- Send("{ALTDOWN}tc{ALTUP}")
- WinActivate("Batch download from clipboard.")
- WinWaitActive("Batch download from clipboard.")
- ControlClick("Batch download from clipboard.", "", "Check All")
- ControlClick("Batch download from clipboard.", "", "OK")
- MsgBox(0, "Thông báo", "Bạn hãy cho IDM download về là xong")
- EndSwitch
- WEnd
- Func _getlink()
- Select
- Case (GUICtrlRead($combo1)) = "Acc 1"
- $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
- Global $user_mahoa = _stringbetween($acc, "<b>", "</b>")
- $user = _hextostring(_stringreverse($user_mahoa[0]))
- Global $pass_mahoa = _stringbetween($acc, "</b><b>", "</b></br>")
- $pass = _hextostring(_stringreverse($pass_mahoa[0]))
- Case (GUICtrlRead($combo1)) = "Acc 2"
- $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
- Global $user_mahoa = _stringbetween($acc, "<1>", "</1>")
- $user = _hextostring(_stringreverse($user_mahoa[0]))
- Global $pass_mahoa = _stringbetween($acc, "<2>", "</2>")
- $pass = _hextostring(_stringreverse($pass_mahoa[0]))
- Case (GUICtrlRead($combo1)) = "Acc 3"
- $acc = BinaryToString(InetRead("http://dl.dropbox.com/u/102993103/Error403.html", 1), 4)
- Global $user_mahoa = _stringbetween($acc, "<6>", "</6>")
- $user = _hextostring(_stringreverse($user_mahoa[0]))
- Global $pass_mahoa = _stringbetween($acc, "<7>", "</7>")
- $pass = _hextostring(_stringreverse($pass_mahoa[0]))
- Case Else
- MsgBox(0, "", "Bạn chỉ được chọn từ Acc 1 đến Acc 3.")
- EndSelect
- 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")
- 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é")
- $username = $user
- $password = $pass
- $oie = ObjCreate("InternetExplorer.Application")
- $oie.visible = False
- $oie.navigate("http://up.4share.vn/?control=login")
- _ieloadwait($oie)
- $oie.document.getelementbyid("inputUserName").value = $username
- $oie.document.getelementbyid("inputPassword").value = $password
- $oform = _ieformgetcollection($oie, 0)
- _ieformsubmit($oform, 0)
- _ieloadwait($oie)
- GUICtrlSetData($label1, "Đang kiểm tra dung lượng download của accout")
- $oie.navigate("http://up.4share.vn/?control=login")
- _ieloadwait($oie)
- $laybw = _iedocreadhtml($oie)
- $bw = _stringbetween($laybw, " : <strong>", "</strong>")
- $loaiacc = _stringbetween($laybw, "(<strong>", "</strong>)")
- 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é")
- Global $linkbd = (GUICtrlRead($edit1))
- _filecreate(@TempDir & "\DLink.txt")
- Sleep(200)
- _filecreate(@TempDir & "\Link.txt")
- Global $file = FileOpen(@TempDir & "\Link.txt", 0)
- Global $file2 = FileOpen(@TempDir & "\DLink.txt", 1)
- FileWrite(@TempDir & "\Link.txt", $linkbd & @CRLF)
- If $file = -1 Then
- MsgBox(0, "Error", "Lỗi không thể đọc được dữ liệu, hãy khởi động lại tool")
- Exit
- EndIf
- Global $file = FileOpen(@TempDir & "\Link.txt", 128)
- While 1
- Local $line = FileReadLine($file)
- If @error = -1 Then ExitLoop
- $oie.navigate($line)
- GUICtrlSetData($label1, "Get link " & $line)
- _ieloadwait($oie)
- Local $str = _iedocreadhtml($oie)
- Global $link = _stringbetween($str, "http://sv", ‘"’)
- $linkdl = StringRegExpReplace("http://sv" & $link[0], "&", "&")
- FileWrite(@TempDir & "\DLink.txt", $linkdl & @CRLF)
- Global $xuatdlink = FileRead(@TempDir & "\DLink.txt")
- GUICtrlSetData($edit2, $xuatdlink)
- WEnd
- _filecreate(@DesktopDir & "Direct Link up.4share.vn.txt")
- FileWrite(@DesktopDir & "\Direct Link up.4share.vn.txt", $xuatdlink)
- FileClose($file)
- FileClose($file2)
- $oie.quit
- GUICtrlSetData($label1, "ĐÃ HOÀN THÀNH QUÁ TRÌNH LẤY DIRECT LINK.")
- ClipPut(GUICtrlRead($edit2))
- 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.")
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement