cobbr / Elite

Elite is the client-side component of the Covenant project. Covenant is a .NET command and control framework that aims to highlight the attack surface of .NET, make the use of offensive .NET tradecraft easier, and serve as a collaborative command and control platform for red teamers.
https://cobbr.io/Covenant.html
GNU General Public License v3.0
117 stars 18 forks source link

Can't go to `HTTP` menu #13

Closed nccdhelton closed 5 years ago

nccdhelton commented 5 years ago

OS: macOS 10.14.5 dotnet version: 2.2.301 (installed via Homebrew)

I'm running Covenant and Elite both locally using the macOS version of the .NET SDK.

When I connect to the Covenant server with Elite, I can go to the Listener menu, but when I type HTTP and hit Enter, I get this error message after a while in Elite, and am kicked back to the Listener menu:

(Covenant: Listeners) > HTTP
[-] CovenantException: <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8" />
        <title>Internal Server Error</title>
        <style>
            body {
    font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;
    font-size: .813em;
    color: #222;
    background-color: #fff;
}

h1, h2, h3, h4, h5 {
    /*font-family: 'Segoe UI',Tahoma,Arial,Helvetica,sans-serif;*/
    font-weight: 100;
}

h1 {
    color: #44525e;
    margin: 15px 0 15px 0;
}

h2 {
    margin: 10px 5px 0 0;
}

h3 {
    color: #363636;
    margin: 5px 5px 0 0;
}

code {
    font-family: Consolas, "Courier New", courier, monospace;
}

body .titleerror {
    padding: 3px 3px 6px 3px;
    display: block;
    font-size: 1.5em;
    font-weight: 100;
}

body .location {
    margin: 3px 0 10px 30px;
}

#header {
    font-size: 18px;
    padding: 15px 0;
    border-top: 1px #ddd solid;
    border-bottom: 1px #ddd solid;
    margin-bottom: 0;
}

    #header li {
        display: inline;
        margin: 5px;
        padding: 5px;
        color: #a0a0a0;
        cursor: pointer;
    }

    #header .selected {
        background: #44c5f2;
        color: #fff;
    }

#stackpage ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    /*border-bottom: 1px #ddd solid;*/
}

#stackpage .details {
    font-size: 1.2em;
    padding: 3px;
    color: #000;
}

#stackpage .stackerror {
    padding: 5px;
    border-bottom: 1px #ddd solid;
}

#stackpage .frame {
    padding: 0;
    margin: 0 0 0 30px;
}

    #stackpage .frame h3 {
        padding: 2px;
        margin: 0;
    }

#stackpage .source {
    padding: 0 0 0 30px;
}

    #stackpage .source ol li {
        font-family: Consolas, "Courier New", courier, monospace;
        white-space: pre;
        background-color: #fbfbfb;
    }

#stackpage .frame .source .highlight li span {
    color: #FF0000;
}

#stackpage .source ol.collapsible li {
    color: #888;
}

    #stackpage .source ol.collapsible li span {
        color: #606060;
    }

.page table {
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 20px;
}

.page th {
    vertical-align: bottom;
    padding: 10px 5px 5px 5px;
    font-weight: 400;
    color: #a0a0a0;
    text-align: left;
}

.page td {
    padding: 3px 10px;
}

.page th, .page td {
    border-right: 1px #ddd solid;
    border-bottom: 1px #ddd solid;
    border-left: 1px transparent solid;
    border-top: 1px transparent solid;
    box-sizing: border-box;
}

    .page th:last-child, .page td:last-child {
        border-right: 1px transparent solid;
    }

.page .length {
    text-align: right;
}

a {
    color: #1ba1e2;
    text-decoration: none;
}

    a:hover {
        color: #13709e;
        text-decoration: underline;
    }

.showRawException {
    cursor: pointer;
    color: #44c5f2;
    background-color: transparent;
    font-size: 1.2em;
    text-align: left;
    text-decoration: none;
    display: inline-block;
    border: 0;
    padding: 0;
}

.rawExceptionStackTrace {
    font-size: 1.2em;
}

.rawExceptionBlock {
    border-top: 1px #ddd solid;
    border-bottom: 1px #ddd solid;
}

.showRawExceptionContainer {
    margin-top: 10px;
    margin-bottom: 10px;
}

