Skip to content

Commit 3b75a00

Browse files
committed
restructured mfs library, divided into api and impl packages
1 parent c4a116c commit 3b75a00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+449
-162
lines changed

msf/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'java'
22

33
dependencies {
44
compile fileTree(dir: 'libs', include: ['*.jar'])
5-
compile 'junit:junit:4.12'
5+
testCompile 'junit:junit:4.12'
66
compile 'commons-io:commons-io:2.4'
77
compile 'org.apache.commons:commons-lang3:3.4'
88
}

msf/src/main/java/org/csploit/msf/arch/Arch.java renamed to msf/src/main/java/org/csploit/msf/api/Arch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.csploit.msf.arch;
1+
package org.csploit.msf.api;
22

33
/**
44
* Machines architectures
@@ -28,5 +28,5 @@ public enum Arch {
2828
DALVIK,
2929
PYTHON,
3030
NODEJS,
31-
FIREFOX;
31+
FIREFOX
3232
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.csploit.msf.api;
2+
3+
/**
4+
* Represent an author
5+
*/
6+
public interface Author {
7+
String getName();
8+
String getEmail();
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.csploit.msf.api;
2+
3+
/**
4+
* The auxiliary class acts as a base class for all modules that perform
5+
* reconnaissance, retrieve data, brute force logins, or any other action
6+
* that doesn't fit our concept of an 'exploit' (involving payloads and
7+
* targets and whatnot).
8+
*/
9+
public interface Auxiliary extends Module {
10+
}

msf/src/main/java/org/csploit/msf/Customizable.java renamed to msf/src/main/java/org/csploit/msf/api/Customizable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
package org.csploit.msf;
1+
package org.csploit.msf.api;
2+
3+
import org.csploit.msf.impl.Option;
24

35
import java.util.Collection;
46

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.csploit.msf.api;
2+
3+
import org.csploit.msf.api.module.Target;
4+
5+
/**
6+
* Represent an exploit module
7+
*/
8+
public interface Exploit extends Module {
9+
Target[] getTargets();
10+
Target getTarget();
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.csploit.msf.api;
2+
3+
import java.util.List;
4+
5+
/**
6+
* A Metasploit Framework interface
7+
*/
8+
public interface Framework {
9+
List<? extends Session> getSessions();
10+
List<? extends Job> getJobs();
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.csploit.msf.api;
2+
3+
import java.util.Date;
4+
5+
/**
6+
* This class is the representation of an abstract job.
7+
*/
8+
public interface Job {
9+
int getId();
10+
String getName();
11+
Date getStartTime();
12+
void stop();
13+
}

msf/src/main/java/org/csploit/msf/License.java renamed to msf/src/main/java/org/csploit/msf/api/License.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.csploit.msf;
1+
package org.csploit.msf.api;
22

33
/**
44
* A license
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.csploit.msf.api;
2+
3+
/**
4+
* Represent a module of the MSF
5+
*/
6+
public interface Module {
7+
8+
String getRefname();
9+
void setRefname(String refname);
10+
11+
String getFullName();
12+
String getShortName();
13+
}

0 commit comments

Comments
 (0)