Professional Documents
Culture Documents
up
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
Showing 28 changed files with 389 additions and 16,301,320 deletions. Unified Split
5 .idea/gradle.xml
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
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 @@
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,
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; }
4 app/src/main/java/com/hijacker/APDialog.java
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
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 @@
@@ -143,7 +144,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;
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();
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...";
2 app/src/main/java/com/hijacker/ReaverFragment.java
@@ -63,6 +63,7 @@
6 app/src/main/java/com/hijacker/ST.java
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(){
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 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
4 app/src/main/java/com/hijacker/Tile.java
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 @@
@@ -324,7 +330,6 @@
@@ -343,9 +348,6 @@
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
4 gradle/wrapper/gradle-wrapper.properties
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.