.expandCollapseButton {
    cursor: pointer;
    float: left;
    height: 16px;
    width: 16px;
    font-size: 10px;
    position: absolute;
    left: 10px;
    background-color: #eee;
    padding: 0;
    border: 0;
    margin: 0;
}

        </style>
    </head>
    <body>
        <h1>An unhandled exception occurred while processing the request.</h1>
            <div class="titleerror">ExtendedSocketException: Device not configured</div>
                <p class="location">System.Net.Dns.InternalGetHostByName(string hostName)</p>
        <ul id="header">
            <li id="stack" tabindex="1" class="selected">
                Stack
            </li>
            <li id="query" tabindex="2">
                Query
            </li>
            <li id="cookies" tabindex="3">
                Cookies
            </li>
            <li id="headers" tabindex="4">
                Headers
            </li>
        </ul>

        <div id="stackpage" class="page">
            <ul>
                                    <li>
                        <h2 class="stackerror">ExtendedSocketException: Device not configured</h2>
                        <ul>
                            <li class="frame" id="frame1">
                                    <h3>System.Net.Dns.InternalGetHostByName(string hostName)</h3>

                            </li>
                            <li class="frame" id="frame2">
                                    <h3>System.Net.Dns.GetHostAddresses(string hostNameOrAddress)</h3>

                            </li>
                            <li class="frame" id="frame3">
                                    <h3>Covenant.Models.Listeners.Listener..ctor() in <code title="/Users/dhelton/github/Covenant/Covenant/Models/Listeners/Listener.cs">Listener.cs</code></h3>

                                    <button class="expandCollapseButton" data-frameId="frame3">+</button>
                                    <div class="source">
                                            <ol start="38" class="collapsible">
                                                    <li><span>        public int Id { get; set; }</span></li>
                                                    <li><span>        public string Name { get; set; } = GenerateName();</span></li>
                                                    <li><span>        public string Description { get; set; } = &quot;A generic listener.&quot;;</span></li>
                                                    <li><span></span></li>
                                                    <li><span>        public string BindAddress { get; set; } = &quot;0.0.0.0&quot;;</span></li>
                                                    <li><span>        public int BindPort { get; set; } = 80;</span></li>
                                            </ol>

                                        <ol start="44" class="highlight">
                                                <li><span>        public string ConnectAddress { get; set; } = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).FirstOrDefault(</span></li>
                                        </ol>

                                            <ol start='45' class="collapsible">
                                                    <li><span>            A =&gt; A.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).ToString();</span></li>
                                                    <li><span></span></li>
                                                    <li><span>        public int ProfileId { get; set; } = 1;</span></li>
                                                    <li><span>        public int ListenerTypeId { get; set; }</span></li>
                                                    <li><span>        public ListenerStatus Status { get; set; } = ListenerStatus.Uninitialized;</span></li>
                                                    <li><span>        public string CovenantToken { get; set; }</span></li>
                                            </ol>
                                    </div>
                            </li>
                            <li class="frame" id="frame4">
                                    <h3>Covenant.Models.Listeners.HttpListener..ctor() in <code title="/Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs">HttpListener.cs</code></h3>

                                    <button class="expandCollapseButton" data-frameId="frame4">+</button>
                                    <div class="source">
                                            <ol start="98" class="collapsible">
                                                    <li><span>                this.UseSSL = uri.Scheme == &quot;https&quot;;</span></li>
                                                    <li><span>                this.ConnectAddress = uri.Host;</span></li>
                                                    <li><span>                this.BindPort = uri.Port;</span></li>
                                                    <li><span>            }</span></li>
                                                    <li><span>        }</span></li>
                                                    <li><span></span></li>
                                            </ol>

                                        <ol start="104" class="highlight">
                                                <li><span>        public HttpListener()</span></li>
                                        </ol>

                                            <ol start='105' class="collapsible">
                                                    <li><span>        {</span></li>
                                                    <li><span>            this.Description = &quot;Listens on HTTP protocol.&quot;;</span></li>
                                                    <li><span>        }</span></li>
                                                    <li><span></span></li>
                                                    <li><span>        public HttpListener(int ListenerTypeId, int ProfileId) : this()</span></li>
                                                    <li><span>        {</span></li>
                                            </ol>
                                    </div>
                            </li>
                            <li class="frame" id="frame5">
                                    <h3>lambda_method(Closure )</h3>

                            </li>
                            <li class="frame" id="frame6">
                                    <h3>Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, string id, out bool createdFromNonDefaultCreator) in <code title="/_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs">JsonSerializerInternalReader.cs</code></h3>

                            </li>
                            <li class="frame" id="frame7">
                                    <h3>Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue) in <code title="/_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs">JsonSerializerInternalReader.cs</code></h3>

                            </li>
                            <li class="frame" id="frame8">
                                    <h3>Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent) in <code title="/_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs">JsonSerializerInternalReader.cs</code></h3>

                            </li>
                            <li class="frame" id="frame9">
                                    <h3>Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)</h3>

                            </li>
                            <li class="frame" id="frame10">
                                    <h3>Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)</h3>

                            </li>
                            <li class="frame" id="frame11">
                                    <h3>Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, object value)</h3>

                            </li>
                            <li class="frame" id="frame12">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider&#x2B;&lt;&gt;c__DisplayClass0_0&#x2B;&lt;&lt;CreateBinderDelegate&gt;g__Bind|0&gt;d.MoveNext()</h3>

                            </li>
                            <li class="frame" id="frame13">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()</h3>

                            </li>
                            <li class="frame" id="frame14">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()</h3>

                            </li>
                            <li class="frame" id="frame15">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)</h3>

                            </li>
                            <li class="frame" id="frame16">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)</h3>

                            </li>
                            <li class="frame" id="frame17">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()</h3>

                            </li>
                            <li class="frame" id="frame18">
                                    <h3>Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()</h3>

                            </li>
                            <li class="frame" id="frame19">
                                    <h3>Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)</h3>

                            </li>
                            <li class="frame" id="frame20">
                                    <h3>Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)</h3>

                            </li>
                            <li class="frame" id="frame21">
                                    <h3>Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)</h3>

                            </li>
                            <li class="frame" id="frame22">
                                    <h3>Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)</h3>

                            </li>
                            <li class="frame" id="frame23">
                                    <h3>Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)</h3>

                            </li>
                        </ul>
                    </li>
                    <li>
                        <br/>
                        <div class="rawExceptionBlock">
                            <div class="showRawExceptionContainer">
                                <button class="showRawException" data-exceptionDetailId="exceptionDetail1">Show raw exception details</button>
                            </div>
                            <div id="exceptionDetail1" class="rawExceptionDetails">
                                <pre class="rawExceptionStackTrace">System.Net.Internals.SocketExceptionFactory&#x2B;ExtendedSocketException (00000005, 6): Device not configured&#xA;   at System.Net.Dns.InternalGetHostByName(String hostName)&#xA;   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)&#xA;   at Covenant.Models.Listeners.Listener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/Listener.cs:line 44&#xA;   at Covenant.Models.Listeners.HttpListener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs:line 104&#xA;   at lambda_method(Closure )&#xA;   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean&amp; createdFromNonDefaultCreator) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2273&#xA;   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 476&#xA;   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 167&#xA;--- End of stack trace from previous location where exception was thrown ---&#xA;   at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)&#xA;   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)&#xA;   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.&lt;&gt;c__DisplayClass0_0.&lt;&lt;CreateBinderDelegate&gt;g__Bind|0&gt;d.MoveNext()&#xA;--- End of stack trace from previous location where exception was thrown ---&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State&amp; next, Scope&amp; scope, Object&amp; state, Boolean&amp; isCompleted)&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()&#xA;   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()&#xA;   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)&#xA;   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)&#xA;   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)&#xA;   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)&#xA;   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)</pre>
                            </div>
                        </div>
                    </li>
            </ul>
        </div>

        <div id="querypage" class="page">
                <p>No QueryString data.</p>
        </div>

        <div id="cookiespage" class="page">
                <table>
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>Value</th>
                        </tr>
                    </thead>
                    <tbody>
                            <tr>
                                <td>.AspNetCore.Identity.Application</td>
                                <td>CfDJ8NVTXBZhJ7VLhxJmB3vDw8RV1mCaSnmwQi1rMxpEiC1ckrKgNGuJJ2mHq4QwsCvx6FM1vmmdDQB2wHBBncQ34uWxOlOubbMtaLzW4_KdNA9CCB2ygJbdoUYDK2QmNP3PaGj3QAtmUO3PC83SrS80Qn89QTFi5SYZ7Ay8S0wdNWttP_XNW1QN1J7MTfiZ6fEbgUNr_VFu_pzNVd1WduhcCU18O5-ES54wlnPh0OKoEM_msY7Q23g6jdDwCXTB3kaSgfUrAMhsTC_n_35ICG6PVTX19bScGyXih3rAUwlK3842B1uf9dhCsQIDBZF9_ffA1fhnNv1Qm81n3lihjt2ExwAaQnxYnFbPmgRLRdDx_TtNMjOdTwJEzh8Jyengb2bmu5VwhkJ_6RmoKUs98W1t_XIcYOLtFsCiMOWzWsJqglmrUnexfpcH9gvFyPcQ3iZNgNmE5TShZtUJD7eu0hpsZR5SJl1LM9KBxm1wRBmOvfCgZcOzFDJaRSTspb2rIiTmYXGgll7KCpwUy0oowrPtE7EPlCZ96cO6ezfhvVKy5yTOTEejrPBsUe3eFdmMxNgJmqR8lYRsOHegJ7mxGzSR1LiHk6O8p9cLgIs1F0n4-2uw0moRGQEacnG07AKDYIc_K6XR2a9bz5Ny_Of6_UITvbnzVnRoyo5yQA8ZWcz9Fq0YS4fZeaLh7oztc_6BueUp4xaxQF3UFDY-l0rZoty0-r-FNQydewD5eVEvOIxl1jaYnNFuQfvMfwCLkPsttY_CPbty_lFFrXLT_uQA7DNTuZ0</td>
                            </tr>
                    </tbody>
                </table>
        </div>
        <div id="headerspage" class="page">
                <table>
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>Value</th>
                        </tr>
                    </thead>
                    <tbody>
                                <tr>
                                    <td>Authorization</td>
                                    <td>Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkYW4iLCJqdGkiOiJiMjI3ZTNjOS01MjRiLWI4ZTEtYWVlYi1iNzdjNjA3YmU2NTUiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6ImFhOGQ1NDAxLWQ1ZjgtNDExMS1hMjAwLWQ4MmJlN2IxMDc1YyIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6WyJVc2VyIiwiQWRtaW5pc3RyYXRvciJdLCJleHAiOjE1NzE5NTM2MDAsImlzcyI6IkNvdmVuYW50IiwiYXVkIjoiQ292ZW5hbnQifQ.w__FCcCtwYK768EG8A0pRAkMPiJkG2V2ZPuPUblkAIo</td>
                                </tr>
                                <tr>
                                    <td>Content-Length</td>
                                    <td>2</td>
                                </tr>
                                <tr>
                                    <td>Content-Type</td>
                                    <td>application/json-patch&#x2B;json; charset=utf-8</td>
                                </tr>
                                <tr>
                                    <td>Cookie</td>
                                    <td>.AspNetCore.Identity.Application=CfDJ8NVTXBZhJ7VLhxJmB3vDw8RV1mCaSnmwQi1rMxpEiC1ckrKgNGuJJ2mHq4QwsCvx6FM1vmmdDQB2wHBBncQ34uWxOlOubbMtaLzW4_KdNA9CCB2ygJbdoUYDK2QmNP3PaGj3QAtmUO3PC83SrS80Qn89QTFi5SYZ7Ay8S0wdNWttP_XNW1QN1J7MTfiZ6fEbgUNr_VFu_pzNVd1WduhcCU18O5-ES54wlnPh0OKoEM_msY7Q23g6jdDwCXTB3kaSgfUrAMhsTC_n_35ICG6PVTX19bScGyXih3rAUwlK3842B1uf9dhCsQIDBZF9_ffA1fhnNv1Qm81n3lihjt2ExwAaQnxYnFbPmgRLRdDx_TtNMjOdTwJEzh8Jyengb2bmu5VwhkJ_6RmoKUs98W1t_XIcYOLtFsCiMOWzWsJqglmrUnexfpcH9gvFyPcQ3iZNgNmE5TShZtUJD7eu0hpsZR5SJl1LM9KBxm1wRBmOvfCgZcOzFDJaRSTspb2rIiTmYXGgll7KCpwUy0oowrPtE7EPlCZ96cO6ezfhvVKy5yTOTEejrPBsUe3eFdmMxNgJmqR8lYRsOHegJ7mxGzSR1LiHk6O8p9cLgIs1F0n4-2uw0moRGQEacnG07AKDYIc_K6XR2a9bz5Ny_Of6_UITvbnzVnRoyo5yQA8ZWcz9Fq0YS4fZeaLh7oztc_6BueUp4xaxQF3UFDY-l0rZoty0-r-FNQydewD5eVEvOIxl1jaYnNFuQfvMfwCLkPsttY_CPbty_lFFrXLT_uQA7DNTuZ0</td>
                                </tr>
                                <tr>
                                    <td>Host</td>
                                    <td>localhost:7443</td>
                                </tr>
                                <tr>
                                    <td>User-Agent</td>
                                    <td>FxVersion/4.6.27817.03 Covenant.API.CovenantAPI/1.0.0.0</td>
                                </tr>
                    </tbody>
                </table>
        </div>
        <script>
            //<!--
            (function (window, undefined) {
    "use strict";

    function ns(selector, element) {
        return new NodeCollection(selector, element);
    }

    function NodeCollection(selector, element) {
        this.items = [];
        element = element || window.document;

        var nodeList;

        if (typeof (selector) === "string") {
            nodeList = element.querySelectorAll(selector);
            for (var i = 0, l = nodeList.length; i < l; i++) {
                this.items.push(nodeList.item(i));
            }
        }
    }

    NodeCollection.prototype = {
        each: function (callback) {
            for (var i = 0, l = this.items.length; i < l; i++) {
                callback(this.items[i], i);
            }
            return this;
        },

        children: function (selector) {
            var children = [];

            this.each(function (el) {
                children = children.concat(ns(selector, el).items);
            });

            return ns(children);
        },

        hide: function () {
            this.each(function (el) {
                el.style.display = "none";
            });

            return this;
        },

        toggle: function () {
            this.each(function (el) {
                el.style.display = el.style.display === "none" ? "" : "none";
            });

            return this;
        },

        show: function () {
            this.each(function (el) {
                el.style.display = "";
            });

            return this;
        },

        addClass: function (className) {
            this.each(function (el) {
                var existingClassName = el.className,
                    classNames;
                if (!existingClassName) {
                    el.className = className;
                } else {
                    classNames = existingClassName.split(" ");
                    if (classNames.indexOf(className) < 0) {
                        el.className = existingClassName + " " + className;
                    }
                }
            });

            return this;
        },

        removeClass: function (className) {
            this.each(function (el) {
                var existingClassName = el.className,
                    classNames, index;
                if (existingClassName === className) {
                    el.className = "";
                } else if (existingClassName) {
                    classNames = existingClassName.split(" ");
                    index = classNames.indexOf(className);
                    if (index > 0) {
                        classNames.splice(index, 1);
                        el.className = classNames.join(" ");
                    }
                }
            });

            return this;
        },

        attr: function (name) {
            if (this.items.length === 0) {
                return null;
            }

            return this.items[0].getAttribute(name);
        },

        on: function (eventName, handler) {
            this.each(function (el, idx) {
                var callback = function (e) {
                    e = e || window.event;
                    if (!e.which && e.keyCode) {
                        e.which = e.keyCode; // Normalize IE8 key events
                    }
                    handler.apply(el, [e]);
                };

                if (el.addEventListener) { // DOM Events
                    el.addEventListener(eventName, callback, false);
                } else if (el.attachEvent) { // IE8 events
                    el.attachEvent("on" + eventName, callback);
                } else {
                    el["on" + type] = callback;
                }
            });

            return this;
        },

        click: function (handler) {
            return this.on("click", handler);
        },

        keypress: function (handler) {
            return this.on("keypress", handler);
        }
    };

    function frame(el) {
        ns(".source .collapsible", el).toggle();
    }

    function expandCollapseButton(el) {
        var frameId = el.getAttribute("data-frameId");
        frame(document.getElementById(frameId));
        if (el.innerText === "+") {
            el.innerText = "-";
        }
        else {
            el.innerText = "+";
        }
    }

    function tab(el) {
        var unselected = ns("#header .selected").removeClass("selected").attr("id");
        var selected = ns("#" + el.id).addClass("selected").attr("id");

        ns("#" + unselected + "page").hide();
        ns("#" + selected + "page").show();
    }

    ns(".rawExceptionDetails").hide();
    ns(".collapsible").hide();
    ns(".page").hide();
    ns("#stackpage").show();

    ns(".expandCollapseButton")
        .click(function () {
            expandCollapseButton(this);
        })
        .keypress(function (e) {
            if (e.which === 13) {
                expandCollapseButton(this);
            }
        });

    ns("#header li")
        .click(function () {
            tab(this);
        })
        .keypress(function (e) {
            if (e.which === 13) {
                tab(this);
            }
        });

    ns(".showRawException")
        .click(function () {
            var exceptionDetailId = this.getAttribute("data-exceptionDetailId");
            ns("#" + exceptionDetailId).toggle();
        });
})(window);
            //-->
        </script>
    </body>
