C3 icon indicating copy to clipboard operation
C3 copied to clipboard

new covenant /api/listeners/bridge api

Open TheKevinWang opened this issue 4 years ago • 2 comments

The "/listener/createbridge" api endpoint has been replaced with "/api/listeners/bridge" in https://github.com/cobbr/Covenant/commit/259657103ca92c68f177350f64808e58c480a2f1

TheKevinWang avatar Jul 15 '20 02:07 TheKevinWang

Oh! I ran into the same problem and made a similar fix. One thing I would add is that even with this fix, I was not able to run AddPeripheralGrunt.

"GeneratePayload" uses the base64ILByteString returned by the Covenant API.

In the current Covenant, Base64ILByteString is no longer included in the json response.

  • Covenant/Models/Launchers/Launcher.cs
[NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore]
        public string Base64ILByteString
        {
            get
            {
                try
                {
                    return Convert.ToBase64String(System.IO.File.ReadAllBytes(Common.CovenantLauncherDirectory + Name));
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                System.IO.File.WriteAllBytes(Common.CovenantLauncherDirectory + Name, Convert.FromBase64String(value)); 
            }
        }

Therefore, in order to run AddPeripheralGrunt, I had to remove the JsonIgnore description.

[NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore] ↓ [NotMapped]

shutingrz avatar Jul 19 '20 15:07 shutingrz

Cobbr will probably roll out a new api for that - so keep your eyes open for the changes

smntx avatar Mar 02 '21 18:03 smntx