Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gen0cide/gscript
Browse files Browse the repository at this point in the history
  • Loading branch information
vyrus001 committed Mar 10, 2018
2 parents 225f780 + 85b97f3 commit ff17dfd
Show file tree
Hide file tree
Showing 5 changed files with 2,079 additions and 125 deletions.
332 changes: 332 additions & 0 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,120 @@



## `AddRegKeyBinary(registryString, path, name, value)`

Add a binary registry key

### Argument List

* **registryString** *string*
* **path** *string*
* **name** *string*
* **value** *[]byte*

### Returned Object Fields

* **runtimeError** *error*

---



## `AddRegKeyDWORD(registryString, path, name, value)`

Add a DWORD registry key

### Argument List

* **registryString** *string*
* **path** *string*
* **name** *string*
* **value** *uint32*

### Returned Object Fields

* **runtimeError** *error*

---



## `AddRegKeyExpandedString(registryString, path, name, value)`

Add an expanded string registry key

### Argument List

* **registryString** *string*
* **path** *string*
* **name** *string*
* **value** *string*

### Returned Object Fields

* **runtimeError** *error*

---



## `AddRegKeyQWORD(registryString, path, name, value)`

Add a QWORD registry key

### Argument List

* **registryString** *string*
* **path** *string*
* **name** *string*
* **value** *uint64*

### Returned Object Fields

* **runtimeError** *error*

---



## `AddRegKeyString(registryString, path, name, value)`

Add a string registry key

### Argument List

* **registryString** *string*
* **path** *string*
* **name** *string*
* **value** *string*

### Returned Object Fields

* **runtimeError** *error*

---



## `AddRegKeyStrings(registryString, path, name, value)`

Add a registry key of type string(s)

### Argument List

* **registryString** *string*
* **path** *string*
* **name** *string*
* **value** *[]string*

### Returned Object Fields

* **runtimeError** *error*

---



## `Asset(assetName)`

Retrieves a packed asset from the VM embedded file store.
Expand All @@ -19,6 +133,41 @@ Retrieves a packed asset from the VM embedded file store.



## `DelRegKey(registryString, path)`

Delete a registry key

### Argument List

* **registryString** *string*
* **path** *string*

### Returned Object Fields

* **runtimeError** *error*

---



## `DelRegKeyValue(registryString, path, value)`

Delete a registry key value

### Argument List

* **registryString** *string*
* **path** *string*
* **value** *string*

### Returned Object Fields

* **runtimeError** *error*

---



## `DeobfuscateString(str)`

Basic string deobfuscator function.
Expand All @@ -35,6 +184,21 @@ Basic string deobfuscator function.



## `EnvVars()`

Returns a map of enviornment variable names to their corrisponding values.

### Argument List


### Returned Object Fields

* **vars** *map[string]string*

---



## `ExecuteCommand(baseCmd, cmdArgs)`

Executes system commands.
Expand All @@ -52,6 +216,23 @@ Executes system commands.



## `FindProcByName(procName)`

Returns the Pid of a given proccess, if the proccess can not be found, an error is returned

### Argument List

* **procName** *string*

### Returned Object Fields

* **pid** *int*
* **procError** *error*

---



## `ForkExecuteCommand(baseCmd, cmdArgs)`

Executes system commands via a forked call.
Expand All @@ -70,6 +251,39 @@ Executes system commands via a forked call.



## `GetEnvVar(vars)`

Returns the value of a given enviornment variable

### Argument List

* **vars** *string*

### Returned Object Fields

* **value** *string*

---



## `GetProcName(pid)`

Returns the name of a target proccess

### Argument List

* **pid** *int*

### Returned Object Fields

* **procName** *string*
* **runtimeError** *error*

---



## `Halt()`

Stop the current VM from continuing execution.
Expand All @@ -85,6 +299,25 @@ Stop the current VM from continuing execution.



## `InstallSystemService(path, name, displayName, description)`

Installs a target binary as a system service

### Argument List

* **path** *string*
* **name** *string*
* **displayName** *string*
* **description** *string*

### Returned Object Fields

* **installError** *error*

---



## `MD5(data)`

Perform an MD5() hash on data.
Expand Down Expand Up @@ -117,6 +350,24 @@ Basic string obfuscator function.



## `QueryRegKey(registryString, path)`

Retrive a registry key

### Argument List

* **registryString** *string*
* **path** *string*

### Returned Object Fields

* **keyObj** *RegistryRetValue*
* **runtimeError** *error*

---



## `RandomInt(min, max)`

Generates a random number between min and max.
Expand Down Expand Up @@ -166,6 +417,87 @@ Generates a random alpha numeric string of a specified length.



## `RemoveServiceByName(name)`

Uninstalls a system service

### Argument List

* **name** *string*

### Returned Object Fields

* **removealError** *error*

---



## `RunningProcs()`

Returns an array of int's representing active PIDs currently running

### Argument List


### Returned Object Fields

* **pids** *[]int*
* **runtimeError** *error*

---



## `Signal(signal, pid)`

Sends a signal to a target proccess

### Argument List

* **signal** *int*
* **pid** *int*

### Returned Object Fields

* **runtimeError** *error*

---



## `StartServiceByName(name)`

Starts a system service

### Argument List

* **name** *string*

### Returned Object Fields

* **installError** *error*

---



## `StopServiceByName(name)`

Stops a system service

### Argument List

* **name** *string*

### Returned Object Fields

* **installError** *error*

---



## `StripSpaces(str)`

Strip any unicode characters out of a string.
Expand Down
Loading

0 comments on commit ff17dfd

Please sign in to comment.