</html>

[!] EliteMenu Exception: Object reference not set to an instance of an object.
   at Elite.Menu.Listeners.HTTPListenerMenuItem.Refresh() in /Users/dhelton/github/Elite/Elite/Menu/Listeners/HTTPListenerMenuItem.cs:line 291
   at Elite.Menu.Listeners.HTTPListenerMenuItem.ValidateMenuParameters(String[] parameters, Boolean forwardEntrance) in /Users/dhelton/github/Elite/Elite/Menu/Listeners/HTTPListenerMenuItem.cs:line 283
   at Elite.Menu.MenuItem.GetMenuOption(String UserInput) in /Users/dhelton/github/Elite/Elite/Menu/MenuItem.cs:line 178
   at Elite.Menu.EliteMenu.PrintMenu(String UserInput) in /Users/dhelton/github/Elite/Elite/Menu/EliteMenu.cs:line 88
(Covenant: Listeners) >

Over in the Covenant console, I get the following error message:

warn: Microsoft.EntityFrameworkCore.Query[20500]
      The LINQ expression 'where (([E].Time.CompareTo(__start_0) >= 0) AndAlso ([E].Time.CompareTo(__end_1) <= 0))' could not be translated and will be evaluated locally.
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 6): Device not configured
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
   at Covenant.Models.Listeners.Listener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/Listener.cs:line 44
   at Covenant.Models.Listeners.HttpListener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs:line 104
   at lambda_method(Closure )
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2273
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 476
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 167
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 6): Device not configured
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
   at Covenant.Models.Listeners.Listener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/Listener.cs:line 44
   at Covenant.Models.Listeners.HttpListener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs:line 104
   at lambda_method(Closure )
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2273
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 476
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 167
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 6): Device not configured
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
   at Covenant.Models.Listeners.Listener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/Listener.cs:line 44
   at Covenant.Models.Listeners.HttpListener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs:line 104
   at lambda_method(Closure )
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2273
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 476
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 167
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 6): Device not configured
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
   at Covenant.Models.Listeners.Listener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/Listener.cs:line 44
   at Covenant.Models.Listeners.HttpListener..ctor() in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs:line 104
   at lambda_method(Closure )
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2273
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 476
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 167
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
   at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
   at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
