You are on page 1of 1

Sign 

up

chrisk44 / Hijacker Watch 151 Star 1.8k Fork 379

Code Issues 13 Pull requests Actions Projects Security Insights

Change sniffer-data input to use airodump's csv files instead of deco… Browse files
…ding its output, fix STDialog not refreshing, add options to copy last executed commands, update gradle

master

chrisk44 committed on 15 Mar 2020 1 parent c59f3a4 commit 271027d782d38bf580608f74b9b85726c70c18e2

Showing 28 changed files with 389 additions and 16,301,320 deletions. Unified Split

5 .idea/gradle.xml

... ... @@ -1,11 +1,10 @@


1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 + <component name="GradleMigrationSettings" migrationVersion="1" />
3 4 <component name="GradleSettings">
4 5 <option name="linkedExternalProjectsSettings">
5 6 <GradleProjectSettings>
6 - <compositeConfiguration>
7 - <compositeBuild compositeDefinitionSource="SCRIPT" />
8 - </compositeConfiguration>
7 + <option name="testRunner" value="PLATFORM" />
9 8 <option name="distributionType" value="DEFAULT_WRAPPED" />
10 9 <option name="externalProjectPath" value="$PROJECT_DIR$" />
11 10 <option name="modules">

2 .idea/misc.xml

@@ -39,7 +39,7 @@
39 39 </value>
40 40 </option>
41 41 </component>
42 - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="JDK" project-jd
42 + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jd
43 43 <output url="file://$PROJECT_DIR$/build/classes" />
44 44 </component>
45 45 <component name="ProjectType">

4 .idea/modules.xml

@@ -2,8 +2,8 @@
2 2 <project version="4">
3 3 <component name="ProjectModuleManager">
4 4 <modules>
5 - <module fileurl="file://$PROJECT_DIR$/Hijacker.iml" filepath="$PROJECT_DIR$/Hijacker.iml" />
6 - <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
5 + <module fileurl="file://$PROJECT_DIR$/Hijacker.iml" filepath="$PROJECT_DIR$/Hijacker.iml" group="Hijacker" />
6 + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" group="Hijacker/app" />
7 7 </modules>
8 8 </component>
9 9 </project>

1 app/build.gradle

