Jump to content

Simple Script Distribution Platform


BlackDawn187
 Share

Recommended Posts

Hello,

Welcome to what I call the SSDP(Simple Script Distribution Platform) aka Hub. Currently, Hub is only limited by the creative development of the community. It is capable of executing various tasks on its own and, Boasting the ability to run custom scripts, It leaves the door wide open to your imagination. Sure, You could run all of your scripts independently or, You could use the Hub platform.

The one downfall is that in order for Hub to execute your scripts, They must be compiled.Once compiled, Be sure that your script is coded to resemble the attached "Example" script. That way Hub will be able to monitor and, detect your script. An upside to Hub, Is the ability to enable or disable the autorun feature for the scripts. Along with other commands, You can Google Search straight from the applications input box. Mind you we haven't found a suitable method to display the results inside the applications GUI yet, haha. Currently, This is one of my most active projects and, I'm currently working on developing other scripts to make available through the internal "/plugins" command. Though, I could theoretically rewrite everyones attachment scripts to work with Hub. But, I'll stay on the right side of Copyright out of mutual respect.

If you would like to request to have something made and included within this application, Don't hesitate to contact me. Even if you would like to simply donate what you've already made yourself, There may be others out there looking for something along what you've made yourself. I am open to constructive criticism and, suggestions. If you have anything to offer in regards to the application. As well, Bug Testers would be greatly appreciated so that I can get everything ironed out.

 

adm4.png

 


Current Version = 1.8 (Bug: Plugins that autorun during main application launch, Do not show up as loaded in the GUI, But they are executed properly)

- Implemented a Always Connected system [(May cause some frustration due to dropped connections)This system ensures you have a open connection to the internet]

- Added Menu items such as Connect, Reconnect and, Disconnect

Last Version = 1.7 (Bug: Plugins that autorun during main application launch, Do not show up as loaded in the GUI, But they are executed properly)

 - Added the ability to manipulate the GUI from plugins (RCC Related Feature)
- Optimized some other code related to the plugin system

Previous Version = 1.6

 - Added the /message command, For coordination with the RCC plugin
 - Implemented Code to Create a Shortcut by default in the Startup Directory
 - Added a Tray Menu to interact with the application

Previous Version = 1.5

- "/Reboot Application" command added to enable manual reboots

- Fixed v1.4 Transitioning Bug

- Improved upon the AutoRun system, By adding a "AutoRun On/Off" command

- Added control measures to ensure that the Input Box is not spammed during Application Launch

- Inadvertently discovered a bug in the updating system and, patched it

Last Version = 1.4 (Bug: Improper Transitioning from beginning to end, Restart until application displays: "Found Plugins: 0" with fresh install)

- "/Unload Plugin" command added to manually stop plugins

- Fixed a couple bugs in the Plugin Counter throughout the application 

Previous Version = 1.3 (Working on adding a "/Unload" command)

- Implements an Enable/Disable AutoRun system for plugins (Can be adjusted per plugin in the Plugins.ini file)

- "/Load Plugin" command added to manually start disabled autorun plugins

- Updated "Example.au3" to demonstrate proper AutoRun settings

- A couple Menu Items have been completed

Previous Version = 1.2

- Fixes Previous Bug noted below in Version 1.1, As well as a minor issue with GUI_EVENT_CLOSE

