/** * Get the sub-String until the character is encountered * * @param c the character to match * @return the substring that matches. */ @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:51.018 -0500", hash_original_method = "720A9C8698AD8EBEF63DE1F048944846", hash_generated_method = "280573BDFBE88FEAE20614843D1D4CAB") public String getString(char c) throws ParseException { StringBuffer retval = new StringBuffer(); while (true) { char next = lookAhead(0); // System.out.println(" next = [" + next + ']' + "ptr = " + ptr); // System.out.println(next == '\0'); if (next == '\0') { throw new ParseException(this.buffer + "unexpected EOL", this.ptr); } else if (next == c) { consume(1); break; } else if (next == '\\') { consume(1); char nextchar = lookAhead(0); if (nextchar == '\0') { throw new ParseException(this.buffer + "unexpected EOL", this.ptr); } else { consume(1); retval.append(nextchar); } } else { consume(1); retval.append(next); } } return retval.toString(); }
/** * Parse a comment string cursor is at a "(". Leave cursor at ) * * @return the substring containing the comment excluding the closing brace. */ @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:50.992 -0500", hash_original_method = "0DEFD663D479F88E7A114CE703AF8835", hash_generated_method = "468767B16106E3DDBED1803029F31BE7") public String comment() throws ParseException { StringBuffer retval = new StringBuffer(); if (lookAhead(0) != '(') return null; consume(1); while (true) { char next = getNextChar(); if (next == ')') { break; } else if (next == '\0') { throw new ParseException(this.buffer + " :unexpected EOL", this.ptr); } else if (next == '\\') { retval.append(next); next = getNextChar(); if (next == '\0') throw new ParseException(this.buffer + " : unexpected EOL", this.ptr); retval.append(next); } else { retval.append(next); } } return retval.toString(); }
@DSSource({DSSourceKind.NETWORK}) @DSSafe(DSCat.SAFE_LIST) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:36:06.195 -0500", hash_original_method = "3BF3B5ECD6A260296AD88686E08D9EA2", hash_generated_method = "9D61867682DEAA67854014FC90C1C4CF") @Override public String toString() { StringBuffer sb = new StringBuffer(); String none = "<none>"; sb.append("SSID: ") .append(SSID == null ? none : SSID) .append(", BSSID: ") .append(BSSID == null ? none : BSSID) .append(", capabilities: ") .append(capabilities == null ? none : capabilities) .append(", level: ") .append(level) .append(", frequency: ") .append(frequency); return sb.toString(); }
/** * Scan until you see a slash or an EOL. * * @return substring containing no slash. */ @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:50.998 -0500", hash_original_method = "B2A0AA5C97E9078316CA6FEBE65DB0C3", hash_generated_method = "FE5A84F56F259ACFA9BFA9B919E878D5") public String byteStringNoSlash() { StringBuffer retval = new StringBuffer(); try { while (true) { char next = lookAhead(0); // bug fix from Ben Evans. if (next == '\0' || next == '\n' || next == '/') { break; } else { consume(1); retval.append(next); } } } catch (ParseException ex) { return retval.toString(); } return retval.toString(); }
/** * Return a substring containing no semicolons. * * @return a substring containing no semicolons. */ @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:50.995 -0500", hash_original_method = "86F26DE68AB39CE9DEE1E486630D72BD", hash_generated_method = "1D832A1960BD04E82C364D5311BD5FAE") public String byteStringNoSemicolon() { StringBuffer retval = new StringBuffer(); try { while (true) { char next = lookAhead(0); // bug fix from Ben Evans. if (next == '\0' || next == '\n' || next == ';' || next == ',') { break; } else { consume(1); retval.append(next); } } } catch (ParseException ex) { return retval.toString(); } return retval.toString(); }
@DSSafe(DSCat.SAFE_LIST) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:36:02.372 -0500", hash_original_method = "D5529C8AE8D596D7C37EDA99E72A8446", hash_generated_method = "4462C98277D0907E61D3E2D1AB20C097") public String toString() { StringBuffer sbuf = new StringBuffer(); sbuf.append("groupFormed: ") .append(groupFormed) .append("isGroupOwner: ") .append(isGroupOwner) .append("groupOwnerAddress: ") .append(groupOwnerAddress); return sbuf.toString(); }
/** * Return a substring containing no commas * * @return a substring containing no commas. */ @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:51.001 -0500", hash_original_method = "03994A77D1324F910A7EC2E8D4C779CB", hash_generated_method = "90ECE281F75BAE93DFEF4C3AA4D51FDF") public String byteStringNoComma() { StringBuffer retval = new StringBuffer(); try { while (true) { char next = lookAhead(0); if (next == '\n' || next == ',') { break; } else { consume(1); retval.append(next); } } } catch (ParseException ex) { } return retval.toString(); }