VoxCommando

VoxNastics (User Guides and Mods) => Integration Ideas => Topic started by: PegLegTV on February 28, 2018, 07:02:31 PM

Title: VC-TCP.exe - trigger events to VC's TCP Simple Web Server
Post by: PegLegTV on February 28, 2018, 07:02:31 PM
I've created a simple little exe file with AutoHotKey for communicating with Voxcommando through the TCP simple web server, this works great when you are running more then one Voxcommando on the same network and you only want to communicate with one specific instance from a script or another program like Windows Task Scheduler

Code used in the VC-TCP.exe
Quote
;uses HTTP Get to connect to TCP Server
VCpath = http://%1%/api/%2%
oHttp := ComObjCreate("WinHttp.Winhttprequest.5.1")
oHttp.open("GET", VCpath)
oHttp.send()
VCStatus = Done
return

in order to use this you will need to enable the TCP Plugin (http://voxcommando.com/mediawiki/index.php?title=Plugins#Enable_Plugins) and in the TCP Plugin enable Simple Web Server and set the port number you would like to use.

Message Formatting
Code: [Select]
VC-IP:PORT "TTS.Speak&&Hello, How are you"
VC-IP = the IP address of the computer you want to communicate with
PORT = the Port you set in the TCP Plugin under Simple Web Server

VC-TCP.exe examples
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.0-->
<command id="630" name="VC-TCP.exe examples" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="VC-IP:Port &quot;VC.TellVox&amp;&amp;what you want to tell VC&quot;&#xD;&#xA;&#xD;&#xA;VC-IP:Port &quot;TTS.Speak&amp;&amp;what you want VC to say&quot;&#xD;&#xA;&#xD;&#xA;VC-IP:Port &quot;VC.Triggerevent&amp;&amp;Event&amp;&amp;Payload 1&amp;&amp;Payload 2&amp;&amp;Payload 3&quot;">
  <action>
    <cmdType>Launch.Hidden</cmdType>
    <params>
      <param>{Path.VC}\VC-TCP.exe</param>
      <param>192.168.1.10:6300 "VC.Triggerevent&amp;&amp;Test.Event&amp;&amp;Payload 1&amp;&amp;Payload 2&amp;&amp;Payload 3"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Launch.Hidden</cmdType>
    <params>
      <param>{Path.VC}\VC-TCP.exe</param>
      <param>192.168.1.10:6300 "TTS.Speak&amp;&amp;Hello, how are you"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Launch.CMD</cmdType>
    <params>
      <param>VC-TCP.exe 192.168.1.10:6300 "VC.Triggerevent&amp;&amp;Test.Event&amp;&amp;Payload 1&amp;&amp;Payload 2&amp;&amp;Payload 3"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

more examples on action Formatting  (http://voxcommando.com/mediawiki/index.php?title=API_Application_Programming_Interface#Message_format)
Title: Re: VC-TCP.exe - trigger events to VC's TCP Simple Web Server
Post by: PegLegTV on April 18, 2018, 08:12:55 PM
I forgot to add an example of using VC-TCP.exe with Launch.CMD

Message Formatting
Code: [Select]
VC-TCP.exe VC-IP:PORT "VC.Triggerevent&&Test.Event&&Payload 1&&Payload 2&&Payload 3"
I also updated the command group above with an example
Title: Re: VC-TCP.exe - trigger events to VC's TCP Simple Web Server
Post by: PegLegTV on April 25, 2018, 01:16:07 PM
this morning I woke up to Windows Defender marking VC-TCP.exe as infected with a Trojan "Trojan:Win32/Fuery.A!cl", I have submitted the program for review, I will update when I here back
Title: Re: VC-TCP.exe - trigger events to VC's TCP Simple Web Server
Post by: jitterjames on April 25, 2018, 03:41:49 PM
Welcome to the world of big antivirus.  :biglaugh

Utter nonsense.
Title: Re: VC-TCP.exe - trigger events to VC's TCP Simple Web Server
Post by: PegLegTV on April 25, 2018, 06:01:58 PM
here's the final results, it has been cleared and no threats found.

(https://i.imgur.com/vAiJGEJ.png) (http://www.freeimagehosting.net/commercial-photography/)

Quote
Welcome to the world of big antivirus.  :biglaugh

Utter nonsense.

yeah no kidding