Browse Source

Small fixes in the Formatters

qam 10 years ago
parent
commit
3387a84bc7

+ 2 - 2
src/de/tudarmstadt/informatik/hostage/commons/HelperUtils.java

@@ -237,7 +237,7 @@ public final class HelperUtils {
 	}
 	
 	/**
-	 * Converts a byte array into a hexadecimal String, e.g. {0x00, 0x01} to "0x00, 0x01". 
+	 * Converts a byte array into a hexadecimal String, e.g. {0x00, 0x01} to "00, 01". 
 	 * @param bytes that will be converted.
 	 * @return converted String.
 	 */
@@ -255,7 +255,7 @@ public final class HelperUtils {
 	}
 	
 	/**
-	 * Converts a String into a byte array, e.g. "0x00, 0x01" to {0x00, 0x01}. 
+	 * Converts a String into a byte array, e.g. "00, 01" to {0x00, 0x01}. 
 	 * @param string that will be converted.
 	 * @return converted byte array.
 	 */

+ 2 - 2
src/de/tudarmstadt/informatik/hostage/format/MySQLFormatter.java

@@ -11,8 +11,8 @@ public class MySQLFormatter implements ProtocolFormatter {
 	@Override
 	public String format(String packet) {
 		byte[] bytes = HelperUtils.hexStringToBytes(packet);
-		String command = getCommand(bytes) + "\n";
-		String content = HelperUtils.byteToStr(bytes) + "\n";
+		String command = "Command: " + getCommand(bytes) + "\n";
+		String content = "Content: " + HelperUtils.byteToStr(bytes) + "\n";
 		return command + content;
 	}