Skip to content

Commit

Permalink
Removed unnecessary binaries (busybox, nflog, run_pie)
Browse files Browse the repository at this point in the history
  • Loading branch information
irinil committed Aug 14, 2020
1 parent 7cf0e9f commit 0962195
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 2 deletions.
Expand Up @@ -26,6 +26,9 @@ public PublishHelper(){
this.daoHelper = new DAOHelper(dbSession);
}

/**
* Uploads the records in the Hpfeeds broker.
*/
public void uploadRecordHpfeeds(){
persistRecord();
try {
Expand All @@ -35,10 +38,21 @@ public void uploadRecordHpfeeds(){
}
}

/**
* Persists the record in a JSON file.
*/
private void persistRecord(){
jsonHelper.persistData(getLastInsertedRecord());
jsonHelper.persistData(getLastInsertedRecords());
}

/**
* Publish the JSON file in the broker
* @throws Hpfeeds.ReadTimeOutException ReadTimeOutException
* @throws Hpfeeds.EOSException EOSException
* @throws Hpfeeds.InvalidStateException InvalidStateException
* @throws Hpfeeds.LargeMessageException LargeMessageException
* @throws IOException IOException
*/
private void publisher() throws Hpfeeds.ReadTimeOutException, Hpfeeds.EOSException, Hpfeeds.InvalidStateException, Hpfeeds.LargeMessageException, IOException {
Publisher publisher = new Publisher();
String initialConfigurationUrl = jsonHelper.getFilePath();
Expand All @@ -49,7 +63,11 @@ private void publisher() throws Hpfeeds.ReadTimeOutException, Hpfeeds.EOSExcepti

}

private ArrayList<RecordAll> getLastInsertedRecord(){
/**
* Returns an ArrayList of the last inserted records.
* @return a list of the last inserted records from a current attack
*/
private ArrayList<RecordAll> getLastInsertedRecords(){
return daoHelper.getAttackRecordDAO().getRecordsForFilter(filter,offset,limit,attackRecordOffset,attackRecordLimit);
}
}
Binary file removed src/main/res/raw/busybox_arm
Binary file not shown.
Binary file removed src/main/res/raw/busybox_mips
Binary file not shown.
Binary file removed src/main/res/raw/busybox_x86
Binary file not shown.
Binary file removed src/main/res/raw/nflog_arm
Binary file not shown.
Binary file removed src/main/res/raw/nflog_mips
Binary file not shown.
Binary file removed src/main/res/raw/nflog_x86
Binary file not shown.
Binary file removed src/main/res/raw/run_pie_arm
Binary file not shown.
Binary file removed src/main/res/raw/run_pie_mips
Binary file not shown.
Binary file removed src/main/res/raw/run_pie_x86
Binary file not shown.

0 comments on commit 0962195

Please sign in to comment.