Skip to content

Commit

Permalink
SSID JNI parameter passing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Jul 2, 2016
1 parent 392d8ba commit 12f37cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public List<String> getKeys() {

// upc_keys.c attack.
if (targetSsid.startsWith("UPC")) {
upcNative(targetSsid.getBytes("US-ASCII"), is5G);
upcNative((targetSsid+"\0").getBytes("US-ASCII"), is5G);
}

results = computedKeys.toArray(new String[computedKeys.size()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ JNIEXPORT void JNICALL Java_org_exobel_routerkeygen_algorithms_UpcKeygen_upcNati
const int prefixes_cnt = (sizeof(serial_prefixes)/sizeof(serial_prefixes[0]));

target = strtoul(e_ssid_nullterm + 3, NULL, 0);
IPRINTF("Computing UPC keys for essid [%s], target %lu", e_ssid_nullterm, (unsigned long)target);
IPRINTF("Computing UPC keys for essid [%s], target %lu, ssidlen: %d", e_ssid_nullterm, (unsigned long)target, (int)e_ssid_len);
unsigned long stop_ctr = 0;
unsigned long iter_ctr = 0;

Expand Down

0 comments on commit 12f37cb

Please sign in to comment.