Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provides some much needed TLC #237

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.idea/
*.class
*.log
*.ctxt
.mtj.tmp/
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
hs_err_pid*
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msix
*.msm
*.msp
*.lnk
.gradle
**/build/
!src/**/build/
gradle-app.setting
!gradle-wrapper.jar
.gradletasknamecache
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*
release/
45 changes: 45 additions & 0 deletions armitage/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
plugins {
id 'java'
}

group 'armitage'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenCentral()
}

jar {
manifest {
attributes 'Main-Class': 'armitage.ArmitageMain'
}
from {
configurations.compileClasspath.filter { it.exists() }.collect { it.isDirectory() ? it : zipTree(it) }
}
archiveName 'armitage.jar'
}

dependencies {
implementation files('../lib/sleep.jar', '../lib/jgraphx.jar')

implementation group: 'org.javassist', name: 'javassist', version: '3.28.0-GA'
implementation group: 'org.postgresql', name: 'postgresql', version: '9.4.1212'
implementation group: 'org.msgpack', name: 'msgpack', version: '0.6.12'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}

test {
useJUnitPlatform()
}

task copyJar(type: Copy) {
from jar
into "../build"
}

assemble.finalizedBy(copyJar)
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package armitage;

import javax.swing.*;
import javax.swing.event.*;
import java.awt.image.*;

import java.awt.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package armitage;

import cortana.core.EventManager;
import cortana.core.FilterManager;
import sleep.runtime.*;
import sleep.interfaces.*;
import sleep.console.*;
import sleep.bridges.*;
import sleep.error.*;
import sleep.engine.*;
Expand All @@ -11,7 +12,6 @@
import java.util.*;
import java.io.*;

import cortana.core.*;
import ui.*;

/**
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

import armitage.GenericTabCompletion;
import console.Console;
import msf.*;

import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/* A generic class to manage reading/writing to a console. Keeps the code simpler (although the Sleep code to do this is
simpler than this Java code. *sigh* */
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

import cortana.core.*;

import armitage.ArmitageTimerClient;
import armitage.ArmitageTimer;

import graph.Route;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import msf.*;

public class Credentials extends ManagedData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

import cortana.core.*;

import armitage.ArmitageTimerClient;
import armitage.ArmitageTimer;

import graph.Route;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import msf.*;

public class Hosts extends ManagedData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

import cortana.core.*;

import armitage.ArmitageTimerClient;
import armitage.ArmitageTimer;

import graph.Route;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import msf.*;

public class Loots extends ManagedData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@

import cortana.core.*;

import armitage.ArmitageTimerClient;
import armitage.ArmitageTimer;

import graph.Route;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import msf.*;

public class Routes extends ManagedData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

import cortana.core.*;

import armitage.ArmitageTimerClient;
import armitage.ArmitageTimer;

import graph.Route;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import msf.*;

public class Services extends ManagedData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

import cortana.core.*;

import armitage.ArmitageTimerClient;
import armitage.ArmitageTimer;

import graph.Route;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import msf.*;

public class Sessions extends ManagedData {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package cortana.gui;

import cortana.core.*;
import msf.*;
import armitage.*;
import ui.*;

Expand All @@ -10,14 +8,11 @@
import sleep.runtime.*;
import sleep.engine.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import java.util.*;

import java.io.IOException;

/* an API to bind new menus in Armitage */
public class MenuBridge implements Loadable, Function, Environment {
protected ArmitageApplication armitage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
package cortana.gui;

import cortana.core.*;
import msf.*;
import armitage.*;
import ui.*;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

import java.io.IOException;

/* an API to bind new menus in Armitage */
public class MenuBuilder {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package cortana.gui;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.event.*;

import sleep.runtime.*;
import sleep.engine.*;
import sleep.bridges.*;

import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import sleep.runtime.*;
import sleep.bridges.*;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
package cortana.gui;

import cortana.core.*;
import msf.*;
import armitage.*;
import ui.*;

import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import java.util.*;

import java.io.IOException;

/* some methods to help out with user interface stuff */
public class UIBridge implements Loadable, Function {
protected ArmitageApplication armitage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@
import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

import javax.swing.*;

public class ConsoleBridge implements Loadable, Function, ConsoleQueue.ConsoleCallback {
protected EventManager events;
protected FilterManager filters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
import sleep.bridges.*;
import sleep.interfaces.*;
import sleep.runtime.*;
import sleep.engine.*;

import java.util.*;

import java.io.IOException;

/* add an API for interfacing with the event log... */
public class EventLogBridge implements Loadable, Function, ConsoleCallback {
protected EventManager events;
Expand Down
Loading