diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-02 11:35:27 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-02 11:35:27 -0400 |
| commit | 5be773d4f027ac0f00392be80d8cc5dfb67669be (patch) | |
| tree | 83ca50f00ba1c05bcc46e5ed44b20d6c1cb55462 | |
| parent | 20fcece26d3c54d87dd3c66702b71d5c13f05199 (diff) | |
| download | shiftos-c-_theultimatehacker-5be773d4f027ac0f00392be80d8cc5dfb67669be.tar.gz shiftos-c-_theultimatehacker-5be773d4f027ac0f00392be80d8cc5dfb67669be.tar.bz2 shiftos-c-_theultimatehacker-5be773d4f027ac0f00392be80d8cc5dfb67669be.zip | |
More hacking fixes, httpget() lua function.
Implements aren-cllc's httpget() lua method. Works perfectly.
| -rw-r--r-- | source/WindowsFormsApplication1/Engine/Lua_Interp.cs | 7 | ||||
| -rw-r--r-- | source/WindowsFormsApplication1/Gameplay/HackUI.cs | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs index c4a9162..ed9c31f 100644 --- a/source/WindowsFormsApplication1/Engine/Lua_Interp.cs +++ b/source/WindowsFormsApplication1/Engine/Lua_Interp.cs @@ -111,6 +111,13 @@ namespace ShiftOS /// </summary> public void RegisterCore() { + mod.httpget = new Func<string, string>((url) => + { + WebRequest request = WebRequest.Create(url); + Stream requestStream = request.GetResponse().GetResponseStream(); + StreamReader requestRead = new StreamReader(requestStream); + return requestRead.ReadToEnd(); + }); //Shifter Extension API mod.shifter_add_category = new Action<string>((name) => { diff --git a/source/WindowsFormsApplication1/Gameplay/HackUI.cs b/source/WindowsFormsApplication1/Gameplay/HackUI.cs index efafb25..a1c1555 100644 --- a/source/WindowsFormsApplication1/Gameplay/HackUI.cs +++ b/source/WindowsFormsApplication1/Gameplay/HackUI.cs @@ -1168,7 +1168,7 @@ namespace ShiftOS tmrvisualizer.Start(); } - #region ENEMY + #region ENEMY private EnemyHacker ThisEnemyHacker { get; set; } public List<Computer> AllEnemyComputers = null; public Computer ThisEnemyPC { get; set; } |