- Fixed Bug (Existing "Plugins" on the host side are incompatible with this version until they've been updated)

Previous Version = 1.1  

- Bug (Download System offline pending a critical update)


For security purposes, The SHA hash for the Compressed Zip file is:

c78cc2e817e7a7a401d1b48ee2861c9969fc8f53f9da46809249f613ba96af85 and,

The SHA hash for the compiled executable is:

5bd378151a31022a35706ae85b3de3f432f6766b882ed004937cb27f7b49360c

These hash values and, The ones you have may differ depending on which version you're running. Hashes for the latest version should always be found here unless otherwise stated.

Please Note - The plugins as they are called within the application are not .au3 files. They have been previously compiled with Scite.

                     - This application contains an auto updating function which may be flagged by Anti Virus', Manual Updating is not recommended.

                     - There is no need to constantly download the latest version, Unless you have restricted the applications internet access

                     - Also, Don't let the download counts on the attachments fool you, There's been well over 20 downloads already


Example.au3:

As per request, As well as planned release, Here is a raw example script that demonstrates proper coordination with the main application. By no means is the code etiquette  the best, But for demonstration purposes it will be satisfactory. Fellow members will notice that the script does not execute on it's own, That is handled via the main application and, Should remain that way to avoid unforeseen bugs. I have attached the script below in the downloads to save everyone a copy and paste if they're interested.

;-----------------------------------------------------
; Application Credits
;-----------------------------------------------------
; Product: Example Plugin Script
; Author: BlackDawn187
; Version: 1.1
;
; Developed: January 14, 2014
; Updated: February 8, 2014
;-----------------------------------------------------

;-----------------------------------------------------
; Change Log
;-----------------------------------------------------
; v1.0 - Published Plugin to hosting web server
; v1.1 - Added Compatability Support for Hub v1.2+
;-----------------------------------------------------

;-----------------------------------------------------
; Application Includes & Misc Elements
;-----------------------------------------------------
#NoTrayIcon
AutoItSetOption("WinTitleMatchMode", 2)
;-----------------------------------------------------
; AutoIt Specific Includes
;-----------------------------------------------------
#include <File.au3>
#include <Array.au3>
#include <Misc.au3>
;-----------------------------------------------------

;-----------------------------------------------------
; Global Application Variables
;-----------------------------------------------------
$GlobalVersion = IniRead("Config.ini", "Global Settings", "Global Version", "")
$GlobalDebug = "False" ;Set to false to disable debuging information or, true to enable.
$Version = "1.1"
$Address = IniRead("Config.ini", "Global Settings", "Address", "")
$Title = IniRead("Config.ini", "Global Settings", "Title", "")
$Author = IniRead("Config.ini", "Global Settings", "Author", "")
;-----------------------------------------------------

;-----------------------------------------------------
; Initiate Program
;-----------------------------------------------------
Call("FirstRun")
;-----------------------------------------------------

;-----------------------------------------------------
; Functions List
;-----------------------------------------------------
Func FirstRun()
While 1
   $InstallCheck = IniRead("Config.Ini", "Plugins", "Example", "") 
   $PluginINICheck = IniRead("Plugins.ini", "Example", "Verification", "False")
   Sleep("1000")  
   If FileExists("Config.ini") = "1" And $PluginINICheck <> "" And $InstallCheck = "Installed" And WinExists("" & $Title & " v" & $GlobalVersion & " by " & $Author & " - [Online]") Then
      Call("MessageBox")
      ExitLoop
   ElseIf FileExists("Config.ini") = "1" And $PluginINICheck <> "" And $InstallCheck = "Installed" And WinExists("" & $Title & " v" & $GlobalVersion & " by " & $Author & " - [Offline]") Then
      Call("MessageBox")
      ExitLoop
   ElseIf FileExists("Config.ini") = "1" And $InstallCheck = "" Then
      Call("Install")
      ExitLoop
   ElseIf FileExists("Config.ini") = "1" And $InstallCheck = "Installed" And $PluginINICheck <> "False" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Launch Failed: Main Application is not currently running", 10)
      Exit
   ElseIf FileExists("Config.ini") = "1" And $InstallCheck = "Installed" And $PluginINICheck = "False" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Install Failed: Configuration File Missing", 10)
      Exit
   ElseIf FileExists("Config.ini") = "0" And $InstallCheck = "" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Install Failed: Configuration File Missing", 10)
      Exit
   ElseIf FileExists("Config.ini") = "0" And $InstallCheck = "Installed" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Install Failed: Configuration File Missing", 10)
      Exit
   Else
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Installation Successful: This plugin can now be launched via the main application", 10)
      ExitLoop
   EndIf
WEnd
EndFunc

Func MessageBox()
   MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "This is an Example Plugin," & @CRLF & "" & @CRLF & "Which must be compiled to execute from the main application", 10)
EndFunc

Func Install()
MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "[Example]: Installing...", 10)
   IniWrite("Plugins.ini", "Example", "Verification", "True")
   IniWrite("Plugins.ini", "Example", "AutoRun", "False")
   IniWrite("Config.ini", "Plugins", "Example", "Installed")
MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "[Example]: Installation Complete!", 10)   
   Sleep("1000")   
Call("FirstRun")
EndFunc
 

RCC.au3 (Remote Command Console):