cobbr commented 5 years ago

@nccdhelton Confirmed as a bug. I've seen this happen a couple of times. Will be addressed in the next release, if you need a workaround, you can remove = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).FirstOrDefault( A => A.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).ToString(); from line 44 of Listener.cs. You'll then have to set ConnectAddress manually in the HTTP menu.

nccdhelton commented 5 years ago

What exactly should I set the ConnectAddress variable to in Covenant/Covenant/Models/Listeners/Listener.cs? I tried the following (just commenting out that part and leaving the variable unset)...

public string ConnectAddress /**{ get; set; } System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).FirstOrDefault(
    A => A.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).ToString()**/;

And now Covenant spits a ton of these invalid URI errors whenever I connect with Elite

fail: Microsoft.EntityFrameworkCore.Query[10100]
      An exception occurred while iterating over the results of a query for context type 'Covenant.Models.CovenantContext'.
      System.UriFormatException: Invalid URI: The hostname could not be parsed.
         at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
         at System.Uri..ctor(String uriString)
         at Covenant.Models.Listeners.HttpListener.set_Url(String value) in /Users/dhelton/github/Covenant/Covenant/Models/Listeners/HttpListener.cs:line 97
         at lambda_method(Closure , MaterializationContext )
         at Microsoft.EntityFrameworkCore.Query.EntityLoadInfo.Materialize()
         at Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.GetEntity(IKey key, EntityLoadInfo entityLoadInfo, Boolean queryStateManager, Boolean throwOnNullKey)
         ...........etc etc etc
nccdhelton commented 5 years ago

I also tried setting it to a blank string ("") or the Covenant server's IP ("192.1.1.10" for example), and same result: tons of error messages at various points and I can't get into the HTTP menu

cobbr commented 5 years ago

@nccdhelton Remove just the part I mentioned and leave: public string ConnectAddress { get; set; }

cobbr commented 5 years ago

This should now be fixed on the Covenant project.