@@ -25,6 +25,7 @@ android {


25 25 path "CMakeLists.txt"
26 26 }
27 27 }
28 + ndkVersion = '21.0.6113669'
28 29 }
29 30 dependencies {
30 31 implementation fileTree(include: ['*.jar'], dir: 'libs')

35 app/src/main/java/com/hijacker/AP.java

@@ -20,6 +20,8 @@
20 20 import android.app.FragmentManager;
21 21 import android.app.FragmentTransaction;
22 22 import androidx.annotation.NonNull;
23 + import androidx.annotation.Nullable;
24 +
23 25 import android.util.Log;
24 26 import android.view.MenuItem;
25 27 import android.view.View;

@@ -81,7 +83,8 @@

81 83 boolean isHidden = false;


82 84 int ch, id, sec=UNKNOWN;
83 85 private int beacons, data, ivs, total_beacons=0, total_data=0, total_ivs=0;
84 - String essid, enc, cipher, auth;
86 + private String essid;
87 + String enc, cipher, auth;
85 88 final ArrayList<ST> clients = new ArrayList<>();
86 89 AP(String essid, String mac, String enc, String cipher, String auth,
87 90 int pwr, int beacons, int data, int ivs, int ch) {
@@ -106,8 +109,8 @@ void update(){

106 109 //For refresh


107 110 this.update(this.essid, this.enc, this.cipher, this.auth, this.pwr, this.beacons, this.data, this.ivs, this.ch);
108 111 }
109 - void update(String essid, String enc, String cipher, String auth,
110 - int pwr, int beacons, int data, int ivs, int ch){
112 + void update(@Nullable String essid, String enc, String cipher, String auth,
113 + int pwr, int beacons, int data, int ivs, int ch){
111 114
112 115 if(!toSort && sort!=SORT_NOSORT){
113 116 switch(sort){
@@ -128,10 +131,13 @@ void update(String essid, String enc, String cipher, String auth,

128 131 }
129 132 }
130 133
131 - this.essid = essid;
132 - if(essid.equals("<hidden>") && !isHidden){
133 - isHidden = true;
134 - hidden++;
134 + if(essid==null){
135 + if(this.essid==null && !isHidden){
136 + isHidden = true;
137 + hidden++;
138 + }
139 + }else if(!essid.equals(this.essid)){
140 + this.essid = essid;
135 141 }
136 142
137 143 if(beacons!=this.beacons || data!=this.data || ivs!=this.ivs || this.lastseen==0){

@@ -172,8 +178,11 @@ void update(String essid, String enc, String cipher, String auth,

172 178 break;


173 179 }
174 180 }
175 - upperLeft = this.essid + (this.alias==null ? "" : " (" + alias + ')');
176 - lowerRight = "PWR: " + this.pwr + " | SEC: " + this.enc + " | CH: " + this.ch + " | B:" + this.getBeacons() + " | D
181 + upperLeft = this.getESSID() + (this.alias==null ? "" : " (" + alias + ')');
182 + lowerRight = "PWR: " + this.pwr +
183 + (this.enc.length()==0 ? "" : " | SEC: " + this.enc) +
184 + (this.ch==-1 ? "" : " | CH: " + this.ch) +
185 + " | B:" + this.getBeacons() + " | D:" + this.getData();
177 186 runInHandler(new Runnable(){
178 187 @Override
179 188 public void run(){

@@ -200,7 +209,7 @@ void crack(){


200 209 Airodump.setAP(this);
201 210 Airodump.setForWEP(true);
202 211 Airodump.start();
203 - if(!this.essid.equals("<hidden>")) startAireplayWEP(this);
212 + if(essid!=null) startAireplayWEP(this);
204 213 progress.setIndeterminate(true);
205 214 }else if(this.sec == WPA || this.sec == WPA2){
206 215 //wpa/wpa2

@@ -246,6 +255,8 @@ void disconnectAll(){

246 255 }
247 256 }
248 257
258 + String getESSID(){ return essid==null ? "<hidden>" : essid; }
259 + boolean isHidden(){ return isHidden; }
249 260 int getBeacons(){ return total_beacons + beacons; }
250 261 int getData(){ return total_data + data; }
251 262 int getIvs(){ return total_ivs + ivs; }

@@ -275,7 +286,7 @@ void showInfo(FragmentManager fragmentManager){

275 286 @NonNull


276 287 @Override
277 288 public String toString(){
278 - return this.essid + (this.alias==null ? "" : " (" + this.alias + ')') + " (" + this.mac + ')';
289 + return getESSID() + (alias==null ? "" : " (" + alias + ')') + " (" + mac + ')';
279 290 }
280 291 String getExported(){
281 292 //MAC PWR CH Beacons Data #s ENC AUTH CIPHER Hidden ESSID - Manufacturer

@@ -290,7 +301,7 @@ String getExported(){


290 301 str += getFixed(auth, 6);
291 302 str += getFixed(cipher, 8);
292 303 str += getFixed(isHidden ? "Yes" : "No", 8);
293 - str += " " + essid + (alias==null ? "" : " (" + alias + ')') + " - " + manuf;
304 + str += " " + getESSID() + (alias==null ? "" : " (" + alias + ')') + " - " + manuf;
294 305
295 306 return str;
296 307 }

4 app/src/main/java/com/hijacker/APDialog.java

@@ -51,7 +51,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {


51 51 views[12] = view.findViewById(R.id.lastseen);
52 52
53 53 builder.setView(view);
54 - builder.setTitle(ap.essid);
54 + builder.setTitle(ap.getESSID());
55 55 builder.setNegativeButton(R.string.close, new DialogInterface.OnClickListener() {
56 56 @Override
57 57 public void onClick(DialogInterface dialog, int which) {}
@@ -63,7 +63,7 @@ APDialog setAP(AP ap){
63 63 return this;
64 64 }
65 65 void onRefresh(){
66 - views[0].setText(ap.essid);
66 + views[0].setText(ap.getESSID());
67 67 views[1].setText(ap.mac);
68 68 views[2].setText(String.format(Locale.getDefault(), "%d", ap.ch));
69 69 views[3].setText(String.format(Locale.getDefault(), "%d", ap.pwr));

377 app/src/main/java/com/hijacker/Airodump.java

Load diff
Large diffs are not rendered by default.

2 app/src/main/java/com/hijacker/CustomAction.java

@@ -79,7 +79,7 @@ void run(Shell shell, @NonNull Device dev){


79 79 if(type==TYPE_AP){
80 80 AP ap = (AP)dev;
81 81 shell.run("export MAC=\"" + ap.mac + '\"');
82 - shell.run("export ESSID=\"" + ap.essid + '\"');
82 + shell.run("export ESSID=\"" + ap.getESSID() + '\"');
83 83 shell.run("export ENC=\"" + ap.enc + '\"');
84 84 shell.run("export CIPHER=\"" + ap.cipher + '\"');
85 85 shell.run("export AUTH=\"" + ap.auth + '\"');

2 app/src/main/java/com/hijacker/IsolatedFragment.java

@@ -86,7 +86,7 @@ public void onItemClick(AdapterView<?> adapterView, final View v, int i, long l)

86 86 @Override
87 87 public void run(){
88 88 if(cont && is_ap !=null){
89 - essid.setText(is_ap.essid);
89 + essid.setText(is_ap.getESSID());
90 90 manuf.setText(is_ap.manuf);
91 91 mac.setText(is_ap.mac);
92 92 sec1.setText("Enc: " + is_ap.enc + " | Auth: " + is_ap.auth + " | Cipher: " + is_ap.cipher);

64 app/src/main/java/com/hijacker/MainActivity.java

@@ -40,6 +40,7 @@
40 40 import android.os.Build;
41 41 import android.os.Bundle;
42 42 import android.os.Environment;
43 + import android.os.FileObserver;
43 44 import android.os.Handler;
44 45 import android.os.Looper;
45 46 import android.preference.PreferenceManager;

@@ -57,7 +58,6 @@
57 58 import android.util.JsonReader;
58 59 import android.util.Log;
59 60 import android.util.SparseArray;
60 - import android.view.Gravity;
61 61 import android.view.KeyEvent;
62 62 import android.view.Menu;
63 63 import android.view.MenuItem;

@@ -112,6 +112,7 @@

112 112 static boolean wpacheckcont = false;


113 113 static boolean notif_on = false, background = false; //notif_on: notification should be shown, background: the app i
114 114 static int aireplay_running = 0, currentFragment = FRAGMENT_AIRODUMP; //Set currentFragment in onResume of each
115 + static String last_airodump = null, last_aireplay = null, last_mdk = null, last_reaver = null;
115 116 //Filters
116 117 static boolean show_ap = true, show_st = true, show_na_st = true, wpa = true, wep = true, opn = true;
117 118 static boolean[] show_ch = {true, false, false, false, false, false, false, false, false, false, false, false, false, f

@@ -143,7 +144,7 @@

143 144 static NotificationCompat.Builder notif, error_notif, handshake_notif;


144 145 static NotificationManager mNotificationManager;
145 146 static FragmentManager mFragmentManager;
146 - static String path, data_path, actions_path, wl_path, cap_path, reaver_sess_path, firm_backup_file, manufDBFile, arch,
147 + static String path, cap_tmp_path, data_path, actions_path, wl_path, cap_path, reaver_sess_path, firm_backup_file, manuf
147 148 static File aliases_file;
148 149 static FileWriter aliases_in;
149 150 static final HashMap<String, String> aliases = new HashMap<>();
@@ -158,7 +159,7 @@

158 159 static String iface, prefix, airodump_dir, aireplay_dir, aircrack_dir, mdk3bf_dir, mdk3dos_dir, reaver_dir, chroot_dir,
159 160 enable_monMode, disable_monMode, custom_chroot_cmd;
160 161 static int deauthWait, band;
161 - static boolean show_notif, show_details, airOnStartup, debug, delete_extra, show_client_count,
162 + static boolean show_notif, show_details, airOnStartup, debug, show_client_count,
162 163 monstart, always_cap, cont_on_fail, watchdog, target_deauth, enable_on_airodump, update_on_startup;
163 164
164 165 WatchdogTask watchdogTask;

@@ -360,7 +361,6 @@ protected Boolean doInBackground(Void... params){

360 361 show_details = Boolean.parseBoolean(getString(R.string.show_details));


361 362 airOnStartup = Boolean.parseBoolean(getString(R.string.airOnStartup));
362 363 debug = Boolean.parseBoolean(getString(R.string.debug));
363 - delete_extra = Boolean.parseBoolean(getString(R.string.delete_extra));
364 364 always_cap = Boolean.parseBoolean(getString(R.string.always_cap));
365 365 chroot_dir = getString(R.string.chroot_dir);
366 366 monstart = Boolean.parseBoolean(getString(R.string.monstart));
@@ -379,6 +379,7 @@ protected Boolean doInBackground(Void... params){
379 379 //Initialize paths
380 380 publishProgress(getString(R.string.init_files));
381 381 path = getFilesDir().getAbsolutePath();
382 + cap_tmp_path = path + "/cap_tmp";
382 383 data_path = Environment.getExternalStorageDirectory() + "/Hijacker";
383 384 actions_path = data_path + "/actions";
384 385 wl_path = data_path + "/wordlists";
@@ -387,6 +388,7 @@ protected Boolean doInBackground(Void... params){
387 388 firm_backup_file = data_path + "/fw_bcmdhd.orig.bin";
388 389 manufDBFile = path + "/manuf.db";
389 390 ArrayList<File> dirs = new ArrayList<>();
391 + dirs.add(new File(cap_tmp_path));
390 392 dirs.add(new File(data_path));
391 393 dirs.add(new File(actions_path));
392 394 dirs.add(new File(wl_path));

@@ -653,9 +655,10 @@ protected Boolean doInBackground(Void... params){

653 655 reaver_dir = "reaver";


654 656 }
655 657
656 - //Initialize RootFile (requires root)
657 - publishProgress(getString(R.string.init_rootFile));
658 + //Initialize RootFile (requires root) and Airodump
659 + publishProgress(getString(R.string.init_rootFile_airodump));
658 660 RootFile.init();
661 + Airodump.capFileObserver = new Airodump.CapFileObserver(cap_tmp_path, FileObserver.CREATE | FileObserver.MODIFY
659 662
660 663 //Initialize threads
661 664 publishProgress(getString(R.string.init_threads));

@@ -947,7 +950,14 @@ protected void onPostExecute(final Boolean success){

947 950 mDrawerLayout.openDrawer(GravityCompat.START);


948 951
949 952 //Start
950 - main();
953 + runOne(enable_monMode);
954 + stop(PROCESS_AIRODUMP);
955 + stop(PROCESS_AIREPLAY);
956 + stop(PROCESS_MDK_BF);
957 + stop(PROCESS_MDK_DOS);
958 + stop(PROCESS_AIRCRACK);
959 + stop(PROCESS_REAVER);
960 + if(airOnStartup) Airodump.startClean();
951 961 }
952 962 }
953 963

@@ -972,17 +982,6 @@ void extract(String filename, String out_dir, boolean chmod){

972 982 Log.e("HIJACKER/FileProvider", "Exception copying from assets", e);


973 983 }
974 984 }
975 - public void main(){
976 - runOne(enable_monMode);
977 -
978 - stop(PROCESS_AIRODUMP);
979 - stop(PROCESS_AIREPLAY);
980 - stop(PROCESS_MDK_BF);
981 - stop(PROCESS_MDK_DOS);
982 - stop(PROCESS_AIRCRACK);
983 - stop(PROCESS_REAVER);
984 - if(airOnStartup) Airodump.startClean();
985 - }
986 985
987 986 public static void _startAireplay(final String str){
988 987 try{

@@ -1013,7 +1012,7 @@ public static void startAireplay(String target, String client){

1013 1012 public static void startAireplayWEP(AP ap){


1014 1013 //Increase IV generation from ap mac to crack a wep network
1015 1014 aireplay_running = AIREPLAY_WEP;
1016 - _startAireplay("--fakeauth 0 -a " + ap.mac + " -e " + ap.essid);
1015 + _startAireplay("--fakeauth 0 -a " + ap.mac + (ap.isHidden() ? "" : " -e " + ap.getESSID()));
1017 1016 //_startAireplay("--arpreplay -b " + ap.mac); //Aireplay tries to open a file at a read-only system
1018 1017 //_startAireplay("--caffe-latte -b " + ap.mac); //don't know where
1019 1018 }
@@ -1024,6 +1023,7 @@ public static void startBeaconFlooding(String str){

1024 1023 String cmd = "su -c " + prefix + " " + mdk3bf_dir + " " + iface + " b -m ";
1025 1024 if(str!=null) cmd += str;
1026 1025 if(debug) Log.d("HIJACKER/MDK3", cmd);
1026 + last_mdk = cmd;
1027 1027 Runtime.getRuntime().exec(cmd);
1028 1028 }catch(IOException e){ Log.e("HIJACKER/startBF", e.toString()); }
1029 1029 last_action = System.currentTimeMillis();
@@ -1042,6 +1042,7 @@ public static void startAdos(String str){
1042 1042 String cmd = "su -c " + prefix + " " + mdk3dos_dir + " " + iface + " a -m";
1043 1043 cmd += str==null ? "" : " -i " + str;
1044 1044 if(debug) Log.d("HIJACKER/MDK3", cmd);
1045 + last_mdk = cmd;
1045 1046 Runtime.getRuntime().exec(cmd);
1046 1047 }catch(IOException e){ Log.e("HIJACKER/startAdos", e.toString()); }
1047 1048 last_action = System.currentTimeMillis();

@@ -1201,7 +1202,6 @@ static void loadPreferences(){

1201 1202 debug = pref.getBoolean("debug", debug);


1202 1203 watchdog = pref.getBoolean("watchdog", watchdog);
1203 1204 target_deauth = pref.getBoolean("target_deauth", target_deauth);
1204 - delete_extra = pref.getBoolean("delete_extra", delete_extra);
1205 1205 try{
1206 1206 always_cap = pref.getBoolean("always_cap", always_cap);
1207 1207 }catch(ClassCastException e){

@@ -1258,10 +1258,11 @@ public boolean onOptionsItemSelected(MenuItem item){

1258 1258 return true;


1259 1259
1260 1260 case R.id.reset:
1261 - stop(PROCESS_AIRODUMP);
1261 + boolean flag = Airodump.isRunning();
1262 + if(flag) stop(PROCESS_AIRODUMP);
1262 1263 Tile.clear();
1263 1264 Tile.onCountsChanged();
1264 - Airodump.startClean();
1265 + if(flag) Airodump.start();
1265 1266 return true;
1266 1267
1267 1268 case R.id.stop_run:

@@ -1291,6 +1292,13 @@ public boolean onOptionsItemSelected(MenuItem item){

1291 1292 new ExportDialog().show(mFragmentManager, "ExportDialog");


1292 1293 return true;
1293 1294
1295 + case R.id.copy_airodump:
1296 + if(last_airodump==null){
1297 + Toast.makeText(this, getString(R.string.no_last_command_available), Toast.LENGTH_SHORT).show();
1298 + }else{
1299 + copy(last_airodump, rootView);
1300 + }
1301 +
1294 1302 default:
1295 1303 return super.onOptionsItemSelected(item);
1296 1304 }

@@ -1341,7 +1349,7 @@ protected void onDestroy(){

1341 1349 @Override


1342 1350 public boolean onKeyDown(int keyCode, KeyEvent event){
1343 1351 if(keyCode==KeyEvent.KEYCODE_BACK){
1344 - if(mDrawerLayout.isDrawerOpen(Gravity.START)){
1352 + if(mDrawerLayout.isDrawerOpen(GravityCompat.START)){
1345 1353 mDrawerLayout.closeDrawers();
1346 1354 }else if(mFragmentManager.getBackStackEntryCount()>1){
1347 1355 mFragmentManager.popBackStackImmediate();

@@ -1565,14 +1573,15 @@ public void onCopy(View v){

1565 1573 }
1566 1574 static void copy(String str, View view){
1567 1575 clipboard.setPrimaryClip(ClipData.newPlainText("label", str));
1568 - if(view!=null) Snackbar.make(view, "\"" + str + "\" copied to clipboard", Snackbar.LENGTH_SHORT).show();
1576 + if(view!=null)
1577 + Toast.makeText(view.getContext(), view.getContext().getString(R.string.copied_to_clipboard), Toast.LENGTH_SHORT
1569 1578 }
1570 1579 static void notification(){
1571 1580 if(notif_on && show_notif && notif!=null){
1572 1581 if(show_details){
1573 1582 String str;
1574 1583 if(is_ap==null) str = "APs: " + Tile.i + " | STs: " + (Tile.tiles.size() - Tile.i);
1575 - else str = is_ap.essid + " | STs: " + (Tile.tiles.size() - Tile.i);
1584 + else str = is_ap.getESSID() + " | STs: " + (Tile.tiles.size() - Tile.i);
1576 1585
1577 1586 if(aireplay_running==AIREPLAY_DEAUTH) str += " | Aireplay deauthenticating...";
1578 1587 else if(aireplay_running==AIREPLAY_WEP) str += " | Aireplay replaying for wep...";

@@ -1768,11 +1777,6 @@ public void run(){

1768 1777 reader.close();


1769 1778
1770 1779 if(!versionName.equals(latestName) && latestLink!=null){
1771 - // final UpdateConfirmDialog dialog = new UpdateConfirmDialog();
1772 - // dialog.newVersionName = latestName;
1773 - // dialog.link = latestLink;
1774 - // dialog.message = latestBody;
1775 -
1776 1780 String text = getString(R.string.update_text) + "\n\n";
1777 1781 text += getString(R.string.latest_version) + " " + latestName + "\n";
1778 1782 text += getString(R.string.current_version) + " " + versionName + "\n";

2 app/src/main/java/com/hijacker/ReaverFragment.java

@@ -63,6 +63,7 @@

63 63 import static com.hijacker.MainActivity.debug;


64 64 import static com.hijacker.MainActivity.iface;
65 65 import static com.hijacker.MainActivity.last_action;
66 + import static com.hijacker.MainActivity.last_reaver;
66 67 import static com.hijacker.MainActivity.mFragmentManager;
67 68 import static com.hijacker.MainActivity.monstart;
68 69 import static com.hijacker.MainActivity.notification;

@@ -421,6 +422,7 @@ protected Boolean doInBackground(Void... params){

421 422 out = new BufferedReader(new InputStreamReader(dc.getInputStream()));


422 423 }
423 424 if(debug) Log.d("HIJACKER/ReaverFragment", cmd);
425 + last_reaver = cmd;
424 426
425 427 String buffer;
426 428 while(!isCancelled() && (buffer = out.readLine())!=null){

6 app/src/main/java/com/hijacker/ST.java

@@ -148,7 +148,7 @@ public void run(){

148 148
149 149 upperLeft = this.mac + (this.alias==null ? "" : " (" + alias + ')');
150 150 if(connectedTo!=null){
151 - lowerLeft = paired + connectedTo.mac + " (" + connectedTo.essid + ")";
151 + lowerLeft = paired + connectedTo.mac + " (" + connectedTo.getESSID() + ")";
152 152 }else lowerLeft = not_connected;
153 153 lowerRight = "PWR: " + this.pwr + " | Frames: " + this.getFrames();
154 154 runInHandler(new Runnable(){

@@ -197,7 +197,9 @@ void showInfo(FragmentManager fragmentManager){

197 197 @NonNull


198 198 @Override
199 199 public String toString(){
200 - return this.mac + (this.alias==null ? "" : " (" + this.alias + ')') + ((this.bssid==null) ? "" : " (" + getAPByMac(
200 + return this.mac +
201 + (this.alias==null ? "" : " (" + this.alias + ')') +
202 + (this.bssid==null ? "" : " (" + getAPByMac(this.bssid).getESSID() + ')');
201 203 }
202 204 public String getExported(){
203 205 //MAC BSSID PWR Frames Lost Manufacturer - Probes

5 app/src/main/java/com/hijacker/STDialog.java

@@ -18,7 +18,6 @@

18 18 */
19 19
20 20 import android.app.Dialog;
21 - import android.app.DialogFragment;
22 21 import android.content.DialogInterface;
23 22 import android.os.Bundle;
24 23 import androidx.appcompat.app.AlertDialog;

@@ -29,7 +28,7 @@
29 28
30 29 import static com.hijacker.MainActivity.getLastSeen;
31 30
32 - public class STDialog extends DialogFragment {
31 + public class STDialog extends DeviceDialog {
33 32 ST st;
34 33 TextView[] views = {null, null, null, null, null, null, null, null};
35 34 @Override

@@ -64,7 +63,7 @@ void onRefresh(){

64 63 views[0].setText(st.mac);
65 64
66 65 if(st.connectedTo==null) views[1].setText(R.string.not_connected);
67 - else views[1].setText(st.connectedTo.mac + " (" + st.connectedTo.essid + ")");
66 + else views[1].setText(st.connectedTo.mac + " (" + st.connectedTo.getESSID() + ")");
68 67
69 68 views[2].setText(String.format(Locale.getDefault(), "%d", st.pwr));
70 69 views[3].setText(String.format(Locale.getDefault(), "%d", st.getFrames()));

1 app/src/main/java/com/hijacker/SettingsFragment.java

@@ -82,7 +82,6 @@ public void run(){


82 82 pref_edit.putBoolean("show_details", Boolean.parseBoolean(getString(R.string.show_details)));
83 83 pref_edit.putBoolean("airOnStartup", Boolean.parseBoolean(getString(R.string.airOnStartup)));
84 84 pref_edit.putBoolean("debug", Boolean.parseBoolean(getString(R.string.debug)));
85 - pref_edit.putBoolean("delete_extra", Boolean.parseBoolean(getString(R.string.delete_extra)));
86 85 pref_edit.putBoolean("always_cap", Boolean.parseBoolean(getString(R.string.always_cap)));
87 86 pref_edit.putString("chroot_dir", getString(R.string.chroot_dir));
88 87 pref_edit.putBoolean("monstart", Boolean.parseBoolean(getString(R.string.monstart)));

4 app/src/main/java/com/hijacker/Tile.java

@@ -191,8 +191,8 @@ static void onCountsChanged(){


191 191 static Comparator<Tile> AP_ESSID = new Comparator<Tile>(){
192 192 @Override
193 193 public int compare(Tile o1, Tile o2){
194 - if(sort_reverse) return ((AP)o2.device).essid.compareToIgnoreCase(((AP)o1.device).essid);
195 - else return ((AP)o1.device).essid.compareToIgnoreCase(((AP)o2.device).essid);
194 + if(sort_reverse) return ((AP)o2.device).getESSID().compareToIgnoreCase(((AP)o1.device).getESSID());
195 + else return ((AP)o1.device).getESSID().compareToIgnoreCase(((AP)o2.device).getESSID());
196 196 }
197 197 };
198 198 static Comparator<Tile> AP_BEACONS = new Comparator<Tile>(){

16 app/src/main/res/menu/toolbar.xml

@@ -28,6 +28,22 @@

28 28 android:title="@string/export_title"
29 29 app:showAsAction="never" />
30 30
31 + <item android:id="@+id/copy_airodump"
32 + android:title="@string/copy_last_airodump_title"
33 + app:showAsAction="never" />
34 +
35 + <item android:id="@+id/copy_aireplay"
36 + android:title="@string/copy_last_aireplay_title"
37 + app:showAsAction="never" />
38 +
39 + <item android:id="@+id/copy_mdk"
40 + android:title="@string/copy_last_mdk_title"
41 + app:showAsAction="never" />
42 +
43 + <item android:id="@+id/copy_reaver"
44 + android:title="@string/copy_last_reaver_title"
45 + app:showAsAction="never" />
46 +
31 47 <item android:id="@+id/settings"
32 48 android:title="@string/settings"
33 49 app:showAsAction="never" />

12 app/src/main/res/values/strings.xml

@@ -4,6 +4,11 @@

4 4
5 5 <!-- Toolbar -->
6 6 <string name="stop_aireplay">Stop Aireplay</string>
7 + <string name="copy_last_airodump_title">Copy last Airodump command</string>
8 + <string name="copy_last_aireplay_title">Copy last Aireplay command</string>
9 + <string name="copy_last_mdk_title">Copy last MDK command</string>
10 + <string name="copy_last_reaver_title">Copy last Reaver command</string>
11 + <string name="no_last_command_available">No last command available</string>
7 12
8 13 <!-- Generic text -->
9 14 <string name="incorrect_arch">Available only on ARM architectures, this is</string>

@@ -27,6 +32,7 @@
27 32 <string name="size">Size</string>
28 33 <string name="no_internet">No internet connection</string>
29 34 <string name="unknown_error">An unknown error occurred</string>
35 + <string name="copied_to_clipboard">Copied to clipboard</string>
30 36
31 37 <!-- Navigation Drawer -->
32 38 <string name="nav_airodump">Airodump</string>

@@ -225,7 +231,7 @@

225 231 <string name="loading_custom_actions">Loading custom actions…</string>


226 232 <string name="detecting_device_chipset">Detecting device chipset…</string>
227 233 <string name="setting_up_tools">Setting up tools…</string>
228 - <string name="init_rootFile">Initializing RootFile…</string>
234 + <string name="init_rootFile_airodump">Initializing RootFile and Airodump…</string>
229 235 <string name="init_threads">Initializing threads…</string>
230 236 <string name="starting_pers_service">Starting persistence service…</string>
231 237 <string name="checking_permissions">Checking permissions…</string>

@@ -324,7 +330,6 @@

324 330 <string name="show_details" translatable="false">true</string>


325 331 <string name="airOnStartup" translatable="false">true</string>
326 332 <string name="debug" translatable="false">true</string>
327 - <string name="delete_extra" translatable="false">true</string>
328 333 <string name="always_cap" translatable="false">false</string>
329 334 <string name="cont_on_fail" translatable="false">false</string>
330 335 <string name="watchdog" translatable="false">true</string>

@@ -343,9 +348,6 @@

343 348 <string name="prefix_sum">Prefix for every command</string>


344 349 <string name="prefix_desc">A prefix for every command that is run and needs monitor mode. (LD_PRELOAD)</string>
345 350
346 - <string name="delete_extra_title">Delete extra cap files</string>
347 - <string name="delete_extra_sum">Delete .csv and .netxml files created by airodump when saving to .cap file</string>
348 -
349 351 <string name="always_cap_title">Save all packets</string>
350 352 <string name="always_cap_sum">Create a .cap file every time airodump-ng starts</string>
351 353

5 app/src/main/res/xml/preferences.xml

@@ -44,11 +44,6 @@

44 44 android:defaultValue="@string/airOnStartup"
45 45 android:key="airOnStartup"
46 46 android:title="@string/startup_title" />
47 - <SwitchPreference
48 - android:defaultValue="@string/delete_extra"
49 - android:title="@string/delete_extra_title"
50 - android:key="delete_extra"
51 - android:summary="@string/delete_extra_sum" />
52 47 <SwitchPreference
53 48 android:defaultValue="@string/always_cap"
54 49 android:title="@string/always_cap_title"

2 build.gradle

@@ -6,7 +6,7 @@ buildscript {


6 6 jcenter()
7 7 }
8 8 dependencies {
9 - classpath 'com.android.tools.build:gradle:3.5.3'
9 + classpath 'com.android.tools.build:gradle:3.6.1'
10 10
11 11 // NOTE: Do not place your application dependencies here; they belong
12 12 // in the individual module build.gradle files

4 gradle/wrapper/gradle-wrapper.properties

... ... @@ -1,6 +1,6 @@

1 - #Sun Nov 10 00:00:41 EET 2019


1 + #Fri Mar 13 19:09:29 EET 2020
2 2 distributionBase=GRADLE_USER_HOME
3 3 distributionPath=wrapper/dists
4 4 zipStoreBase=GRADLE_USER_HOME
5 5 zipStorePath=wrapper/dists
6 - distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6 + distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

1,707,657 wordlists/darkc0de.lst

Load diff
This file was deleted.

2,902,428 wordlists/rockyou1.txt

Load diff
This file was deleted.

2,608,450 wordlists/rockyou2.txt

Load diff
This file was deleted.

Oops, something went wrong. Retry

0 comments on commit 271027d

Please sign in to comment.

© 2021 GitHub, Inc. Terms Privacy Security Status Docs

Contact GitHub Pricing API Training Blog About

You might also like