Skip to content

Commit

Permalink
Merge b7de73f into 6a06734
Browse files Browse the repository at this point in the history
  • Loading branch information
meuchels committed Jul 1, 2021
2 parents 6a06734 + b7de73f commit 3bb1217
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 17 deletions.
18 changes: 18 additions & 0 deletions api/tacticalrmm/scripts/community_scripts.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,24 @@
"shell": "powershell",
"category": "TRMM (Win):Collectors"
},
{
"guid": "9cfdfe8f-82bf-4081-a59f-576d694f4649",
"filename": "Win_Teamviewer_Get_ID.ps1",
"submittedBy": "https://github.com/silversword411",
"name": "TeamViewer - Get ClientID for client",
"description": "Returns Teamviwer ClientID for client - Use with Custom Fields for later use. ",
"shell": "powershell",
"category": "TRMM (Win):Collectors"
},
{
"guid": "e43081d4-6f71-4ce3-881a-22da749f7a57",
"filename": "Win_AnyDesk_Get_Anynet_ID.ps1",
"submittedBy": "https://github.com/meuchels",
"name": "AnyDesk - Get AnyNetID for client",
"description": "Returns AnyNetID for client - Use with Custom Fields for later use. ",
"shell": "powershell",
"category": "TRMM (Win):Collectors"
},
{
"guid": "95a2ee6f-b89b-4551-856e-3081b041caa7",
"filename": "Win_Power_Profile_Reset_High_Performance_to_Defaults.ps1",
Expand Down
47 changes: 47 additions & 0 deletions docs/docs/3rdparty_anydesk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# AnyDesk

## AnyDesk Integration

!!!info
You can setup a full automation policy to collect the machine GUID but this example will collect from just one agent for testing purposes.

From the UI go to **Settings > Global Settings > CUSTOM FIELDS > Agents**

Add Custom Field</br>
**Target** = `Agent`</br>
**Name** = `AnyNetID`</br>
**Field Type** = `Text`</br>

![Service Name](images/3rdparty_anydesk1.png)

While in Global Settings go to **URL ACTIONS**

Add a URL Action</br>
**Name** = `AnyDesk Control`</br>
**Description** = `Connect to a AnyDesk Session`</br>
**URL Pattern** =

```html
anydesk:{{agent.AnyNetID}}
```


Navigate to an agent with AnyDesk running (or apply using **Settings > Automation Manager**).</br>
Go to Tasks.</br>
Add Task</br>
**Select Script** = `AnyDesk - Get AnyNetID for client` (this is a builtin script from script library)</br>
**Descriptive name of task** = `Collects the AnyNetID for AnyDesk.`</br>
**Collector Task** = `CHECKED`</br>
**Custom Field to update** = `AnyNetID`</br>

![Service Name](images/3rdparty_anydesk2.png)

Click **Next**</br>
Check **Manual**</br>
Click **Add Task**

Right click on the newly created task and click **Run Task Now**.

Give it a second to execute then right click the agent that you are working with and go to **Run URL Action > AnyDesk Control**

It launch the session in AnyDesk.
47 changes: 47 additions & 0 deletions docs/docs/3rdparty_teamviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# TeamViewer

## TeamViewer Integration

!!!info
You can setup a full automation policy to collect the machine GUID but this example will collect from just one agent for testing purposes.

From the UI go to **Settings > Global Settings > CUSTOM FIELDS > Agents**

Add Custom Field</br>
**Target** = `Agent`</br>
**Name** = `TeamViewerClientID`</br>
**Field Type** = `Text`</br>

![Service Name](images/3rdparty_teamviewer1.png)

While in Global Settings go to **URL ACTIONS**

Add a URL Action</br>
**Name** = `TeamViewer Control`</br>
**Description** = `Connect to a Team Viewer Session`</br>
**URL Pattern** =

```html
https://start.teamviewer.com/device/{{agent.TeamViewerClientID}}/authorization/password/mode/control
```


Navigate to an agent with TeamViewer running (or apply using **Settings > Automation Manager**).</br>
Go to Tasks.</br>
Add Task</br>
**Select Script** = `TeamViewer - Get ClientID for client` (this is a builtin script from script library)</br>
**Descriptive name of task** = `Collects the ClientID for TeamViewer.`</br>
**Collector Task** = `CHECKED`</br>
**Custom Field to update** = `TeamViewerClientID`</br>

![Service Name](images/3rdparty_teamviewer2.png)

Click **Next**</br>
Check **Manual**</br>
Click **Add Task**

Right click on the newly created task and click **Run Task Now**.

Give it a second to execute then right click the agent that you are working with and go to **Run URL Action > TeamViewer Control**

It launch the session and possibly promt for password in TeamViewer.
Binary file added docs/docs/images/3rdparty_anydesk1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/images/3rdparty_anydesk2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/images/3rdparty_teamviewer1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/images/3rdparty_teamviewer2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ nav:
- MeshCentral Integration: mesh_integration.md
- 3rd Party Integrations:
- "Connectwise Control / Screenconnect": 3rdparty_screenconnect.md
- "TeamViewer" : 3rdparty_teamviewer.md
- "AnyDesk" : 3rdparty_anydesk.md
- Contributing:
- "Contributing to Docs": contributing.md
- "Contributing using VSCode": contributing_using_vscode.md
Expand Down
15 changes: 15 additions & 0 deletions scripts/Win_AnyDesk_Get_Anynet_ID.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$Paths = @($Env:APPDATA, $Env:ProgramData, $Env:ALLUSERSPROFILE)

foreach ($Path in $Paths) {
If (Test-Path $Path\AnyDesk) {
$GoodPath = $Path
}
}

$ConfigPath = $GoodPath + "\AnyDesk\system.conf"

$ResultsIdSearch = Select-String -Path $ConfigPath -Pattern ad.anynet.id

$Result = @($ResultsIdSearch -split '=')

$Result[1]
30 changes: 30 additions & 0 deletions scripts/Win_Teamviewer_Get_ID.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Retrieve Teamviewer ID from TRMM agent. This tests versions 6+ known Registry Paths.

$TeamViewerVersionsNums = @('6', '7', '8', '9', '')
$RegPaths = @('HKLM:\SOFTWARE\TeamViewer', 'HKLM:\SOFTWARE\Wow6432Node\TeamViewer')
$Paths = @(foreach ($TeamViewerVersionsNum in $TeamViewerVersionsNums) {
foreach ($RegPath in $RegPaths) {
$RegPath + $TeamViewerVersionsNum
}
})

foreach ($Path in $Paths) {
If (Test-Path $Path) {
$GoodPath = $Path
}
}

foreach ($FullPath in $GoodPath) {
If ($null -ne (Get-Item -Path $FullPath).GetValue('ClientID')) {
$TeamViewerID = (Get-Item -Path $FullPath).GetValue('ClientID')
$ErrorActionPreference = 'silentlycontinue'

}



}
Write-Output $TeamViewerID


Exit $LASTEXITCODE
17 changes: 0 additions & 17 deletions scripts_wip/Win_Teamviewer_Get_ID.ps1

This file was deleted.

0 comments on commit 3bb1217

Please sign in to comment.