-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
148 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package edu.vt.rhids; | ||
|
||
import edu.vt.rhids.main.RHIDS; | ||
import edu.vt.rhids.util.Logger; | ||
|
||
public class Main { | ||
|
||
public static final RHIDS rhids = RHIDS.getInstance(); | ||
|
||
public static void main(String[] args) { | ||
Logger.log(rhids.run(args), Logger.Verbosity.NONE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,33 @@ | ||
package edu.vt.rhids.input; | ||
|
||
import edu.vt.rhids.Main; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
|
||
import edu.vt.rhids.main.RHIDS; | ||
|
||
/** | ||
* Bag of System Calls | ||
* | ||
* @author AmrAbed | ||
* | ||
* @author AmrAbed | ||
*/ | ||
public class BoSC extends ArrayList<Byte> | ||
{ | ||
public class BoSC extends ArrayList<Byte> { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public BoSC(Window window) | ||
{ | ||
super(Collections.nCopies(RHIDS.indexMap.size() + 1, (byte) 0)); | ||
for (String syscall : window) | ||
{ | ||
int index = RHIDS.indexMap.get(syscall); | ||
BoSC(Window window) { | ||
super(Collections.nCopies(Main.rhids.getIndexMap().size() + 1, (byte) 0)); | ||
for (String syscall : window) { | ||
int index = Main.rhids.getIndexMap().get(syscall); | ||
Byte count = get(index); | ||
set(index, ++count); | ||
} | ||
} | ||
|
||
public BoSC(String string) | ||
{ | ||
public BoSC(String string) { | ||
string = string.replace("[", ""); | ||
string = string.replace("]", ""); | ||
|
||
for (String value : string.split(",")) | ||
{ | ||
for (String value : string.split(",")) { | ||
add(Byte.parseByte(value.trim())); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.