More hacking fixes, httpget() lua function.

Implements aren-cllc's httpget() lua method. Works perfectly.
This commit is contained in:
MichaelTheShifter 2016-07-02 11:35:27 -04:00
parent 20fcece26d
commit 5be773d4f0
2 changed files with 8 additions and 1 deletions

View file

@ -111,6 +111,13 @@ public LuaInterpreter()
/// </summary> /// </summary>
public void RegisterCore() 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 //Shifter Extension API
mod.shifter_add_category = new Action<string>((name) => mod.shifter_add_category = new Action<string>((name) =>
{ {

View file

@ -1168,7 +1168,7 @@ private void HackUI_Load(object sender, EventArgs e)
tmrvisualizer.Start(); tmrvisualizer.Start();
} }
#region ENEMY #region ENEMY
private EnemyHacker ThisEnemyHacker { get; set; } private EnemyHacker ThisEnemyHacker { get; set; }
public List<Computer> AllEnemyComputers = null; public List<Computer> AllEnemyComputers = null;
public Computer ThisEnemyPC { get; set; } public Computer ThisEnemyPC { get; set; }