Skip to content

Instantly share code, notes, and snippets.

@mrowe
Created August 31, 2017 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrowe/7d50c1ff698db5695ebdbb18ec234be1 to your computer and use it in GitHub Desktop.
Save mrowe/7d50c1ff698db5695ebdbb18ec234be1 to your computer and use it in GitHub Desktop.
Title Notes Username Password URL Type
AirBNB p4ssw0rd Password
Airbnb user p4ssw0rd https://login.airbnb.com Login
PayPal user p4ssw0rd https://www.paypal.com Login
Bendigo Bank user p4ssw0rd Login
Quantium PSeeker Replica (read only) quantium p4ssw0rd Database
irc mrowe p4ssw0rd Server
Disney user p4ssw0rd Login
Zoho user p4ssw0rd https://accounts.zoho.com Login
Bookbaby user p4ssw0rd https://www.bookbaby.com/myaccount/login.aspx Login
Airbnb user p4ssw0rd https://www.airbnb.com.au/ Login
diff --git a/src/main/java/org/eaves/Account.java b/src/main/java/org/eaves/Account.java
index e84af1d..cce5d54 100644
--- a/src/main/java/org/eaves/Account.java
+++ b/src/main/java/org/eaves/Account.java
@@ -1,6 +1,7 @@
package org.eaves;
import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
class Account {
@@ -8,12 +9,14 @@ class Account {
private String _url;
private String _username;
private String _password; // this is the UTF-8 SHA1 encoded version
+ private String _type;
- Account(String title, String url, String username, String pw){
+ Account(String title, String url, String username, String pw, String type){
_title = title;
_url = url;
_username = username;
_password = (pw == null)?"":pw; // clean this up
+ _type = type;
}
@@ -21,6 +24,10 @@ class Account {
public String toString() {
return "A: <" + _title + " : " + _url + " : " + _username + ">";
}
+
+ public boolean passwordType() {
+ return Arrays.asList("Login", "Password", "Database", "Server").contains(_type);
+ }
public byte[] passwordBytes() {
byte[] rv = new byte[20];
diff --git a/src/main/java/org/eaves/Pwned.java b/src/main/java/org/eaves/Pwned.java
index fc7889a..fc29773 100644
--- a/src/main/java/org/eaves/Pwned.java
+++ b/src/main/java/org/eaves/Pwned.java
@@ -57,7 +57,7 @@ public class Pwned {
if (!_noCallAPI) {
boolean rv = checkAgainstDatabase(hex(sha));
Thread.sleep(3000); // Troy has a 1500ms delay - let's be nice
- if (rv) {
+ if (rv && a.passwordType()) {
System.out.println(a.toString());
}
}
@@ -117,7 +117,7 @@ public class Pwned {
private List<Account> processFile(String file) throws IOException {
- Account a = new Account("XKCD-TRUE", "https://xkcd.com/936/", "trombonetroubador", "correcthorsebatterystaple");
+ Account a = new Account("XKCD-TRUE", "https://xkcd.com/936/", "trombonetroubador", "correcthorsebatterystaple", "Login");
List<Account> accounts = new ArrayList<Account>();
accounts.add(a);
@@ -128,8 +128,8 @@ public class Pwned {
String [] nextLine;
int lineCount = 1; // starts at 1 - skips the first line as 1Password generates a heading
while ((nextLine = reader.readNext()) != null) {
- if (nextLine.length == 5) {
- for (int i=0;i<5;i++) {
+ if (nextLine.length >= 6) {
+ for (int i=0;i<6;i++) {
if (nextLine[i] == null)
{
System.err.println("CSVReader returned an element in the line of null, this shouldn't happen, the CSV is probably not correct in some way");
@@ -139,7 +139,7 @@ public class Pwned {
}
}
- a = new Account(nextLine[0], nextLine[4], nextLine[2], nextLine[3]);
+ a = new Account(nextLine[0], nextLine[4], nextLine[2], nextLine[3], nextLine[5]);
accounts.add(a);
++lineCount;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment