-
Notifications
You must be signed in to change notification settings - Fork 191
/
FunctionListActivity.java
executable file
·52 lines (45 loc) · 1.74 KB
/
FunctionListActivity.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.bulbsecurity.framework.app;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
public class FunctionListActivity extends ListActivity {
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
String[] values = new String[] { "Send Commands to an Agent", "View Data Gathered from an Agent" , "Run a Remote Attack", "Run a Social Engineering or Client Side Attack" };
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, values);
setListAdapter(adapter);
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
//super.onListItemClick(l, v, position, id);
String selection = l.getItemAtPosition(position).toString();
if (selection.equals("Run a Remote Attack"))
{
Intent remoteintent = new Intent(getApplicationContext(),RemoteAttackActivity.class);
startActivity(remoteintent);
}
if (selection.equals("Run a Social Engineering or Client Side Attack"))
{
Intent socialintent = new Intent(getApplicationContext(),SocialAttackActivity.class);
startActivity(socialintent);
}
if (selection.equals("Send Commands to an Agent"))
{
Intent getagents = new Intent(getApplicationContext(),GetAgentsActivity.class);
getagents.putExtra("next", "command");
startActivity(getagents);
}
if (selection.equals("View Data Gathered from an Agent"))
{
Intent getagents = new Intent(getApplicationContext(),GetAgentsActivity.class);
getagents.putExtra("next", "data");
startActivity(getagents);
}
}
}