Merge branch 'master' of https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite
This commit is contained in:
commit
f83cf6706d
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Management;
|
using System.Management;
|
||||||
@ -2278,6 +2278,21 @@ namespace winPEAS
|
|||||||
bool check_bi = false;
|
bool check_bi = false;
|
||||||
bool check_if = false;
|
bool check_if = false;
|
||||||
bool wait = false;
|
bool wait = false;
|
||||||
|
FileStream ostrm;
|
||||||
|
StreamWriter writer;
|
||||||
|
TextWriter oldOut = Console.Out;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ostrm = new FileStream("./out.txt", FileMode.OpenOrCreate, FileAccess.Write);
|
||||||
|
writer = new StreamWriter(ostrm);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Cannot open out.txt for writing");
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (string arg in args)
|
foreach (string arg in args)
|
||||||
{
|
{
|
||||||
if (string.Equals(arg, "cmd", StringComparison.CurrentCultureIgnoreCase))
|
if (string.Equals(arg, "cmd", StringComparison.CurrentCultureIgnoreCase))
|
||||||
@ -2289,6 +2304,12 @@ namespace winPEAS
|
|||||||
if (string.Equals(arg, "quiet", StringComparison.CurrentCultureIgnoreCase))
|
if (string.Equals(arg, "quiet", StringComparison.CurrentCultureIgnoreCase))
|
||||||
banner = false;
|
banner = false;
|
||||||
|
|
||||||
|
if (string.Equals(arg, "log", StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
Console.SetOut(writer);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (string.Equals(arg, "searchslow", StringComparison.CurrentCultureIgnoreCase))
|
if (string.Equals(arg, "searchslow", StringComparison.CurrentCultureIgnoreCase))
|
||||||
search_fast = false;
|
search_fast = false;
|
||||||
|
|
||||||
@ -2436,7 +2457,9 @@ namespace winPEAS
|
|||||||
if (check_if || check_all)
|
if (check_if || check_all)
|
||||||
PrintInterestingFiles();
|
PrintInterestingFiles();
|
||||||
|
|
||||||
|
Console.SetOut(oldOut);
|
||||||
|
writer.Close();
|
||||||
|
ostrm.Close();
|
||||||
/*
|
/*
|
||||||
* Keylogger?
|
* Keylogger?
|
||||||
* Input prompt ==> Better in PS
|
* Input prompt ==> Better in PS
|
||||||
@ -2447,5 +2470,3 @@ namespace winPEAS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user