As per request, I have coded and, attached a working copy of the RCC script. For the benefit of your eyes, I will briefly describe what this script does, Rather than forcing you to read through the code to figure it out. What the RCC script does, Is it enables remote commands to be sent to the main application. Only commands previously mentioned or, mentioned within the commands.ini file can be executed. How it works, Is that the script checks a web page and, retrieves a string. Once the string has been determined to be unique, The script then sends the command to the main application via ControlSetText. Since the main application requires focus to accept input submission, The script will then focus on the main application and, will submit the command. Aside from making the script available here, A compiled version will be hosted on the main applications remote web server. If you happen to run the compiled script, It will execute commands based on the web servers issued commands. Which could be anything, As I could run tests on it at any point and, therefore your application will respond accordingly. So with that information, I would advise community members to point the script towards a different address of their own. I've added #RequireAdmin as to prevent abuse of this script as you should. As always you can contact me here, or private message me for support.

;-----------------------------------------------------
; Application Credits
;-----------------------------------------------------
; Product: Remote Command Console
; Author: BlackDawn187
; Version: 1.2
;
; Developed: February 18, 2014
;-----------------------------------------------------

;-----------------------------------------------------
; Change Log
;-----------------------------------------------------
; v1.1 - Published Plugin to hosting web server
; v1.2 - Implemented a feature to show or, hide the GUI
;-----------------------------------------------------

;-----------------------------------------------------
; Application Includes & Misc Elements
;-----------------------------------------------------
#NoTrayIcon
AutoItSetOption("WinTitleMatchMode", 2)
;-----------------------------------------------------
; AutoIt Specific Includes
;-----------------------------------------------------
#include <File.au3>
#include <Array.au3>
#include <Misc.au3>
;-----------------------------------------------------

;-----------------------------------------------------
; Global Application Variables
;-----------------------------------------------------
$GlobalVersion = IniRead("Config.ini", "Global Settings", "Global Version", "")
$GlobalDebug = "False" ;Set to false to disable debuging information or, true to enable.
$GUIState = IniRead("Config.ini", "Global Settings", "GUI State", "On") 
$Version = "1.2"
$Address = IniRead("Config.ini", "Global Settings", "Address", "")
$Title = IniRead("Config.ini", "Global Settings", "Title", "")
$Author = IniRead("Config.ini", "Global Settings", "Author", "")
;-----------------------------------------------------

;-----------------------------------------------------
; Initiate Program
;-----------------------------------------------------
Call("FirstRun")
;-----------------------------------------------------

;-----------------------------------------------------
; Functions List
;-----------------------------------------------------
Func FirstRun()
While 1
   $InstallCheck = IniRead("Config.Ini", "Plugins", "RCC", "") 
   $PluginINICheck = IniRead("Plugins.ini", "RCC", "Verification", "False")
   Sleep("1000")  
   If FileExists("Config.ini") = "1" And $PluginINICheck <> "" And $InstallCheck = "Installed" And WinExists("" & $Title & " v" & $GlobalVersion & " by " & $Author & " - [Online]") Then
      Call("AdminCheck")
      ExitLoop
   ElseIf FileExists("Config.ini") = "1" And $PluginINICheck <> "" And $InstallCheck = "Installed" And WinExists("" & $Title & " v" & $GlobalVersion & " by " & $Author & " - [Offline]") Then
      Call("AdminCheck")
      ExitLoop
   ElseIf FileExists("Config.ini") = "1" And $InstallCheck = "" Then
      Call("Install")
      ExitLoop
   ElseIf FileExists("Config.ini") = "1" And $InstallCheck = "Installed" And $PluginINICheck <> "False" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Launch Failed: Main Application is not currently running", 10)
      Exit
   ElseIf FileExists("Config.ini") = "1" And $InstallCheck = "Installed" And $PluginINICheck = "False" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Install Failed: Configuration File Missing", 10)
      Exit
   ElseIf FileExists("Config.ini") = "0" And $InstallCheck = "" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Install Failed: Configuration File Missing", 10)
      Exit
   ElseIf FileExists("Config.ini") = "0" And $InstallCheck = "Installed" Then
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Install Failed: Configuration File Missing", 10)
      Exit
   Else
      MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "Installation Successful: This plugin can now be launched via the main application", 10)
      ExitLoop
   EndIf
WEnd
EndFunc

