diff --git a/src/Dockerfile-linux-client b/src/Dockerfile-linux-client index c2244e35..ee72d94d 100755 --- a/src/Dockerfile-linux-client +++ b/src/Dockerfile-linux-client @@ -21,16 +21,18 @@ RUN apk add --no-cache \ busybox-extras \ nikto \ openssh-client \ - python3 && \ + python3 \ + iproute2 \ + ethtool && \ wget 'https://github.com/sqlmapproject/sqlmap/tarball/master' -O sqlmap.tar.gz && \ mkdir sqlmap && \ tar -xvf sqlmap.tar.gz -C sqlmap && \ rm sqlmap.tar.gz COPY --from=dev /app/ghosts.client.linux/out ./app -WORKDIR /app/ +WORKDIR /app/ ENV ASPNETCORE_URLS=http://+:5000 EXPOSE 5000/tcp -CMD ["dotnet", "./ghosts.client.linux.dll"] \ No newline at end of file +CMD ["dotnet", "./ghosts.client.linux.dll"] diff --git a/src/ghosts.client.linux/Comms/CheckId.cs b/src/ghosts.client.linux/Comms/CheckId.cs index 966ce8b5..d1545a90 100644 --- a/src/ghosts.client.linux/Comms/CheckId.cs +++ b/src/ghosts.client.linux/Comms/CheckId.cs @@ -74,7 +74,7 @@ public string Id private string Run() { // Ignore all certs - ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; + ServicePointManager.ServerCertificateValidationCallback += (_, _, _, _) => true; var s = string.Empty; diff --git a/src/ghosts.client.linux/Handlers/SharepointHelper.cs b/src/ghosts.client.linux/Handlers/SharepointHelper.cs index 135fb3c0..7a5e61c0 100644 --- a/src/ghosts.client.linux/Handlers/SharepointHelper.cs +++ b/src/ghosts.client.linux/Handlers/SharepointHelper.cs @@ -636,9 +636,6 @@ public void Execute(TimelineHandler handler, TimelineEvent timelineEvent) header = "http://"; //default header } - - - if (credentialKey == null) { Log.Trace($"Sharepoint:: The command args must specify a 'credentialKey:' , sharepoint browser action will not be executed."); diff --git a/src/ghosts.client.linux/Infrastructure/WebClientHeaders.cs b/src/ghosts.client.linux/Infrastructure/WebClientHeaders.cs index 46c29814..d25262ed 100644 --- a/src/ghosts.client.linux/Infrastructure/WebClientHeaders.cs +++ b/src/ghosts.client.linux/Infrastructure/WebClientHeaders.cs @@ -4,6 +4,9 @@ using System.Net; using Ghosts.Domain; using Ghosts.Domain.Code; +using Newtonsoft.Json; +using NLog; +using NLog.Fluent; namespace ghosts.client.linux.Infrastructure { @@ -12,6 +15,8 @@ namespace ghosts.client.linux.Infrastructure /// public static class WebClientBuilder { + public static readonly Logger _log = LogManager.GetCurrentClassLogger(); + public static WebClient Build(ResultMachine machine, bool useId = true) { var client = new WebClient(); @@ -47,6 +52,8 @@ public static IDictionary GetHeaders(ResultMachine machine, bool dict.Add("ghosts-user", username); dict.Add("ghosts-version", ApplicationDetails.Version); + _log.Trace($"Webrequest headers generated: {JsonConvert.SerializeObject(dict)}"); + return dict; } } diff --git a/src/ghosts.client.linux/config/application.json b/src/ghosts.client.linux/config/application.json index a16f6505..4289e69c 100755 --- a/src/ghosts.client.linux/config/application.json +++ b/src/ghosts.client.linux/config/application.json @@ -1,7 +1,7 @@ { - "ApiRootUrl": "http://localhost:5000/api", + "ApiRootUrl": "http://ghosts-api:5000/api", "Sockets": { - "IsEnabled": true, + "IsEnabled": false, "Heartbeat": 50000 }, "Id": { @@ -110,4 +110,4 @@ "gaza": "", "korea": "" } -} \ No newline at end of file +} diff --git a/src/ghosts.client.linux/nlog.config b/src/ghosts.client.linux/nlog.config index 3aa03364..c7e90672 100644 --- a/src/ghosts.client.linux/nlog.config +++ b/src/ghosts.client.linux/nlog.config @@ -8,6 +8,7 @@ + @@ -19,5 +20,6 @@ + - \ No newline at end of file +