TeamViewer.au3 UDF 1.0.0

   (0 reviews)

About This File

This is TeamViewer.au3 UDF for TeamViewer API.

 

; #INDEX# ========================================================================
; Title .........: TeamViewer.au3
; AutoIt Version : 3.3.10.2++
; Language ......: English
; Description ...: A collection of function for use with TeamViewer API
; Author ........: mLipok
; Modified ......:
; URL ...........:
; URL ...........: https://www.teamviewer.com/
; URL ...........: https://www.teamviewer.com/en/integrations/
; URL ...........: https://integrate.teamviewer.com/en/develop/api/get-started/
; URL ...........: https://downloadeu1.teamviewer.com/integrate/TeamViewer_API_Documentation.pdf
; Remarks .......: This UDF was created based on TeamViewer_API_Documentation.pdf v 1.4.1
; Remarks .......: This UDF is using Free Chilkat component look here https://www.autoitscript.com/forum/files/file/433-chilkat-udf/
; Remarks .......: Documentation is "work in progress"
; Date ..........: 2017/02/08
; Version .......: 0.1.1 BETA - Work in progress
; ================================================================================

 

I'm using TeamViewer_Example.ini to store my secret tokens/keys.

[Settings]
AccessToken=

[OAuth2]
ClientID=
ClientSecret=
authorizationCode=

 

in TeamViewer_Example.au3 you can see few examples:

Func _Example()

    ; If not exist then create new INI file from template
    If Not FileExists('TeamViewer_Example.ini') Then FileCopy('TeamViewer_Example — Template.ini', 'TeamViewer_Example.ini')

    ; Read Access Token from INI
    Local $sTV_AccessToken = IniRead('TeamViewer_Example.ini', 'Settings', 'AccessToken', '')
    If $sTV_AccessToken = '' Then
        ; Your Access Token, can be left empty when OAuth (below) is configured.

        ; ClientId = <----------------- Create an app in your TeamViewer Management Console and insert the client ID to the INI
        ; ClientSecret = <------------- Insert your client secret to the INI
        ; AuthorizationCode = <-------- Visit https://webapi.teamviewer.com/api/v1/oauth2/authorize?response_type=code&client_id=YOUR$i_ClientIdHERE
        ;                               Login, grant the permissions (popup) and put the code shown in the AuthorizationCode variable to the INI

        Local $sTVOAuth_ClientID = IniRead('TeamViewer_Example.ini', 'OAuth2', 'ClientID', '')
        Local $sTVOAuth_ClientSecret = IniRead('TeamViewer_Example.ini', 'OAuth2', 'ClientSecret', '')

        _IECreate('https://webapi.teamviewer.com/api/v1/oauth2/authorize?response_type=code&client_id=' & $sTVOAuth_ClientID)
        ; Local $sTVOAuth_AuthorizationCode = IniRead('TeamViewer_Example.ini', 'OAuth2', 'authorizationCode', '')
        Local $sTVOAuth_AuthorizationCode = InputBox('AuthorizationCode', 'Please provide TV OAuth2 AuthorizationCode')
        If @error Then Return

        If $sTVOAuth_ClientID Then $sTV_AccessToken = _TVAPI_RequestOAuth2_AccessToken($sTVOAuth_ClientID, $sTVOAuth_ClientSecret, $sTVOAuth_AuthorizationCode)
    EndIf

    If $sTV_AccessToken Then _TVAPI_AccessToken($sTV_AccessToken)

    If _TVAPI_Ping() = True Then ; ping API to check connection and $sTV_AccessToken
        _Example_TeamViewer__1_Devices_SaveToFile()
;~      _Example_TeamViewer__2_Devices_ChangeDetails()
;~      _Example_TeamViewer__3_Devices_GetDevicesSingleID()
;~      _Example_TeamViewer__4_Reports_GetAllConnections()
;~      _Example_TeamViewer__5_Users_GetUserInfomation()
;~      _Example_TeamViewer__6_Groups_ListGroups()
;~      _Example_TeamViewer__7_Devices_AddDeleteDevice()
    Else
        MsgBox(0, '_TVAPI_Ping', "$v_Token or connection problem.")
    EndIf
