Skip to content

Commit

Permalink
Fix URI handling
Browse files Browse the repository at this point in the history
  • Loading branch information
riskydissonance committed Mar 22, 2022
1 parent ee256c6 commit 208226d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 2 additions & 3 deletions SharpSocksServer/HttpServer/HttpServerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ public void StartHttp()

var app = builder.Build();

app.MapGet("{uri:regex(/*)}", _requestHandler.HandleRequest);
app.MapPost("{uri:regex(/*)}", _requestHandler.HandleRequest);
app.MapGet("{**url}", _requestHandler.HandleRequest);
app.MapPost("{**url}", _requestHandler.HandleRequest);
app.Run(Config.HttpServerURI);
Logger.LogMessage($"C2 HTTP processor listening on {Config.HttpServerURI}");
}

private X509Certificate2 GetDefaultSelfSignedCertFromResource()
Expand Down
6 changes: 0 additions & 6 deletions SharpSocksServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ private static void Main(string[] args)
Console.WriteLine("[*] Initialised");
serverController.StartSocks();
httpServerController.StartHttp();

logger.LogImportantMessage("Press x to quit");

while ("x" != Console.ReadLine())
{
}
}
catch (Exception e)
{
Expand Down

0 comments on commit 208226d

Please sign in to comment.