Func AdminCheck()
;-----------------------------------------------------
; Request Admin Privileges
;-----------------------------------------------------
#RequireAdmin
$Admin = IsAdmin()
If $Admin = 1 Then
   Call ("RCC")   
ElseIf $Admin = 0 Then
   MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "This application requires Administrative Privleges to function properly," & @CRLF & "Please restart or, reload the application to proceed.")
   Exit
EndIf
EndFunc

Func RCC()
   While 1
   $ParentDir = StringLeft("" & @ScriptDir & "", StringInStr("" & @ScriptDir & "", "\", 0, -1) -1)
   $RCC_GUI_State = IniRead("" & $ParentDir & "\Config.ini", "Global Settings", "GUI State", "")
   FileDelete("" & @ScriptDir & "\RCC\Command.dat")
   If $RCC_GUI_State = "On" Then
      $LocalAddress = IniRead("" & @ScriptDir & "\Config.ini", "Global Settings", "Address", "")
      InetGet("" & $LocalAddress & "rcc.php", "" & @ScriptDir & "\RCC\Command.dat", 1, 0)
      $OldCommand = IniRead("Plugins.ini", "RCC", "Old Command", "")
      $NewCommand = FileRead("" & @ScriptDir & "\RCC\Command.dat")
      If $NewCommand = $OldCommand Then
         Sleep("100")
      ElseIf $NewCommand <> $OldCommand And @error = "" Then
         BlockInput(1)
         WinActivate("" & $Title & " v" & $GlobalVersion & " by " & $Author & "")
         WinWaitActive("" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "", 10000)
         ControlSetText("" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "", "[ID:11]", "")
         ControlSetText("" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "", "[ID:11]", $NewCommand)
         Sleep("1000")
         Send("{Enter}")
         BlockInput(0)
         IniWrite("Plugins.ini", "RCC", "Old Command", $NewCommand)
      EndIf
      Sleep("30000")
   ElseIf $RCC_GUI_State = "Off" Then
      $LocalAddress = IniRead("" & @ScriptDir & "\Config.ini", "Global Settings", "Address", "")
      InetGet("" & $LocalAddress & "rcc.php", "" & @ScriptDir & "\RCC\Command.dat", 1, 0)
      $OldCommand = IniRead("Plugins.ini", "RCC", "Old Command", "")
      $NewCommand = FileRead("" & @ScriptDir & "\RCC\Command.dat")
      If $NewCommand = $OldCommand Then
         Sleep("100")
      ElseIf $NewCommand <> $OldCommand And @error = "" Then
         BlockInput(1)
         Send("^!S")
         WinActivate("" & $Title & " v" & $GlobalVersion & " by " & $Author & "")
         WinWaitActive("" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "", 10000)
         ControlSetText("" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "", "[ID:11]", "")
         ControlSetText("" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "", "[ID:11]", $NewCommand)
         Sleep("1000")
         Send("{Enter}")
         Send("^!H")
         BlockInput(0)
         IniWrite("Plugins.ini", "RCC", "Old Command", $NewCommand)
      EndIf
      Sleep("30000")
   EndIf
   WEnd
EndFunc

Func Install()
MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "[Remote Command Console]: Installing...", 10)
   DirCreate("RCC")
   IniWrite("Plugins.ini", "RCC", "Verification", "True")
   IniWrite("Plugins.ini", "RCC", "AutoRun", "False")
   IniWrite("Config.ini", "Plugins", "RCC", "Installed")
MsgBox(0, "" & $Title & " v" & $GlobalVersion & " by " & $Author & "", "[Remote Command Console]: Installation Complete!", 10)   
   Sleep("1000") 
EndFunc 

Example.au3

RCC.au3

Hub.zip

Edited by BlackDawn187
Link to comment
Share on other sites

Just bumping this topic to inform people that the application has been updated, Working on updating the current list of plugins to be compatible.

 

Plugins should not start automatically. (there should be a menu to enable/disable them with checkboxes[this menu should be searchable])

There should be an ability to add custom repositories to the plugins list. (this being said, you should also release a script showing the format that plugins should be put it)

This way users could create their own plugins, which can then be accessed through the additional repository they've created.

Link to comment
Share on other sites

Plugins should not start automatically. (there should be a menu to enable/disable them with checkboxes[this menu should be searchable])

There should be an ability to add custom repositories to the plugins list. (this being said, you should also release a script showing the format that plugins should be put it)

This way users could create their own plugins, which can then be accessed through the additional repository they've created.

 

I agree with you on pretty much all the points you've made. I plan on adding the ability to enable/disable autorun plugins, Including the ability to start/stop from the input box. Though, They can be stopped using the internal /kill command. Also, I do have an uncompiled copy of Example.exe that I plan on releasing to the public once it's updated for the current version, Which shows how exactly to coordinate custom compiled repositories. Thank you for the suggestions per say.

Edit: Attached "Example.au3" to the original post for those interested in coordinating their own scripts with this platform.

Edited by BlackDawn187
Link to comment
Share on other sites

Just bumping this topic to inform people that the application has been updated to version 1.3, If you have a previous version it should automatically update if you permit it internet access when run. Refer to the original post for more information pertaining to this release.

 

/Edit: Application Hack Disclosure

Additionally, I thought I would disclose the ability that there is a hack that members can do to point the application towards their own web server. Simply modify the address located in the config file to point to your own domain such as "http://www.google.com/". Then upload a lists.ini file to that domain/directory, With the contents outlined below;

[Example]
Description=Is a compiled example plugin
Author=BlackDawn187
Version=1.1
Download=downloads/example.zip

This will enable you to download your own remotely hosted compiled scripts vs. the default ones. If you need help in this matter, Please post your questions below. This hack will ultimately break a couple things within the application but can be resolved by requesting additional web server files that populate variables that are used within the title of the gui and, other functions.

Edited by BlackDawn187
Link to comment
Share on other sites

  • 2 weeks later...

Updated OP to attach RCC.au3 script. Which is also known as "Remote Command Console". Additional information is available in the OP.

Also, A new update for the main application is currently being primed for release. Stay tuned for that, It has the /unload command that I've been working on implemented. As well, A couple bugs have been exterminated.

Edited by BlackDawn187
Link to comment
Share on other sites

As promised, Version 1.4 is now live. Currently, There is a bug, That affects the application from reaching the end of code. Thus, Making the application hang. A work around for this is to kill the process through Task Manager, As the GUI [X] is not registering. Then restart until end of code is reached which will be evident once "Found Plugins: 0" is displayed within the console box. Took me two reboots to successfully reach end of code. Refer to the OP for download links and, additional information.

Link to comment
Share on other sites

Sorry, For any 'excessive bumping' that I may be doing. But, Version 1.5 has just been rolled out to address a previous bug. It also includes some new commands and, another undetected bug fix. As always checkout the original post for additional information along with the download link.

Edited by BlackDawn187
Link to comment
Share on other sites

Well, Seems like I left some debugging code in the last version, If you have noticed it yet. Either way it won't affect the applications functionality. I've already went back in and removed it. Although, The the debug code won't be removed until the next version is released for those who are automatically updating. People who are manually updating will not see the debug code as I have updated the attached zip folder.

Edited by BlackDawn187
Link to comment
Share on other sites

Hello again, I recently reviewed the download counts pertaining to the files attached to the original post and, realized that I should update the included code/download for the RCC script. Seeing as it has been updated to coordinate better with version 1.7.

The main change that you'll notice is the two new lines prior to sending the received command to the application and, likewise after the fact. Those lines should look like this: Send("^!S) or, Send("^!H"). The lines are pretty self explanatory if you've been following the Changelog. As per version 1.7, I added two hotkeys into the main application. Which permit the user or, plugin to manipulate the GUI State of the main application. Therefore running semi-silent while still receiving commands.

Also, With version 1.7, I've included the ability to use a new command called "/message". I know it's not original. All it does, Is display the text found after the command in a MsgBox, to the user. The code relating to that is still being worked on and, You may see some undesirable effects.

Ultimately, The "/message" command was implemented so that RCC could send messages to whom ever is sitting at the computer where the main application is running. Given time, The ability to communicate back an forth may be added. If you don't understand the code provided in the attached RCC.au3, I will modify it for you to point at a web server in your possession. Though I'm pretty sure most people reading this already know how to do so.

Edited by BlackDawn187
Link to comment
Share on other sites

Here I go again bumping this topic, Just wanted to give everyone a heads up that there's a new update. Like always check out the original post for specific changes. Not a whole lot of changes this time around, But there was a lot of code restructuring involved. Also, If you're one of the members following this project of mine, Some feedback would be greatly appreciated.

Edited by BlackDawn187
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...