Guest User

makecash

a guest
Jun 3rd, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 6.38 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=D:\Potrzebne\Grafika\Obraz (51).ico
  3. #AutoIt3Wrapper_Res_Comment=YTMonster Helper by Christopher
  4. #AutoIt3Wrapper_Res_Description=YTMonster Helper by Christopher
  5. #AutoIt3Wrapper_Res_Language=1045
  6. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  7. #include <ButtonConstants.au3>
  8. #include <EditConstants.au3>
  9. #include <GUIConstantsEx.au3>
  10. #include <StaticConstants.au3>
  11. #include <WindowsConstants.au3>
  12. #include <IE.au3>
  13. #include <String.au3>
  14. #include <Array.au3>
  15. #include <WinHTTP.au3>
  16. #Region ### START Koda GUI section ### Form=C:\Users\Krzysztof\Desktop\Like4Like Bot by Christopher.kxf
  17. $Form2 = GUICreate("YTMonster Helper by Christopher", 314, 242)
  18. $Group1 = GUICtrlCreateGroup("YTMonster", 16, 16, 281, 161)
  19. $Input1 = GUICtrlCreateInput("", 96, 56, 121, 21)
  20. GUICtrlSetData(-1, RegRead("HKEY_CURRENT_USER\Like4Like_BOT\", "Username"))
  21. $Input2 = GUICtrlCreateInput("", 96, 112, 121, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
  22. GUICtrlSetData(-1, RegRead("HKEY_CURRENT_USER\Like4Like_BOT\", "Password"))
  23. $Label1 = GUICtrlCreateLabel("Username:", 96, 38, 55, 17, $SS_CENTER)
  24. $Label2 = GUICtrlCreateLabel("Password:", 96, 92, 53, 17, $SS_CENTER)
  25. $Save1 = GUICtrlCreateCheckbox("Save", 96, 144, 121, 17, BitOR($GUI_SS_DEFAULT_CHECKBOX, $BS_LEFT))
  26. GUICtrlSetState(-1, RegRead("HKEY_CURRENT_USER\Like4Like_BOT\", "Save"))
  27. GUICtrlCreateGroup("", -99, -99, 1, 1)
  28. $Button1 = GUICtrlCreateButton("Login", 16, 193, 281, 33)
  29. GUISetState(@SW_SHOW)
  30.  
  31. #EndRegion ### END Koda GUI section ###
  32.  
  33. ;Zmienne
  34. $hConnect = 0
  35. $hSession = 0
  36.  
  37. While 1
  38.     $nMsg = GUIGetMsg()
  39.     Switch $nMsg
  40.         Case $GUI_EVENT_CLOSE
  41.             _WinHttpCloseHandle($hConnect)
  42.             _WinHttpCloseHandle($hSession)
  43.             Exit
  44.         Case $Button1
  45.             GUICtrlSetState($Button1, $GUI_DISABLE)
  46.             GUICtrlSetData($Button1, "Logging in...")
  47.             $Login = GUICtrlRead($Input1)
  48.             $Passwd = GUICtrlRead($Input2)
  49.             If GUICtrlRead($Save1) = 1 Then
  50.                 RegWrite("HKEY_CURRENT_USER\Like4Like_BOT\", "Username", "REG_SZ", GUICtrlRead($Input1))
  51.                 RegWrite("HKEY_CURRENT_USER\Like4Like_BOT\", "Password", "REG_SZ", GUICtrlRead($Input2))
  52.                 RegWrite("HKEY_CURRENT_USER\Like4Like_BOT\", "Save", "REG_SZ", 1)
  53.             Else
  54.                 RegDelete("HKEY_CURRENT_USER\Like4Like_BOT\", "Username")
  55.                 RegDelete("HKEY_CURRENT_USER\Like4Like_BOT\", "Password")
  56.                 RegWrite("HKEY_CURRENT_USER\Like4Like_BOT\", "Save", "REG_SZ", 0)
  57.             EndIf
  58.             $hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36 OPR/29.0.1795.60")
  59.             $hConnect = _WinHttpConnect($hSession, "www.ytmonster.net")
  60.             $Logowanie = _WinHttpSimpleRequest($hConnect, "POST", "/login?login=ok", "http://www.ytmonster.net/login", "usernames=" & $Login & "&passwords=" & $Passwd & "&submit=")
  61.             GUIDelete($Form2)
  62.             #Region ### START Koda GUI section ### Form=C:\Users\Krzysztof\Desktop\YTMonster Helper.kxf
  63.             $Form1 = GUICreate("YTMonster Helper by Christopher", 538, 410, 192, 124)
  64.             $Input1 = GUICtrlCreateInput("", 128, 12, 393, 21)
  65.             $Label1 = GUICtrlCreateLabel("YouTube Video URL: ", 16, 16, 109, 17)
  66.             $Edit1 = GUICtrlCreateEdit("", 16, 72, 505, 265)
  67.             $Label2 = GUICtrlCreateLabel("Comments:", 16, 52, 56, 17)
  68.             $Checkbox1 = GUICtrlCreateCheckbox("Delay:", 16, 373, 49, 17, BitOR($GUI_SS_DEFAULT_CHECKBOX, $BS_LEFT))
  69.             $Button1 = GUICtrlCreateButton("Add comments", 184, 352, 339, 41)
  70.             $Input2 = GUICtrlCreateInput("", 72, 371, 81, 21)
  71.             GUICtrlSetState(-1, $GUI_DISABLE)
  72.             GUISetState(@SW_SHOW)
  73.             #EndRegion ### END Koda GUI section ###
  74.  
  75.             While 1
  76.                 $nMsg = GUIGetMsg()
  77.                 Switch $nMsg
  78.                     Case $GUI_EVENT_CLOSE
  79.                         _WinHttpCloseHandle($hConnect)
  80.                         _WinHttpCloseHandle($hSession)
  81.                         Exit
  82.                     Case $Button1
  83.                         If StringInStr(GUICtrlRead($Edit1), @LF) == 0 Then
  84.                             MsgBox(48, "Attention!", "You need to add at least two comments.")
  85.                         Else
  86.                             GUICtrlSetData($Button1, "Adding comments...")
  87.                             GUICtrlSetState($Button1, $GUI_DISABLE)
  88.                             $URL = GUICtrlRead($Input1)
  89.                             $Comments = StringReplace(GUICtrlRead($Edit1), "ę", "e")
  90.                             $Comments = StringReplace($Comments, "ó", "o")
  91.                             $Comments = StringReplace($Comments, "ę", "e")
  92.                             $Comments = StringReplace($Comments, "ą", "a")
  93.                             $Comments = StringReplace($Comments, "ś", "s")
  94.                             $Comments = StringReplace($Comments, "ł", "l")
  95.                             $Comments = StringReplace($Comments, "ż", "z")
  96.                             $Comments = StringReplace($Comments, "ź", "z")
  97.                             $Comments = StringReplace($Comments, "ć", "c")
  98.                             $Comments = StringReplace($Comments, "ń", "n")
  99.                             $Comments = StringReplace($Comments, "Ę", "E")
  100.                             $Comments = StringReplace($Comments, "Ó", "O")
  101.                             $Comments = StringReplace($Comments, "Ą", "A")
  102.                             $Comments = StringReplace($Comments, "Ś", "S")
  103.                             $Comments = StringReplace($Comments, "Ł", "L")
  104.                             $Comments = StringReplace($Comments, "Ż", "Z")
  105.                             $Comments = StringReplace($Comments, "Ź", "Z")
  106.                             $Comments = StringReplace($Comments, "Ć", "C")
  107.                             $Comments = StringReplace($Comments, "Ń", "N")
  108.                             $CommentList = StringSplit($Comments, @LF)
  109.                             For $i = 1 To $CommentList[0] Step 2
  110.                                 If $i + 1 > $CommentList[0] Then
  111.                                     $CurrentComments = $CommentList[$i] & "%0D%0A" & $CommentList[$i - 1]
  112.                                 Else
  113.                                     $CurrentComments = $CommentList[$i] & "%0D%0A" & $CommentList[$i + 1]
  114.                                 EndIf
  115.                                 If GUICtrlRead($Checkbox1) = 1 Then
  116.                                     If StringInStr(GUICtrlRead($Input2), "*") == 0 Then
  117.                                         Sleep(60000 * GUICtrlRead($Input2))
  118.                                     Else
  119.                                         $DelayList = StringSplit(GUICtrlRead($Input2), "*")
  120.                                         $Delay = 60000
  121.                                         For $j = 1 To $DelayList[0] Step 1
  122.                                             $Delay *= $DelayList[$i]
  123.                                         Next
  124.                                         Sleep($Delay)
  125.                                     EndIf
  126.                                 EndIf
  127.                                 _WinHttpSimpleRequest($hConnect, "POST", "/add_video?add=comments", "http://www.ytmonster.net/add_video", "url=" & $URL & "&type=comments&length=&amount=&vReferral=2&likes_amount=&subs_amount=&comments=" & $CurrentComments)
  128.                             Next
  129.                             GUICtrlSetData($Button1, "Dodaj komentarze")
  130.                             GUICtrlSetState($Button1, $GUI_ENABLE)
  131.                         EndIf
  132.                     Case $Checkbox1
  133.                         If GUICtrlRead($Checkbox1) = 1 Then
  134.                             GUICtrlSetState($Input2, $GUI_ENABLE)
  135.                         Else
  136.                             GUICtrlSetState($Input2, $GUI_DISABLE)
  137.                         EndIf
  138.                 EndSwitch
  139.             WEnd
  140.     EndSwitch
  141. WEnd
Advertisement
Add Comment
Please, Sign In to add comment