├── README.md ├── Release └── rdial.exe ├── rdial.ncb ├── rdial.png ├── rdial.sln └── rdial ├── md5.cpp ├── md5.h ├── rdial.cpp ├── rdial.h ├── rdial.vcproj ├── rdial.vcproj.DESKTOP-TRACKER.Tracker.user ├── rdial.vcproj.TRACKER.Administrator.user ├── stdafx.cpp └── stdafx.h /README.md: -------------------------------------------------------------------------------- 1 | # Rdial 2 | Rdial is a Windows program for the user who want to replace Netkeeper. 3 | You can easily connect to the Internet without install Netkeeper. And also can share your net without the limit of Netkeeper. 4 | You can compile youself or can also download the binary in Release directory. 5 | 6 | ## Usage: 7 | Just put `rdial.exe` in **C:\Windows\** and type the follow command: 8 | `rdial.exe username password` 9 | eg: 10 | `rdial.exe test@cqupt 112233` 11 | 12 | ## Show: 13 | ![](./rdial.png) 14 | 15 | ## Enjoy it! 16 | -------------------------------------------------------------------------------- /Release/rdial.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/Release/rdial.exe -------------------------------------------------------------------------------- /rdial.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial.ncb -------------------------------------------------------------------------------- /rdial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial.png -------------------------------------------------------------------------------- /rdial.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdial", "rdial\rdial.vcproj", "{28686A4A-A0F1-4554-A6FC-2353B7129AC9}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {28686A4A-A0F1-4554-A6FC-2353B7129AC9}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {28686A4A-A0F1-4554-A6FC-2353B7129AC9}.Debug|Win32.Build.0 = Debug|Win32 14 | {28686A4A-A0F1-4554-A6FC-2353B7129AC9}.Release|Win32.ActiveCfg = Release|Win32 15 | {28686A4A-A0F1-4554-A6FC-2353B7129AC9}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /rdial/md5.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "MD5.h" 8 | 9 | /* POINTER defines a generic pointer type */ 10 | typedef unsigned char* POINTER; 11 | 12 | /* UINT2 defines a two byte word */ 13 | typedef unsigned short int UINT2; 14 | 15 | /* UINT4 defines a four byte word */ 16 | typedef unsigned long int UINT4; 17 | 18 | #define PROTO_LIST(list) list 19 | 20 | /* MD5 context. */ 21 | typedef struct _MD5_CTX 22 | { 23 | UINT4 state[4]; /* state (ABCD) */ 24 | UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ 25 | unsigned char buffer[64]; /* input buffer */ 26 | } MD5_CTX; 27 | 28 | /* Constants for MD5Transform routine. 29 | */ 30 | #define S11 7 31 | #define S12 12 32 | #define S13 17 33 | #define S14 22 34 | #define S21 5 35 | #define S22 9 36 | #define S23 14 37 | #define S24 20 38 | #define S31 4 39 | #define S32 11 40 | #define S33 16 41 | #define S34 23 42 | #define S41 6 43 | #define S42 10 44 | #define S43 15 45 | #define S44 21 46 | 47 | static unsigned char PADDING[64] = 48 | { 49 | 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 52 | }; 53 | 54 | /* F, G, H and I are basic MD5 functions. 55 | */ 56 | #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) 57 | #define G(x, y, z) (((x) & (z)) | ((y) & (~z))) 58 | #define H(x, y, z) ((x) ^ (y) ^ (z)) 59 | #define I(x, y, z) ((y) ^ ((x) | (~z))) 60 | 61 | /* ROTATE_LEFT rotates x left n bits. 62 | */ 63 | #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) 64 | 65 | /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. 66 | Rotation is separate from addition to prevent recomputation. 67 | */ 68 | #define FF(a, b, c, d, x, s, ac) { \ 69 | (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac);\ 70 | (a) = ROTATE_LEFT ((a), (s)); \ 71 | (a) += (b); \ 72 | } 73 | #define GG(a, b, c, d, x, s, ac) { \ 74 | (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ 75 | (a) = ROTATE_LEFT ((a), (s)); \ 76 | (a) += (b); \ 77 | } 78 | #define HH(a, b, c, d, x, s, ac) { \ 79 | (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ 80 | (a) = ROTATE_LEFT ((a), (s)); \ 81 | (a) += (b); \ 82 | } 83 | #define II(a, b, c, d, x, s, ac) { \ 84 | (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ 85 | (a) = ROTATE_LEFT ((a), (s)); \ 86 | (a) += (b); \ 87 | } 88 | 89 | #define TEST_BLOCK_LEN 1000 90 | #define TEST_BLOCK_COUNT 1000 91 | 92 | static void MD5Transform PROTO_LIST((UINT4[4], unsigned char [64])); 93 | static void Encode PROTO_LIST((unsigned char *, UINT4 *, unsigned int)); 94 | static void Decode PROTO_LIST((UINT4 *, unsigned char *, unsigned int)); 95 | static void MD5_memcpy PROTO_LIST((POINTER, POINTER, unsigned int)); 96 | static void MD5_memset PROTO_LIST((POINTER, int, unsigned int)); 97 | static void MD5Init PROTO_LIST((MD5_CTX *)); 98 | static void MD5Update PROTO_LIST((MD5_CTX *, unsigned char *, unsigned int)); 99 | static void MD5Final PROTO_LIST((unsigned char [16], MD5_CTX *)); 100 | static void MDTimeTrial PROTO_LIST((void)); 101 | static void StringAddOne PROTO_LIST((char *)); 102 | static void Encode PROTO_LIST((unsigned char *, UINT4 *, unsigned int)); 103 | static void Decode PROTO_LIST((UINT4 *, unsigned char *, unsigned int)); 104 | 105 | /* MD5 initialization. Begins an MD5 operation, writing a new context. 106 | */ 107 | static void MD5Init(MD5_CTX* context) 108 | { 109 | context->count[0] = context->count[1] = 0; 110 | /* Load magic initialization constants. 111 | */ 112 | context->state[0] = 0x67452301; 113 | context->state[1] = 0xefcdab89; 114 | context->state[2] = 0x98badcfe; 115 | context->state[3] = 0x10325476; 116 | } 117 | 118 | /* MD5 block update operation. Continues an MD5 message-digest 119 | operation, processing another message block, and updating the 120 | context. 121 | */ 122 | static void MD5Update(MD5_CTX* context, /* context */ 123 | unsigned char* input, /* input block */ 124 | unsigned int inputLen /* length of input block */) 125 | { 126 | unsigned int i, index, partLen; 127 | 128 | /* Compute number of bytes mod 64 */ 129 | index = (unsigned int) ((context->count[0] >> 3) & 0x3F); 130 | 131 | /* Update number of bits */ 132 | if ((context->count[0] += ((UINT4) inputLen << 3)) < 133 | ((UINT4) inputLen << 3)) 134 | context->count[1]++; 135 | context->count[1] += ((UINT4) inputLen >> 29); 136 | 137 | partLen = 64 - index; 138 | 139 | /* Transform as many times as possible. 140 | */ 141 | if (inputLen >= partLen) 142 | { 143 | MD5_memcpy((POINTER) & context->buffer[index], (POINTER) input, 144 | partLen); 145 | MD5Transform(context->state, context->buffer); 146 | 147 | for (i = partLen; i + 63 < inputLen; i += 64) 148 | MD5Transform(context->state, &input[i]); 149 | 150 | index = 0; 151 | } 152 | else 153 | i = 0; 154 | 155 | /* Buffer remaining input */ 156 | MD5_memcpy((POINTER) & context->buffer[index], (POINTER) & input[i], 157 | inputLen - i); 158 | } 159 | 160 | /* MD5 finalization. Ends an MD5 message-digest operation, writing the 161 | the message digest and zeroizing the context. 162 | */ 163 | static void MD5Final(unsigned char digest[16], /* message digest */ 164 | MD5_CTX* context /* context */) 165 | { 166 | unsigned char bits[8]; 167 | unsigned int index, padLen; 168 | 169 | /* Save number of bits */ 170 | Encode(bits, context->count, 8); 171 | 172 | /* Pad out to 56 mod 64. 173 | */ 174 | index = (unsigned int) ((context->count[0] >> 3) & 0x3f); 175 | padLen = (index < 56) ? (56 - index) : (120 - index); 176 | MD5Update(context, PADDING, padLen); 177 | 178 | /* Append length (before padding) */ 179 | MD5Update(context, bits, 8); 180 | 181 | /* Store state in digest */ 182 | Encode(digest, context->state, 16); 183 | 184 | /* Zeroize sensitive information. 185 | */ 186 | MD5_memset((POINTER) context, 0, sizeof(*context)); 187 | } 188 | 189 | /* MD5 basic transformation. Transforms state based on block. 190 | */ 191 | static void MD5Transform(UINT4 state[4], unsigned char block[64]) 192 | { 193 | UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; 194 | 195 | Decode(x, block, 64); 196 | 197 | /* Round 1 */ 198 | FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ 199 | FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */ 200 | FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */ 201 | FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */ 202 | FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */ 203 | FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */ 204 | FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */ 205 | FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */ 206 | FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */ 207 | FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */ 208 | FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ 209 | FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ 210 | FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ 211 | FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ 212 | FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ 213 | FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ 214 | 215 | /* Round 2 */ 216 | GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */ 217 | GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */ 218 | GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ 219 | GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */ 220 | GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */ 221 | GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */ 222 | GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ 223 | GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */ 224 | GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */ 225 | GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ 226 | GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */ 227 | GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */ 228 | GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ 229 | GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */ 230 | GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */ 231 | GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ 232 | 233 | /* Round 3 */ 234 | HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */ 235 | HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */ 236 | HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ 237 | HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ 238 | HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */ 239 | HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */ 240 | HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */ 241 | HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ 242 | HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ 243 | HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */ 244 | HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */ 245 | HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */ 246 | HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */ 247 | HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ 248 | HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ 249 | HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */ 250 | 251 | /* Round 4 */ 252 | II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */ 253 | II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */ 254 | II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ 255 | II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */ 256 | II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ 257 | II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */ 258 | II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ 259 | II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */ 260 | II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */ 261 | II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ 262 | II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */ 263 | II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ 264 | II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */ 265 | II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ 266 | II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */ 267 | II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */ 268 | 269 | state[0] += a; 270 | state[1] += b; 271 | state[2] += c; 272 | state[3] += d; 273 | 274 | /* Zeroize sensitive information. 275 | */ 276 | MD5_memset((POINTER) x, 0, sizeof(x)); 277 | } 278 | 279 | /* Encodes input (UINT4) into output (unsigned char). Assumes len is 280 | a multiple of 4. 281 | */ 282 | static void Encode(unsigned char* output, UINT4* input, unsigned int len) 283 | { 284 | unsigned int i, j; 285 | 286 | for (i = 0, j = 0; j < len; i++, j += 4) 287 | { 288 | output[j] = (unsigned char) (input[i] & 0xff); 289 | output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff); 290 | output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff); 291 | output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff); 292 | } 293 | } 294 | 295 | /* Decodes input (unsigned char) into output (UINT4). Assumes len is 296 | a multiple of 4. 297 | */ 298 | static void Decode(UINT4* output, unsigned char* input, unsigned int len) 299 | { 300 | unsigned int i, j; 301 | 302 | for (i = 0, j = 0; j < len; i++, j += 4) 303 | output[i] = ((UINT4) input[j]) | 304 | (((UINT4) input[j + 1]) << 8) | 305 | (((UINT4) input[j + 2]) << 16) | 306 | (((UINT4) input[j + 3]) << 24); 307 | } 308 | 309 | /* Note: Replace "for loop" with standard memcpy if possible. 310 | */ 311 | static void MD5_memcpy(POINTER output, POINTER input, unsigned int len) 312 | { 313 | unsigned int i; 314 | 315 | for (i = 0; i < len; i++) 316 | output[i] = input[i]; 317 | } 318 | 319 | /* Note: Replace "for loop" with standard memset if possible. 320 | */ 321 | static void MD5_memset(POINTER output, int value, unsigned int len) 322 | { 323 | unsigned int i; 324 | 325 | for (i = 0; i < len; i++) 326 | ((char *) output)[i] = (char) value; 327 | } 328 | 329 | /* Digests a string and prints the result. 330 | */ 331 | char* MD5String(char* string, unsigned len) 332 | { 333 | MD5_CTX context; 334 | unsigned char digest[16]; 335 | char output1[34]; 336 | static char output[33] = 337 | { 338 | 0 339 | }; 340 | // unsigned int len = (int)strlen(string); 341 | int i; 342 | 343 | MD5Init(&context); 344 | MD5Update(&context, (unsigned char *) string, len); 345 | MD5Final(digest, &context); 346 | 347 | for (i = 0; i < 16; i++) 348 | { 349 | sprintf(&(output1[2 * i]), "%02x", (unsigned char) digest[i]); 350 | sprintf(&(output1[2 * i + 1]), "%02x", 351 | (unsigned char) (digest[i] << 4)); 352 | } 353 | for (i = 0; i < 32; i++) 354 | { 355 | output[i] = output1[i]; 356 | } 357 | return output; 358 | } 359 | 360 | /* get the string add one. 361 | */ 362 | static void StringAddOne(char* orstring) 363 | { 364 | unsigned int len; 365 | int i, n; 366 | 367 | len = strlen(orstring); 368 | n = len - 1; 369 | for (i = n; i >= 0; i--) 370 | { 371 | if (orstring[i] == '9') 372 | { 373 | orstring[i] = 'A'; 374 | break; 375 | } 376 | else if (orstring[i] == 'Z') 377 | { 378 | orstring[i] = 'a'; 379 | break; 380 | } 381 | else if (orstring[i] == 'z') 382 | { 383 | orstring[i] = '0'; 384 | continue; 385 | } 386 | else 387 | orstring[i] += 1; 388 | break; 389 | } 390 | } 391 | 392 | /* check the md5 strings one by one,get the password. 393 | */ 394 | bool MD5Check(char* md5string, char* string) 395 | { 396 | int lenth = 0; 397 | return strcmp(md5string, MD5String(string, lenth)) == 0; 398 | } 399 | -------------------------------------------------------------------------------- /rdial/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef _MD5_H_ 2 | #define _MD5_H_ 3 | 4 | 5 | char* MD5String(char* string, unsigned len); 6 | 7 | 8 | bool MD5Check(char* md5string, char* string); 9 | 10 | #endif //_MD5_H_ 11 | -------------------------------------------------------------------------------- /rdial/rdial.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial/rdial.cpp -------------------------------------------------------------------------------- /rdial/rdial.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial/rdial.h -------------------------------------------------------------------------------- /rdial/rdial.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial/rdial.vcproj -------------------------------------------------------------------------------- /rdial/rdial.vcproj.DESKTOP-TRACKER.Tracker.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /rdial/rdial.vcproj.TRACKER.Administrator.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /rdial/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial/stdafx.cpp -------------------------------------------------------------------------------- /rdial/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/purpleroc/Rdial/c720d72732ed21e162a6159d9166cf4946647a7e/rdial/stdafx.h --------------------------------------------------------------------------------