Skip to content

Commit

Permalink
Fetch, preserves previous type attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
veniware committed Aug 17, 2024
1 parent 94298ef commit 096cfe8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Protest/Workers/Fetch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ public static ConcurrentDictionary<string, string[]> SingleDevice(string target,

Thread tWmi = null, tAd = null, tPortScan = null;

if (useWmi && !OperatingSystem.IsWindows()) {
if (useWmi) {
tWmi = new Thread(() => {
if (!OperatingSystem.IsWindows()) { return; }
wmi = Protocols.Wmi.WmiFetch(target);

if (wmi.TryGetValue("owner", out string owner)) {
Expand All @@ -169,8 +170,9 @@ public static ConcurrentDictionary<string, string[]> SingleDevice(string target,
});
}

if (useKerberos && !OperatingSystem.IsWindows()) {
if (useKerberos) {
tAd = new Thread(() => {
if (!OperatingSystem.IsWindows()) { return; }
if (hostname is null) { return; }

SearchResult result = Protocols.Kerberos.GetWorkstation(hostname);
Expand Down

0 comments on commit 096cfe8

Please sign in to comment.