12.02.2016 Views

IMSI Catchers and Mobile Security

EAS499Honors-IMSICatchersandMobileSecurity-V18F-1

EAS499Honors-IMSICatchersandMobileSecurity-V18F-1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Reset count of cell JSONObjects<br />

signal_strength_transactions = 0;<br />

// If max number of cell JSONObjects per data collection<br />

// has not yet been reached<br />

} else {<br />

// Just do nothing?<br />

}<br />

// Display total transactions on screen<br />

count_textview.setText("Cell transactions received: "<br />

+ (MAX_SIGNAL_STRENGTH_TRANSACTIONS<br />

* current_count_coll_json_obj<br />

+ signal_strength_transactions)<br />

+ "\nCell transactions ready to be sent: "<br />

+ MAX_SIGNAL_STRENGTH_TRANSACTIONS<br />

* current_count_coll_json_obj<br />

+ "\nTotal transactions sent to server: "<br />

+ transactions_sent);<br />

}<br />

} catch (JSONException e1) {<br />

// TODO Auto-generated catch block<br />

// e1.printStackTrace();<br />

data_display_textview<br />

.setText("JSON Exception");<br />

}<br />

// Print time elapsed since last data entry<br />

display_string.append(<br />

numberFormat.format((float) timeElapsed / 1000000000) +<br />

" sec since last data entry.");<br />

data_display_textview.setText(display_string<br />

.toString());<br />

// Record number of data collections to log<br />

Log.d(COLLECTION,<br />

current_count_coll_json_obj +<br />

" data collections collected.");<br />

// Record number of cell JSONObjects to log<br />

Log.d(COLLECTION,<br />

(current_count_coll_json_obj<br />

* MAX_SIGNAL_STRENGTH_TRANSACTIONS<br />

+ signal_strength_transactions)<br />

+ " cell transactions collected.");<br />

// Report empty NeighboringCellInfo list<br />

} else {<br />

Log.d(COLLECTION, "Empty NeighboringCellInfo list.");<br />

}<br />

// If data collection count exceeds maximum<br />

} else { // current_count_coll_json_obj >= MAX_COLLECTIONS_JSON_OBJECTS<br />

// If existing data connection<br />

if (isConnectedToNw()) {<br />

// Only send if data has been collected<br />

if (current_count_coll_json_obj > 0) {<br />

try {<br />

// send all the collected data one by one<br />

spinner.setVisibility(View.VISIBLE);<br />

post_server_response_textview<br />

36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!