mirror of
https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
synced 2025-12-06 17:11:29 +00:00
Compare commits
1 Commits
codex/modi
...
codex/fix-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e556fd594 |
@@ -97,7 +97,7 @@ class LinpeasBuilder:
|
||||
for orig_url in urls:
|
||||
tar_gz_bin_name = ""
|
||||
if ",,," in orig_url:
|
||||
tar_gz_bin_name = url.split(",,,")[1]
|
||||
tar_gz_bin_name = orig_url.split(",,,")[1]
|
||||
url = orig_url.split(",,,")[0]
|
||||
else:
|
||||
url = orig_url
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace winPEAS.Tests
|
||||
{
|
||||
@@ -26,28 +25,17 @@ namespace winPEAS.Tests
|
||||
[TestMethod]
|
||||
public void ShouldDisplayHelp()
|
||||
{
|
||||
var originalOut = Console.Out;
|
||||
var sw = new StringWriter();
|
||||
try
|
||||
{
|
||||
Console.SetOut(sw);
|
||||
string[] args = new string[] {
|
||||
"help",
|
||||
};
|
||||
Program.Main(args);
|
||||
|
||||
string output = sw.ToString();
|
||||
Assert.IsTrue(output.Contains("WinPEAS is a binary"),
|
||||
"Help output did not contain expected text.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail($"Exception thrown: {e.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
Console.SetOut(originalOut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user