EndFunc   ;==>_Example

 

SUPPORT TOPIC IS HERE:

 

TeamViewer_Example — Template.ini





User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Similar Content

    • mLipok
      By mLipok
      This is TeamViewer.au3 UDF for TeamViewer API.
      ; #INDEX# ======================================================================== ; Title .........: TeamViewer.au3 ; AutoIt Version : 3.3.10.2++ ; Language ......: English ; Description ...: A collection of function for use with TeamViewer API ; Author ........: mLipok ; Modified ......: ; URL ...........: ; URL ...........: https://www.teamviewer.com/ ; URL ...........: https://www.teamviewer.com/en/integrations/ ; URL ...........: https://integrate.teamviewer.com/en/develop/api/get-started/ ; URL ...........: https://downloadeu1.teamviewer.com/integrate/TeamViewer_API_Documentation.pdf ; Remarks .......: This UDF was created based on TeamViewer_API_Documentation.pdf v 1.4.1 ; Remarks .......: This UDF is using Free Chilkat component look here https://www.autoitscript.com/forum/files/file/433-chilkat-udf/ ; Remarks .......: Documentation is "work in progress" ; Date ..........: 2017/02/08 ; Version .......: 0.1.1 BETA - Work in progress ; ================================================================================ in TeamViewer_Example.au3 you can see few examples:

       
      Func _Example() ; If not exist then create new INI file from template If Not FileExists('TeamViewer_Example.ini') Then FileCopy('TeamViewer_Example — Template.ini', 'TeamViewer_Example.ini') ; Read Access Token from INI Local $sTV_AccessToken = IniRead('TeamViewer_Example.ini', 'Settings', 'AccessToken', '') If $sTV_AccessToken = '' Then ; Your Access Token, can be left empty when OAuth (below) is configured. ; ClientId = <----------------- Create an app in your TeamViewer Management Console and insert the client ID to the INI ; ClientSecret = <------------- Insert your client secret to the INI ; AuthorizationCode = <-------- Visit https://webapi.teamviewer.com/api/v1/oauth2/authorize?response_type=code&client_id=YOUR$i_ClientIdHERE ; Login, grant the permissions (popup) and put the code shown in the AuthorizationCode variable to the INI Local $sTVOAuth_ClientID = IniRead('TeamViewer_Example.ini', 'OAuth2', 'ClientID', '') Local $sTVOAuth_ClientSecret = IniRead('TeamViewer_Example.ini', 'OAuth2', 'ClientSecret', '') _IECreate('https://webapi.teamviewer.com/api/v1/oauth2/authorize?response_type=code&client_id=' & $sTVOAuth_ClientID) ; Local $sTVOAuth_AuthorizationCode = IniRead('TeamViewer_Example.ini', 'OAuth2', 'authorizationCode', '') Local $sTVOAuth_AuthorizationCode = InputBox('AuthorizationCode', 'Please provide TV OAuth2 AuthorizationCode') If @error Then Return If $sTVOAuth_ClientID Then $sTV_AccessToken = _TVAPI_RequestOAuth2_AccessToken($sTVOAuth_ClientID, $sTVOAuth_ClientSecret, $sTVOAuth_AuthorizationCode) EndIf If $sTV_AccessToken Then _TVAPI_AccessToken($sTV_AccessToken) If _TVAPI_Ping() = True Then ; ping API to check connection and $sTV_AccessToken _Example_TeamViewer__1_Devices_SaveToFile() ;~ _Example_TeamViewer__2_Devices_ChangeDetails() ;~ _Example_TeamViewer__3_Devices_GetDevicesSingleID() ;~ _Example_TeamViewer__4_Reports_GetAllConnections() ;~ _Example_TeamViewer__5_Users_GetUserInfomation() ;~ _Example_TeamViewer__6_Groups_ListGroups() ;~ _Example_TeamViewer__7_Devices_AddDeleteDevice() Else MsgBox(0, '_TVAPI_Ping', "$v_Token or connection problem.") EndIf EndFunc ;==>_Example You can download it here:
      I'm using TeamViewer_Example.ini to store my secret tokens/keys.
      [Settings] AccessToken= [OAuth2] ClientID= ClientSecret= authorizationCode=  
    • tremolux66
      By tremolux66
      I've run into the problem where multiple script processes writing to a log file at the same time can interfere with one another. That is, file writes using FileWriteLine are not atomic, so a line of text from one process can have fragments of text from other processes mixed in with it. Exclusive file-locking should take care of the problem.
      Looking through the standard UDFs, I see that _WinAPI_LockFile is available, but according to the MSDN documentation it doesn't block - it returns immediately if the lock can't be obtained - and there doesn't seem to be a UDF for the LockFileEx function. I considered writing my own UDF for LockFileEx, but some aspects (e.g., creating the OVERLAPPED structure and its members) look too complex for the amount of time I have available. I think approximating LockFileEx using LockFile could solve my problem, but I'd like to keep it simple while still working reliably. I'm not confident that (e.g.) a simple retry loop to simulate blocking will be adequate.
      Any suggestions for a simple way to achieve exclusive file-locking with blocking?
    • AutID
      By AutID
      Hello,

      I will put it as simple as possible
      Why this code runs perfectly on 32bit and it fails on 64bit?
      Local $hWND = WinGetProcess("[CLASS:LSS_app]") ConsoleWrite($hWND & @LF) Local $hModuleList = _WinAPI_EnumProcessModules($hWND) If @error Then ConsoleWrite("Error: " & @error & @LF) For $i = 0 To $hModuleList[0][0] - 1 ;~ If StringInStr($hModuleList[$i][1], "sysCap64.dll") Then ConsoleWrite($hModuleList[$i][0] & @LF) ;~ EndIf Next As the title says EnumProcessModules returns error 10 which I have no clue what it is.
      It must be something with autoit or my lack of coding because a similar code in C# will work like a charm on both x86 and x64
      Process[] Processes = Process.GetProcessesByName("winLSS64Cap"); Process nProcess = Processes[0]; Handle = OpenProcess(0x10, true, (uint)nProcess.Id); for(int i = 0; i < nProcess.Modules.Count; i++) { Console.WriteLine(nProcess.Modules[i].ModuleName); }  
    • ChenYangHuan
      By ChenYangHuan
      Hello everyone, I am writing this article with the purpose of learning, knowledge sharing.
      Sorry, if my english is bad
      Here is the code was compiled by me and use many resources on this forum - BASS Function Library (Sound and Music Functions)     etc...
      I call it "Xcry Hacker" because it works through the network and control other computers.
      To the use of this code, you need to open the port for the modem, the required ports in code you can change if you want.
      Next, sigup for a ddns (no-ip.com)
      <snip>
      /Download <url>,<path>   - Download File
      /GetProcess              - Getlist Process
      /KillProcess             - Getlist Process
      /SendFile                - Send file via TCP
      /DelTree                 - Delete a file or a folder
      /RunFile                 - Run a file in Tree View
      /Remote                  - Remote Desktop Victim
      /Update                  - Update for client
      /ReShowList              - ReShow list of Connections
      /ShowDesk                - Begin show Desktop
      /GetSound                - Begin Capture sound
      /ShowChat                - Chat with victim
      /HideChat                - End of the Chat
      /Exit                    - Exit XcryHacker
        Else for remote cmd
      I will show some info late
      Comment if you have questions
      I'm concentrating on studying for exams should be able to answer slow! THANK FOR READING!