diff -urpN john-1.7.8-jumbo-7/src/XSHA512_fmt.c john-1.7.8-jumbo-6b/src/XSHA512_fmt.c
--- john-1.7.8-jumbo-7/src/XSHA512_fmt.c	2011-09-20 21:59:23.000000000 +0000
+++ john-1.7.8-jumbo-6b/src/XSHA512_fmt.c	2011-09-22 21:00:05.546875000 +0000
@@ -42,9 +42,9 @@
 #endif
 
 static struct fmt_tests tests[] = {
-	{"bb0489df7b073e715f19f83fd52d08ede24243554450f7159dd65c100298a5820525b55320f48182491b72b4c4ba50d7b0e281c1d98e06591a5e9c6167f42a742f0359c7", "password"},
-	{"74911f723bd2f66a3255e0af4b85c639776d510b63f0b939c432ab6e082286c47586f19b4e2f3aab74229ae124ccb11e916a7a1c9b29c64bd6b0fd6cbd22e7b1f0ba1673", "hello"},
-	{"5e3ab14c8bd0f210eddafbe3c57c0003147d376bf4caf75dbffa65d1891e39b82c383d19da392d3fcc64ea16bf8203b1fc3f2b14ab82c095141bb6643de507e18ebe7489", "boobies"},
+	{"$LION$bb0489df7b073e715f19f83fd52d08ede24243554450f7159dd65c100298a5820525b55320f48182491b72b4c4ba50d7b0e281c1d98e06591a5e9c6167f42a742f0359c7", "password"},
+	{"$LION$74911f723bd2f66a3255e0af4b85c639776d510b63f0b939c432ab6e082286c47586f19b4e2f3aab74229ae124ccb11e916a7a1c9b29c64bd6b0fd6cbd22e7b1f0ba1673", "hello"},
+	{"$LION$5e3ab14c8bd0f210eddafbe3c57c0003147d376bf4caf75dbffa65d1891e39b82c383d19da392d3fcc64ea16bf8203b1fc3f2b14ab82c095141bb6643de507e18ebe7489", "boobies"},
 	{NULL}
 };
 
@@ -63,9 +63,35 @@ static int valid(char *ciphertext, struc
 
 	/* Require lowercase hex digits (assume ASCII) */
 	pos = ciphertext;
+	if (strncmp(pos, "$LION$", 6))
+		return 0;
+	pos += 6;
 	while (atoi16[ARCH_INDEX(*pos)] != 0x7F && (*pos <= '9' || *pos >= 'a'))
 		pos++;
-	return !*pos && pos - ciphertext == CIPHERTEXT_LENGTH;
+	return !*pos && pos - ciphertext == CIPHERTEXT_LENGTH+6;
+}
+
+static char *prepare(char *split_fields[10], struct fmt_main *pFmt) {
+	char Buf[100];
+	if (!strncmp(split_fields[1], "$LION$", 6))
+		return split_fields[1];
+	if (strlen(split_fields[0]) == CIPHERTEXT_LENGTH) {
+		sprintf(Buf, "$LION$%s", split_fields[0]);
+		if (valid(Buf, pFmt)) {
+			char *cp = mem_alloc_tiny(CIPHERTEXT_LENGTH+7, MEM_ALIGN_NONE);
+			strcpy(cp, Buf);
+			return cp;
+		}
+	}
+	if (strlen(split_fields[1]) == CIPHERTEXT_LENGTH) {
+		sprintf(Buf, "$LION$%s", split_fields[1]);
+		if (valid(Buf, pFmt)) {
+			char *cp = mem_alloc_tiny(CIPHERTEXT_LENGTH+7, MEM_ALIGN_NONE);
+			strcpy(cp, Buf);
+			return cp;
+		}
+	}
+	return split_fields[1];
 }
 
 static void *get_binary(char *ciphertext)
@@ -74,6 +100,7 @@ static void *get_binary(char *ciphertext
 	char *p;
 	int i;
 
+	ciphertext += 6;
 	p = ciphertext + 8;
 	for (i = 0; i < sizeof(out); i++) {
 		out[i] =
@@ -91,6 +118,7 @@ static void *salt(char *ciphertext)
 	char *p;
 	int i;
 
+	ciphertext += 6;
 	p = ciphertext;
 	for (i = 0; i < sizeof(out); i++) {
 		out[i] =
@@ -248,7 +276,7 @@ struct fmt_main fmt_XSHA512 = {
 		tests
 	}, {
 		fmt_default_init,
-		fmt_default_prepare,
+		prepare,
 		valid,
 		fmt_default_split,
 		get_binary,
