summaryrefslogtreecommitdiff
blob: 7fdda83b0ea81967cd89d893b7e3f6b3d04a332f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
diff --exclude='*~' -ur gyach-0.9.7.orig/src/yahoo_fn.c gyach-0.9.7/src/yahoo_fn.c
--- gyach-0.9.7.orig/src/yahoo_fn.c	2004-01-22 23:12:36.000000000 -0600
+++ gyach-0.9.7/src/yahoo_fn.c	2004-07-01 09:38:10.989741680 -0500
@@ -4388,7 +4388,7 @@
      { XOR, 0x77D64B90, 0 },
      { BITFLD, (int)table_103, 0 },
      { LOOKUP, (int)table_104, 0 },
-     { MULADD, 0x7D1428CB, 0x89F6853D },
+     { MULADD, 0x7D1428CB, 0x3D },
      { XOR, 0x6F872C49, 0 },
      { XOR, 0x2E484655, 0 },
      { MULADD, 0x1E3349F7, 0x41F5 },
diff --exclude='*~' -ur gyach-0.9.7.orig/src/yahoo_md5.c gyach-0.9.7/src/yahoo_md5.c
--- gyach-0.9.7.orig/src/yahoo_md5.c	2004-01-22 23:18:11.000000000 -0600
+++ gyach-0.9.7/src/yahoo_md5.c	2004-07-01 09:35:11.632008200 -0500
@@ -175,7 +175,7 @@
 
 }
 
-static void yahoo_process_auth_new(char *username, char *password, char *seed)
+static void yahoo_process_auth(char *username, char *password, char *seed)
 {
 	char *name = username;
 	char *pass = password;
@@ -424,6 +424,8 @@
 	 * challenge. */
 	
 	shaUpdate(&ctx1, pass_hash_xor1, 64);
+	if (j >= 3)
+		ctx1.sizeLo = 0x1ff;
 	shaUpdate(&ctx1, magic_key_char, 4);
 	shaFinal(&ctx1, digest1);
 	
@@ -513,6 +515,8 @@
 	 * challenge. */
 	
 	shaUpdate(&ctx1, crypt_hash_xor1, 64);
+	if (j >= 3)
+		ctx1.sizeLo = 0x1ff;
 	shaUpdate(&ctx1, magic_key_char, 4);
 	shaFinal(&ctx1, digest1);
 	
@@ -585,22 +589,12 @@
 }
 
 char *getstr1(char *username, char *password, char *key) {
-	yahoo_process_auth_old(username, password, key);
-	return result6;
-}
-
-char *getstr2(char *username, char *password, char *key) {
-	yahoo_process_auth_old(username, password, key);
-	return result96;
-}
-
-char *getstr1_new(char *username, char *password, char *key) {
-	yahoo_process_auth_new(username, password, key);
+	yahoo_process_auth(username, password, key);
 	return resp_6;
 }
 
-char *getstr2_new(char *username, char *password, char *key) {
-	yahoo_process_auth_new(username, password, key);
+char *getstr2(char *username, char *password, char *key) {
+	yahoo_process_auth(username, password, key);
 	return resp_96;
 }
 
diff --exclude='*~' -ur gyach-0.9.7.orig/src/yahoo_md5.h gyach-0.9.7/src/yahoo_md5.h
--- gyach-0.9.7.orig/src/yahoo_md5.h	2003-09-28 09:26:28.000000000 -0500
+++ gyach-0.9.7/src/yahoo_md5.h	2004-07-01 09:36:30.858963872 -0500
@@ -2,8 +2,5 @@
 char *getstr1(char *username, char *password, char *key);
 char *getstr2(char *username, char *password, char *key);
 
-char *getstr1_new(char *username, char *password, char *key);
-char *getstr2_new(char *username, char *password, char *key);
-
 char *yahoo_crypt(char *key, char *salt);
 
diff --exclude='*~' -ur gyach-0.9.7.orig/src/yahoochat.c gyach-0.9.7/src/yahoochat.c
--- gyach-0.9.7.orig/src/yahoochat.c	2003-09-28 17:55:02.000000000 -0500
+++ gyach-0.9.7/src/yahoochat.c	2004-07-01 09:36:44.625870984 -0500
@@ -380,9 +380,9 @@
 
 	sprintf( ptr, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 		"0", YMSG9_SEP, session->user, YMSG9_SEP,
-		"6", YMSG9_SEP, getstr1_new( session->user, session->password, key ),
+		"6", YMSG9_SEP, getstr1( session->user, session->password, key ),
 			YMSG9_SEP,
-		"96", YMSG9_SEP, getstr2_new( session->user, session->password, key ),
+		"96", YMSG9_SEP, getstr2( session->user, session->password, key ),
 			YMSG9_SEP,
 		"2", YMSG9_SEP, session->user, YMSG9_SEP,
 		"1", YMSG9_SEP, session->user, YMSG9_SEP