Nov 21, 2009

Kenh xem truyen hinh truc tuyen hay

http://tv.xunghe.vn/?tab=vtv&xem=vtv3
Đọc tiếp →
-->đọc tiếp...

Nov 19, 2009

YMSG16

YMSG16

This will be used to document the YMSG16 protocol

The Yahoo Packet

Header

Header size is 20 bytes and include the following:

Y  M  S  G       16     100      16     138             0     65159168
59 4d 53 47 | 00 10 | 00 64 | 00 10 | 00 8a | 00 00 00 00 |00 40 e2 03

In our example the service name is of-course YMSG, the protocol version is 16, the VendorId flag is always set to 0 for windows client(and libpurple) and 100 for mac client, and the length of our packet is 138 bytes.

The service code in this example is 0x8a or 138 which is the YAHOO_SERVICE_KEEPALIVE of a simple ping.

The status code is basic status of the message.

Status_Codes

Status Code Hex
Client Request 0 0x00000000
Server Response 1 0x00000001
Available 0 0x00000000
Be Right Back 1 0x00000001
Unknown 1515563605 0x5a55aa55
Offline 1515563606 0x5a55aa56

Client Request

Data

For the remainder of this document, packets will be written in the following format:

  YMSG_SERVICE_AUTH, YMSG_STATUS_AVAILABLE
1: YahooID

Where YMSG_SERVICE_AUTH is the service code and YMSG_STATUS_AVAILABLE is the status sent in the header. The numbers following this are the key/value pairs sent in the body of the message. Refer to the table in ServiceCodes below for the meaning and values of the YMSG constants.

In all places where a Yahoo ID is mentioned, this ID should be all lowercase.

ServiceCodes

Service Service Code
YMSG_STATUS_AVAILABLE 0x00
YMSG_SERVICE_AUTH 0x57
YMSG_SERVICE_AUTHRESP 0x54
YMSG_SERVICE_NOTIFY 0x4B
YMSG_SERVICE_MESSAGE 0x09
YMSG_SERVICE_LOGON 0x01

Authentication

To begin the auth process, the client connects to the YMSG server at cs101.msg.sp1.yahoo.com or other auth server, and sends the YMSG_SERVICE_AUTH packet.

  YMSG_SERVICE_AUTH, YMSG_STATUS_AVAILABLE
1: YahooID

The YahooID is the primary ID that the client is attempting to sign on with. It probably should be all lowercase.

If successful, the server will respond with an auth challenge. This packet from the server will look like this:

  YMSG_SERVICE_AUTH, YMSG_STATUS_AVAILABLE
1: YahooID
13: 2
94: challenge string

1 is your primary YahooID, 13 is usually 2 (???), and 94 is the challenge string. The challenge string is the most important field here.

With the challenge string the client needs to make an HTTPS POST request to the following URL with the following parameters:

  POST https://login.yahoo.com/config/pwtoken_get
src
=ymsgr
ts
=
login
=YahooID
passwd
=password
chal
=challenge

YahooID is the primary ID, password is their cleartext password, and challenge is the auth challenge received from the server.

If successful, the reply from this page will look like this:

  0
ymsgr
=AEejLkUy6t02kuZ_UXdifPhDOaZ1pXGWBIiGuw55QUksy0U-
partnerid
=pXGWBIiGuw55QUksy0U-

If the first line is the number 0, it was successful. Other numbers mean different things.

The ymsgr= value is the most important part here; it's an auth token. With the token, we make another HTTPS request:

  POST https://login.yahoo.com/config/pwtoken_get
src
=ymsgr
ts
=
token
=AEejLkUy6t02kuZ_UXdifPhDOaZ1pXGWBIiGuw55QUksy0U-

Pass the token as a param here. If successful, you'll get a reply back like this:

  0
crumb
=XLs.4fhxC8O
Y
=v=1&n=1juip...; path=/; domain=.yahoo.com
T=z=mI8tKBmOR...; path=/
; domain=.yahoo.com
cookievalidfor
=86400

There are three important fields in here: crumb, Y, and T. Y and T are cookies; you'll need these to complete the auth. The following regular expressions in Perl extract the right data from these cookies:

  $Yv = ($ycookie =~ /^Y=(.+?)$/);
$Tz
= ($tcookie =~ /^T=(.+?)$/);

At this point we have: the original auth challenge, the token, the crumb, and the Yv and Tz cookies. To complete the authentication we need to simply make an MD5 hash of the crumb and challenge, encode it with Y64 (Yahoo's version of Base64), and send the AUTHRESP packet.

Here is some Perl code for the MD5 hashing and Y64 encoding:

  sub auth16 {
my ($crumb,$challenge) = @_;

# Concat the crumb in front of the challenge
my $crypt = $crumb . $challenge;

# Make an MD5 hash of it
my $md5_ctx = Digest::MD5->new();
$md5_ctx
->add ($crypt);
my $md5_digest = $md5_ctx->digest();

# Encode in Y64
my $base64_str = _to_y64($md5_digest);

return $base64_str;
}

# Y64 encoding function, adapted from PHP
sub _to_y64 {
my $source_str = shift;
my @source = split(//, $source_str);
my @yahoo64 = split(//, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._");
my $limit = length($source_str) - (length($source_str) % 3);
my $dest = "";
my $i;
for ($i = 0; $i < $limit; $i += 3) {
$dest
.= $yahoo64[ ord($source[$i]) >> 2];
$dest
.= $yahoo64[ ((ord($source[$i]) << 4) & 0x30) | (ord($source[$i + 1]) >> 4) ];
$dest
.= $yahoo64[ ((ord($source[$i + 1]) << 2) & 0x3C) | (ord($source[$i + 2]) >> 6)];
$dest
.= $yahoo64[ ord($source[$i + 2]) & 0x3F ];
}

my $switch = length($source_str) - $limit;
if ($switch == 1) {
$dest
.= $yahoo64[ ord($source[$i]) >> 2];
$dest
.= $yahoo64[ (ord($source[$i]) << 4) & 0x30 ];
$dest
.= '--';
}
elsif ($switch == 2) {
$dest
.= $yahoo64[ ord($source[$i]) >> 2];
$dest
.= $yahoo64[ ((ord($source[$i]) << 4) & 0x30) | (ord($source[$i + 1]) >> 4)];
$dest
.= $yahoo64[ ((ord($source[$i + 1]) << 2) & 0x3C) ];
$dest
.= '-';
}

return $dest;
}

The result of the hashing and encoding we'll call the Auth16 hash. Complete the authentication with the following packet:

  YMSG_SERVICE_AUTHRESP, YMSG_STATUS_AVAILABLE
1: YahooID
0: YahooID
277: Yv Cookie
278: Tz Cookie
307: Auth16 hash
244: 4194239
2: YahooID
2: 1
98: us
135: 9.0.0.2162

Fields 0, 1, and 2 contain the primary Yahoo ID. 277 and 278 are the Y=v and T=z cookies you got earlier in the auth process. 307 is the Y64-encoded auth hash. 244 is the internal build number and will be exactly the number given there. There is an additional "2" key with the value of 1. 98 is the country code ("us" here), and 135 is the YMSG version number (taken from the "About Yahoo Messenger" dialog in the official client).

If successful, the server sends you your buddy list and some other packets.

Examples

Sending and receiving messages

Sending:

  YMSG_SERVICE_MESSAGE, YMSG_STATUS_AVAILABLE
0: YahooID
1: ActiveID
5: TargetID
14: Message

YahooID is our ID to send the message from. ActiveID is the primary Yahoo ID currently logged in (usually this will be the same as YahooID, unless you have multiple IDs). TargetID is the user you're sending the message to, and Message is the message.

Receiving:

  YMSG_SERVICE_MESSAGE, YMSG_STATUS_AVAILABLE
5: our YahooID
4: their YahooID
14: their message

5 is our ID, 4 is the ID of the sender, and 14 is the message.

Buzzing a User

To "buzz" a user, simply send a message where the Message is .

Sending/Receiving Typing Notifications

Sending:

  YMSG_SERVICE_NOTIFY, YMSG_STATUS_AVAILABLE
4: our YahooID
5: target's YahooID
13: typing status (0 or 1)
14: space character '
'
49: literal text "TYPING"

Typing status is 1 for typing started and 0 for typing stopped. 14 is literally a space, and 49 is literally the text "TYPING" (with no quotes).

Receiving:

  YMSG_SERVICE_NOTIFY, YMSG_STATUS_AVAILABLE
4: their YahooID
5: our YahooID
49: literal text "TYPING"
13: typing status (0 or 1)
14: space character ' '

Most of these fields are similar to sending typing notification. Note that 4 and 5 are swapped, though. Here 5 is our ID and 4 is the ID of the other person.

YMSG_STATUS_AVAILABLE

  YMSG_SERVICE_STATUS?, YMSG_STATUS_AVAILABLE
59 4d 53 47 00 10 00 64 00 18 00 c7 00 00 00 00 YMSG...d........
00 56 ba 91 33 c0 80 6d 61 74 74 2e 61 75 73 74 .V..3..matt.aust
69 6e c0 80 32 31 33 c0 80 32 c0 80 in..213..2..
Đọc tiếp →
-->đọc tiếp...

Yahoo! Authentication Schemes

Yahoo! Authentication Schemes
Written by SlicK, RSTZone.org
Author: SlicK
Email: slick@rstzone.org
Website: http://rstzone.org or http://en.rstzone.org

This article is a result of about 2 weeks of research, tests and lots of hard work and will cover a few aspects related to Yahoo! that some of you may already know but nonetheless, i find them interesting. The purpose is to shed some light on a few "myths" about yahoo! and to answer some of the questions related to them.

Part I. "yahoo64" Encoding Algorithm
Part II. Analysis of the Yahoo Token
Part III. Yahoo! Messenger - "Remember my ID and Password"
Part IV. YMSGR v15 Authentication
Part V. The analysis and explanation of Yahoo! cookies

Part I. "yahoo64" Encoding Algorithm

This Algorithm is used by Yahoo! anywhere there is a need to transform a string of non-printable characters into a printable one.
Its called coding not crypting because it does not offer any protection for the string of characters to be coded. Without going into to many cryptographic details, we need to mention that yahoo64 is very similar to base64 but its charset is longer(two more chars).
For yahoo64 the charset is: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"

yahoo64 has a few characteristics that need to be mentioned:
- all the characters from the coded string are part of the above mentioned charset
- the length of the string is a multiple of 4
- based on the length of the initial string, the end of the crypted string may be "-" or "--"
* Note: for further details, study the 2 php functions (for coding and decoding) at the end of this article

Part II. Analysis of the Yahoo Token

From what i've noticed so far, the Yahoo! token is a sum of the user and password, unique for each username and is changed in part, every time the password is changed. Basically, owning this token means that you are either the owner of the account (username) or an entity who has the permission from its owner to act in his/her name on yahoo servers.

The user ca obtain his token by accessing this link:
Code:

where USERNAME and PASSWORD are a valid username/password combination.
This token is useful because it can offer a valid yahoo COOKIE anytime.
Code:

An example of response to a request to "https://login.yahoo.com/config/pwtoken_get" can be this:
Code:
0
ymsgr=AGG6e0diD9m.3D4YlFPVcdBT1wFXKSBWP0Hl.gyQKd.qec8-
partnerid=KSBWP0Hl.gyQKd.qec8-
"ymsgr" is the token i spoke about earlier and as we can see, "partnerid" is part of this token (at the end). This "partnerid" is unique for each user and does not change even if you change the password. Its length varies upon the length of the username.
As you can see, the length of the token is 48(multiple of 4) and ends in "-" which shows us that it is coded with yahoo64. After decoding, we get the following string of characters (where every 2 characters represent the hexadecimal value of a single character of the decoded token):

Code:
00 61 BA 7B 47 62 0F D9 BE DC 3E 18 94 53 D5 71 D0 53 D7 01 57 29 20 56 3F 41 E5 FA 0C 90 29 DF AA 79 CF
All the tokens i've seen so far had the first character "0x00"
The following 4 characters represent the "timestamp" (the number of seconds elapsed since 1-1-1970) when the user was created or when the password was changed, only that the "timestamp" is reversed. For an instance, in the above given example, the "timestamp" will be 0x477BBA61(decimal 1199290977) which means "Wed, 2 Jan 2008 16:22:57 GMT"

Decoding "partnerid" we get the following string:
Code:
29 20 56 3F 41 E5 FA 0C 90 29 DF AA 79 CF

which, as we can see are the last 14 characters at the end of the token.
If we eliminate the first character (00) from the token, the "timestamp"(61 BA 7B 47) and the decoded "partnerid" we will have only this
Code:
62 0F D9 BE DC 3E 18 94 53 D5 71 D0 53 D7 01 57
The resulting string has 16 characters which leads to the conclusion that it is a hash MD5 (md5() produces a 128 bits hash meaning 16 characters between 0x00 and 0xFF. Not to be mistaken for md5_hex() which results a string of 32 characters representing the hexadecimal values of the 16 characters produced by md5() )
When changing the password, only the "timestamp" is modified and this MD5 hash. This leads me to think that either the timestamp or the password or both are part of the initial string (that produces the hash).
I need to mention for those that want to run some tests, that this token need to be kept SECRET because, as i said before, revealing the token can compromise the account. (you dont need to know the password in order to obtain a set of cookies).
Part III. Yahoo! Messenger - "Remember my ID and Password"

Starting with version 7.x.x.x Yahoo! Messenger doesn't memorize the password when the "Remember my ID and Password"is checked. Instead, it retains the token I spoke of earlier since the token is enough for a successful authentication.

The token is crypted and saved at this key in the windows registry:
Code:
HKEY_CURRENT_USER\Software\Yahoo\Pager\ETS

The user is also saved(as it is needed for decoding) at this key:
Code:
HKEY_CURRENT_USER\Software\Yahoo\Pager\Yahoo! User ID
The analysis i ran on a ETS string is pretty brief: the token is crypted using a key made of "MBCS sucks + USERNAME". The resulting string is then coded with "yahoo64" and saved in the registry's under the ETS key.

This is an example of an ETS string
Code:
R3_oNgAARNmYGcE.D8dcDOwRohZ0PzaYM2fgN6pFI8a8grRcaEq6zfXUNNUVm2MnuufdKTETuB9cKmcaarY0O4dJVHBsUw5gNw--

This is the result after decoding:
Code:
47 7F E8 36 00 00 44 D9 98 19 C1 3E 0F C7 5C 0C EC 11 A2 16 74 3F 36 98 33 67 E0 37 AA 45 23 C6 BC 82 B4 5C 68 4A BA CD F5 D4 34 D5 15 9B 63 27 BA E7 DD 29 31 13 B8 1F 5C 2A 67 1A 6A B6 34 3B 87 49 54 70 6C 53 0E 60 37

The only thing i noticed about this string is that the first 4 characters are the timestamp when this string was created (upon login)

Part IV. YMSGR v15 Authentication
I will assume you are already familiar with Yahoo! Messenger protocol (package forming and parameters)
For compatibility reasons, YMSGR15 accepts also the classical login (with user/password). Yet, more important is the fact that it uses
COOKIE authentication (based on token).
For a successful login Yahoo! Messenger follows these steps:
- If the "Remember my ID & password" tick box is checked, it decrypts the ETS string and obtain a token. If not, it will use the
username and password to make a request at: "https://login.yahoo.com/config/pwtoken_get" to get the token
- Once connected to one of the yahoo servers, it sends a VERIFY package (0x4C)
- If it receives a valid VERIFY reply from the server, it begins the authentication procedure
- Sends an AUTH package (0x57) with the following parameters:
"1" - USERNAME
- Receives a "AUTHRESP" package (0x54) from which it extracts the value of parameter "94" (CHALLANGE)
- Having a valid token of the user, it will make a request to "https://login.yahoo.com/config/pwtoken_login" o obtain the "Y" and "T"
values of the cookie as well as the "crumb" value (CRUMB)
- It creates a string (STRING307) like this: yahoo64(md5(CRUMB+CHALLENGE))
- Then it send an AUTHRESP package (0x54) with parameters:
"277" - parameter Y
"278" - parameter T
"307" - STRING307
"0" - USERNAME
"2" - USRNAME
"2" - "1"
"1" - USERNAME
"244" - a random number (ex. "2097087")
"98" - "us"
"135" - client version (ex. "8.1.0.421")
"148" - "-120"
- If everything is OK the user is authenticated and the server sends the buddy list and other info such as new mails, add buddy
request and so on.
Part V. The analysis and explanation of Yahoo! cookies
Once the user is authenticated by a Yahoo service, he will receive the "Y" and "T" so my analysis was focused on these 2 cookies.
The Y cookie can be configured to expire anytime between 15 mins to 24 hours. The T cookie usually expires when you close your browser or when you logout form the account. For services with low security such as the "My Yahoo" page, the Y cookie is enough but for the more important ones, mail, calendar, etc. the T cookie is a must. As you probably noticed a Yahoo cookie is made in pairs "parameters=value". Further on, i will analyze the parameters that form each cookie and i will try to come with an explanation for their presence and purpose.
The Y cookie:
Example:
Code:
Y=v=1&n=9mioklmar8tku&l=glagla/o&p=m2509oh012000000&r=in&lg=en-US&intl=us&np=1
Contains the username, an unique ID and a few demographic informations. Usually this remains unchanged for a user and the only thing that will be modified is the unique ID(when you change the password) and the demographic informations (when you change the address, language and so on).
As we can see, it is made of the "v", "n", "l", "p", "r", "l", "g", "intl" and "np" parameters but not all of them are necessary for a successful identification of a user.
The "n" parameter is an unique internal ID of the user (it is changed only when changing the password) which is compared to an yahoo internal value on certain requests in order to obtain information or for the automatic expiration of all of the old cookies when changing the password.
The "l" parameter is the username encoded with a simple algorithm where each character of the user has a correspondent in a different string as follows:

Code:
PLAINTXT=klmnopqrstuvwxyz0123457896abcdefghij._
ENCODED=abcdefghijklmnopqrstuvxyzw0123456789._

Thus, for this cookie the username is "qvkqvk"
The "p" parameter contains personal info of the user: age, gender, date of birth, country, etc.
The rest of the parameters also contain information about language, certain settings, etc.

The T cookie
Example:
Code:
T=z=Cr7eHBCxQfHBJkF/Bqb4dnUMzIwBjVPNDQzNDFOME8-&a=QAE&sk=DAAk3Lb2EiyEEM&ks=EAA3i37q0zwFhuCnF6cflaKHg--
~A&d=c2wBTkRVM0FUSTRNek0wTXpZNU56Zy0BYQFRQUUBenoBQ3I3ZUhCZ1dBAXRpcAFzNkpUZEM-
Contains timestamps and a symmetrical digital signature. This is changed only when response time from the yahoo server is modified (regardless of how many cookies are generated in a second, they are identical)
It is made of parameters "z", "a", "sk", "ks", and "d" but to be authenticated by the web services you only need the sk,ks and d parameters but for Yahoo! Messenger authentication the "z" parameter is mandatory.
The "z" parameter exists for compatibility with older services and it is in close connection with the CRUMB value used for Yahoo! Messenger authentication, Tis parameter contains two timestamps(in Yahoo format), a random 11 characters string and a yahoo64 encoded string.
The best analogy i can give to explain the Yahoo timestamp is to compare it to the km/mileage gauge on a car. Each character (from left to right) can be compared with a gear with the values from the charset(yahoo64 charset where "_" is replaced by "/"). When the first character finishes a complete rotation, through all the positions, the second characters goes goes up one step.This process continues like this until the 6th character. Since we know that the first character goes up one step per second we can calculate the timestamp in UNIX format.
The first 6 chars from the "z" parameter are the timestamp when the cookie was created(upon successful authentication), the next 6 are the timestamp when the cookie expires(24 hours after the first timestamp). The next 11 characters change randomly and i haven't explained their presence yet (although i presume it has something to do with the CRUMB). The remaining characters left are a yahoo64 encoded string which decoded looks like this(for the above example).
Where [SEP] is the hexadecimal character 0x06

Code:
320[SEP]5O44341N0O
The "a" parameter (it usually has the value "QAE") contains flags for expiration and under-age child protection.
The "sk" parameter represents the session (session key) and is calculated out of the username, unique ID and timestamp as well as of a string known only by Yahoo! servers (Yahoo shared secret)
The "ks" parameter is (by my observations) a hash of the user's password or another string which replaces the password cause without its presence would lead to a request to input the password (on Yahoo servers).
If we ignore the first 3 characters which are changing ("DAA") and the last 2 characters which also remains unchanged ("~A") we get a yahoo64 coded string which most probably represents an MD5 hash (the decoded string has 16 characters) which is most likely generated by using a shared secret.
The "d" parameter contains the users' session and a few compatibility informations.
This is a yahoo64 coded string. After decoding the "d" value from the given example we will have the following string:

Code:
sl[SEP]NDU3ATI4MzM0MzY5Nzg-[SEP]a[SEP]QAE[SEP]zz[SEP]Cr7eHBgWA[SEP]tip[SEP]s6JTdC

You can notice that this string is also a paired "parameter=value" one.
Code:
sl=NDU3ATI4MzM0MzY5Nzg-&a=QAE&zz=Cr7eHBgWA&tip=s6JTdC

The value of the "sl" parameter is also a yahoo64 coded string:
Code:
457[SEP]2833436978 (or 457=2833436978)

This is number is unique for each user and does not modify even if you change the password.
The 'a" parameter is the same with one from the "T" cookie.

The "zz" parameter represents the timestamp(in Yahoo format) when the cookie was created(same as the first timestamp from the "z" parameter) and 3 extra characters.

The "tip" parameter is the same for all Yahoo! users but is changing periodically(i don't know the exact interval).

Thats about it. Congratulations to those who been patient enough to read it through the end.

The yahoo64 algorithm
Code:
//yahoo64 encode/decode functions by SlicK [slick@rstzone.org]
function yahoo64_encode($source)
{
$yahoo64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";
$limit=strlen($source)-(strlen($source)%3);
$dest="";
for($i=0;$i<$limit;$i+=3)
{
$dest.=$yahoo64[ord($source[$i])>>2];
$dest.=$yahoo64[((ord($source[$i])<<4)&0x30)>>4)];
$dest.=$yahoo64[((ord($source[$i+1])<<2)&0x3c)>>6)];
$dest.=$yahoo64[ord($source[$i+2])&0x3F];
}
switch(strlen($source)-$limit)
{
case 1:
{
$dest.=$yahoo64[ord($source[$i])>>2];
$dest.=$yahoo64[(ord($source[$i])<<4)&0x30];
$dest.='--';
} break;
case 2:
{
$dest.=$yahoo64[ord($source[$i])>>2];
$dest.=$yahoo64[((ord($source[$i])<<4)&0x30)>>4)];
$dest.=$yahoo64[((ord($source[$i+1])<<2)&0x3c)];
$dest.='-';
} break;
}
return($dest);
}
function Index($string,$chr)
{
for($i=0;$i<64;$i++) { if($string[$i]==$chr) { return($i); } } return(-1);
}
function yahoo64_decode($source)
{
$yahoo64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";
$len=strlen($source);
if($source[$len-1]=='-') { $plus=2; }
if($source[$len-2]=='-') { $plus=1; }
if($plus>0) { $len-=4; };
$dest="";
for($i=0;$i<$len;$i+=4)
{
$chr1=Index($yahoo64,$source[$i]);
$chr2=Index($yahoo64,$source[$i+1]);
$chr3=Index($yahoo64,$source[$i+2]);
$chr4=Index($yahoo64,$source[$i+3]);
$dest.=chr(($chr1<<2)|($chr2>>4));
$dest.=chr((($chr2&0xF)<<4)|($chr3>>2));
$dest.=chr((($chr3&0x3)<<6)|($chr4&0x3F));
}
switch($plus)
{
case 1:
{
$chr1=Index($yahoo64,$source[$i]);
$chr2=Index($yahoo64,$source[$i+1]);
$dest.=chr(($chr1<<2)|($chr2>>4));
} break;

case 2:
{
$chr1=Index($yahoo64,$source[$i]);
$chr2=Index($yahoo64,$source[$i+1]);
$chr3=Index($yahoo64,$source[$i+2]);
$dest.=chr(($chr1<<2)|($chr2>>4));
$dest.=chr((($chr2&0xF)<<4)|($chr3>>2));
} break;
}
return($dest);
}
//usage example
$string="any string";
print("Original string=$string
\n");
$encoded=yahoo64_encode($string);
print("Encoded string=$encoded
\n");
$decoded=yahoo64_decode($encoded);
print("Decoded string=$decoded
\n");
?>
Đọc tiếp →
-->đọc tiếp...

Nov 17, 2009

Trang j2me hay

http://www.java2s.com/Code/Java/J2ME/Game.htm Đọc tiếp →
-->đọc tiếp...

Nov 12, 2009

Yahoo's YMSG Protocol v16

Yahoo's YMSG Protocol v16

This is my findings on version 16 of Yahoo's YMSG protocol.

Servers

cs101.msg.sp1.yahoo.com - cs130.msg.sp1.yahoo.com
cs101.msg.ac4.yahoo.com - cs130.msg.ac4.yahoo.com

Login

First we send the usual empty packet type 4C just to tell the server we are about to login

Next we send packet type 57 which only contains field type 1 containing our username

Yahoo's reply to this is packet type 57 which contains the following fields

  1  - Our username
13 - Something to do with our status. Should be set to 2 in this reply
94 - The challenge string
We then take the challenge string and use it to retrieve this url
  https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=USERNAME&passwd=PASSWORD&chal=CHALLENGESTRING
The reply to this will depend on if we have the correct information or not. The first line of the response will always be an integer indicating various things.
If the integer is 0 then the information we have supplied is correct.
100 - if username or password is missing.
1013 - username contains @yahoo.com or similar which needs removing.
1212 - is the username or password is incorrect.
1213 - is a security lock from to many failed login attempts
1214 - is a security lock
1218 - if the account has been deactivated by Yahoo
1235 - if the username does not exist.
1236 - locked due to to many login attempts
Seems to work just as well without the challenge string though.
Anyway if the username and password is correct the second line of the reply will be our token as such
  ymsgr=OURTOKEN
It has a third line as well but this serves no purpose to us.

Once we have our token we use it to retrieve this url
  https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=OURTOKEN
Again the first line of the reply is an intger to indicate the status with 0 being good and 100 meaning something is wrong.
Line 2 is our crumb as
  crumb=OURCRUMB
The next two lines contain our Y= cookie and T= cookie respectively. The last line is the life of the cookie.

Now we return back to normal YMSG

First we need to get a hash using the crumb and the challenge string. It just uses the standard Yahoo Base64 variation.
  Function for hashing the crumb

Public Function ProcessAuth16(ByVal Crumb As String, ByVal Challenge As String)
Dim Crypt As String = String.Join(String.Empty, New String() {Crumb, Challenge})
Dim Hash As Byte() = HashAlgorithm.Create("MD5").ComputeHash(Encoding.[Default].GetBytes(Crypt))
Dim Auth As String = Convert.ToBase64String(Hash).Replace("+", ".").Replace("/", "_").Replace("=", "-")
Return Auth.ToString
End Function
Here is the function as used in Pidgin
  /* This is the y64 alphabet... it's like base64, but has a . and a _ */
static const char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";

/* This is taken from Sylpheed by Hiroyuki Yamamoto. We have our own tobase64 function
* in util.c, but it has a bug I don't feel like finding right now ;) */
static void to_y64(char *out, const unsigned char *in, gsize inlen)
/* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated) */
{
for (; inlen >= 3; inlen -= 3)
{
*out++ = base64digits[in[0] >> 2];
*out++ = base64digits[((in[0] <<>> 4)];
*out++ = base64digits[((in[1] <<>> 6)];
*out++ = base64digits[in[2] & 0x3f];
in += 3;
}
if (inlen > 0)
{
unsigned char fragment;

*out++ = base64digits[in[0] >> 2];
fragment = (in[0] << 4) & 0x30;
if (inlen > 1)
fragment |= in[1] >> 4;
*out++ = base64digits[fragment];
*out++ = (inlen < 2) ? '-' : base64digits[(in[1] << 2) & 0x3c];
*out++ = '-';
}
*out = '\0';
}
We now send packet type 54 to our server with the following fields:
  1   - username
0 - username
277 - The Y cookie not including the Y= part
278 - The T cookie not including the T= part
307 - Our hash created using the Y64 function
244 - Rekkanoryo says this is internal build number. I just use 2097087
2 - username
2 - Not sure why we use 2 again but this one just contains the character 1
98 - Country but best just use us
135 - Messenger version number. Currently I use 9.0.0.1389
And that's it. We have successfully logged in using YMSG version 16.
Đọc tiếp →
-->đọc tiếp...

Nov 11, 2009

Defect Management Process ( DMS) like Fsoft

-->đọc tiếp...

Oct 29, 2009

Dich

3.1 Introduction

A microstrip patch antenna consists of a very thin metallic patch (usually gold or
copper) placed a small fraction of a wavelength above a conducting ground plane,
separated by a dielectric substrate. Microstrip antennas have numerous advantages, they
are light weight, they can be designed to operate over a large range of frequencies (1-
40GHz), they can easily be combined to form linear or planar arrays, and they can
generate linear, dual, and circular polarizations. These antennas are inexpensive to
fabricate using printed circuit board etching, which makes them very useful for integrated
active antennas in which circuit functions are integrated with the antenna to produce
compact transceivers. Microstrip antennas can be in various shapes and configurations
but for the purpose of this project only rectangular microstrip antennas are of interest.
This chapter includes an overview of microstrip antennas radiation mechanism, modeling,
design, and feeding techniques. The material covered in this chapter known as microstrip
antenna theory is from numerous books and articles ([1]-[3], [12]-[24]).
3.2 Rectangular Microstrip Antennas
Rectangular and square patches are the most commonly used type of microstrip
antennas. They can be used in numerous types of applications including circular
polarization, beam scanning, radiation pattern control and multiple frequency operation.
The basic antenna element is a thin conductor of dimensions L × W on a dielectric
substrate of permittivity e
r and thickness h backed by a conducting ground plane. This
configuration is shown below:
Figure 3.1: Rectangular Microstrip antenna configuration
3.2.1 Radiation Mechanism
Radiation from a microstrip antenna is determined from the field distribution
between the patch and the ground plane. This can also be described as the surface current
distribution on the patch. A patch, which is connected to a microwave source, has a
charge distribution on the upper and lower surface of the patch as well as the ground
plane. The patch is half wavelength long at the dominant mode, which creates the
positive and negative charge distribution shown in Figure 3.2 [11].
The repulsive nature of like charges on the bottom surface of the patch, pushes
some charges around the side to the top causing current densities Jb and Js. The ratio h/W
is small, therefore the strong attractive forces between the charges cause most of the
current and charge concentration remains underneath the patch. But also the repulsive
force between positive charges creates a large charge density around the edges. The
fringing fields caused by these charges are responsible for radiation. In order to achieve
better radiation efficiency, thick substrates with lower permittivity are better suited for
these types of antennas. Figure 3.3 shows the fringing fields in a microstrip patch [12].
3.3 Microstrip Antenna Analytical Models
There are various ways to model a microstrip patch. This modeling is used to
predict characteristics of a microstrip patch such as resonant frequency, bandwidth,
radiation pattern, etc. In this section the transmission line model and the cavity model are
presented. These models are based on some assumptions, which simplify the calculations
at the cost of less accuracy. There are other models that provide more accuracy such as
the full-wave model but are also more complicated to analyze.
3.3.1 Transmission Line Model
This is the simplest model and is restricted to rectangular microstrip antennas.
This model considers the patch as a transmission line of width W with two radiating slots
on each end. For a desired frequency f0, the width W can be estimated using [12]:
1
2
2
0
+
=
r
W
e
l
(Eqn. 3.1)
In this model the input impedance of a patch is the same as that of a transmission
line with length L and admittance Yc. Each slot has an admittance of Ys = Gs + jBs where
the values for conductance Gs and susceptance Bs are given by:



=  - 2
0
0
( )
24
1
1
120
k h
W
Gs l
(Eqn. 3.2)
(1 0.636ln( ))
120 0
0
k h
W
Bs = -
l
(Eqn. 3.3)
Đọc tiếp →
-->đọc tiếp...

Oct 26, 2009

Code J2me

http://j2me.ngphone.com/opensource/imp2p.htm Đọc tiếp →
-->đọc tiếp...

Oct 24, 2009

ffice Ultimate 2007+hướng dẩn crack (100%)



Office Ultimate 2007 bao gồm:

* Access 2007
* Accounting Express 2007
* Excel 2007
* InfoPath 2007
* Groove 2007
* OneNote 2007
* Outlook 2007 with Business Contact Manager
* PowerPoint 2007
* Publisher 2007
* Word 2007

Trước tiên download Office bằng DL tại :

Code:
http://msft-dnl.digitalrivercontent..../X12-30307.exe

Bổ xung :

Office Accounting Express 2007

Code:
http://www.microsoft.com/downloads/d...displaylang=en

Sử dụng CD Key sau để setup

Code:
J67F8-BB7GM-8VPH2-8YMXP-K49QQ

Bắt đầu tiến hành "Đăng Ký" sau khi install xong


Chuẩn bị:
download file sau về:(file OGACheckControl.rar )

http://www.ziddu.com/download/187192...ntrol.rar.html

Bước 1:

vào website sau để cài đặt "Genuine Office"

Code:
[url=www.microsoft.com/genuine/office/whyvalidate.aspx?displaylang=en[/URL]

sau khi setup xong Genuine Office bạn tiến hành validate cho bản Office của mình, và sẽ nhận được thông báo invallid, đừng bận tâm về thông báo đó bây giờ đóng hết tất cả các cửa sổ Internet Explorer lại

Giải nén file OGACheckControl.rar và copy file OGACheckControl.dll ( ghi đè lên file cũ ) vào thư mục :
c:\windows\system32

vào lại trang web bạn sẽ thấy thông báo đã validate thành công

Code:
[url=www.microsoft.com/genuine/office/whyvalidate.aspx?displaylang=en[/URL]

Bây giờ đừng mở bất kỳ ứng dụng Office nào ra vội vì nó sẽ bắt bạn phải Validate Key

Bước 2:

Copy file mso.dll ( ghi đè lên file cũ ) vào thư mục sau
C:\Program Files\Common Files\Microsoft Shared\OFFICE12

Ok bây giờ bạn hãy mở 1 ứng dụng Office bất kỳ ( Word chẳng hạn ) bạn sẽ nhận được thông báo Activation cho Office

hãy chọn cách đăng ký sản phẩm bằng Telephone

Next và hãy điền số 0 ( zero ) và tất cả các ô của Step 3, Next vậy là Office của các bạn đã được đăng ký thành công.
Chúc các bạn may mắn

----------------------------------------------------
Để cài đặt thanh công bạn phải làm đúng theo những bước trên và gỡ bỏ triệt để các bản MO2007 khác nếu bạn đã cài trước đó

Đầu tiên bỏ đĩa MSO mà bạn đã dùng để cài vào ổ CD (hoặc dùng trực tiếp file setup từ ổ cứng tùy bạn) tiếp theo chạy File Setup để chạy tiến trình cài đặt.
Thay vì phải cài đặt mới mình chọn Remove tại màn hình đầu tiên.


Để gỡ bỏ triệt để và cài lại bản MSO khác đồng thời trách rắc rối các bạn làm tiếp các công việc sau:
Bước 1: Gỡ bỏ tất cả các gói cài đặt Office 2007.
Vào Start -> Run, nhập “Installer”, OK.
Vào View menu, chọn Details.
Vào View menu->Choose Details..., chọn Subject, OK.
Vào View menu -> Arrange icon by, chọn Subject.
Nhấp chuột phải vào từng tập tin có đuôi “msi” thuộc Subject “Microsoft Office Product_Name 2007”, chọn Uninstall. có thể bỏ bước này vì đã gỡ bỏ MSO từ đĩa CD rồi

Bước 2: Ngừng dịch vụ “Office Source Engine”.
Vào Start -> Run, nhập services.msc, OK. Trong cửa sổ Services, tìm và nhấp chuột phải vào “Office Source Engine” chọn Stop.
Bước 3: Xóa thư mục và tập tin cài đặt.
Vào Start -> Run, nhập %CommonProgramFiles%\Microsoft Shared, OK.
Tìm và xóa các thư mục sau: OFFICE12, Source Engine.
Vào Start -> Run, nhập %ProgramFiles%\Microsoft Office, OK. Xóa thư mục Office12.
Mở My Computer, vào từng ổ đĩa tìm thư mục \MSOCache\All Users (nếu không thấy thư mục MSOCache, bạn cho hiện thuộc tính ẩn của tập tin và thư mục: Tools -> Folder Option -> View, chọn Show hidden files and folders under Hidden files and folders, OK), xóa những thư mục có cụm từ cuối “0FF1CE)-”.
Vào Start -> Run, nhập %appdata%\microsoft\templates, OK. Xóa các tập tin Normal.dotm và Normalemail.dotm.
Vào Start -> Run, nhập %appdata%\microsoft\document building blocks\Language_ID, OK (nếu báo lỗi, bạn bỏ qua bước này). Sau đó, xóa tập tin “Building blocks.dotx”.
Vào Start -> Run, nhập %temp%, OK, xóa hết tập tin.
Vào Start -> nhập %AllUsersprofile%\Application Data\Microsoft\Office\Data, OK, xóa tập tin “opa12.dat”.
Bước 4: Xóa đường link trong Registry.
Vào Start -> Run, nhập regedit, OK -> HKEY_CURRENT_USER\Software\Microsoft\Office, xóa mục “12.0” (lưu ý: để an toàn, bạn nên lưu trữ Registry trước khi xóa). Khởi động lại máy tính.

cach khac:
TÌM: C : \Program Files\Common Files\Microsoft Shared\Office 12\Office Setup Controller\Proof.en

Tìm file proof.xml va mở bằng NotePad, tìm dòng sau:





Thay thế "AlwaysInstalled" bằng "neverinstalled" lưu lại.
CHÚC CÁC BẠN THÀNH CÔNG
Đọc tiếp →
-->đọc tiếp...

Oct 21, 2009

Thuat toan Kruskal

#include

#define MAX 100

class kruskal
{
private : struct edge_info
{
int u, v, weight;
} edge[MAX];
int tree[MAX][2], set[MAX];
int n;
public : int readedges();
void makeset();
int find(int);
void join(int, int);
void arrange_edges(int);
int spanningtree(int);
void display(int);
};

int kruskal :: readedges()
{
int i, j, k, cost;

k = 1;
cout << "\nEnter the number of Vertices in the Graph : ";
cin >> n;
cout << endl;
for (i = 1; i <= n; i++)
for (j = 1; j < i; j++)
{
cout << "weight[" << i << "][" << j << "] : ";
cin >> cost;
if (cost != 999)
{
edge[k].u = i;
edge[k].v = j;
edge[k++].weight = cost;
}
}
return (k - 1);
}

void kruskal :: makeset()
{
int i;
for (i = 1; i <= n; i++)
set[i] = i;
}

int kruskal :: find(int vertex)
{
return (set[vertex]);
}

void kruskal :: join(int v1, int v2)
{
int i, j;
if (v1 < v2)
set[v2] = v1;
else
set[v1] = v2;
}

void kruskal :: arrange_edges(int k)
{
int i, j;
struct edge_info temp;
for (i = 1; i < k; i++)
for (j = 1; j <= k - i; j++)
if (edge[j].weight > edge[j + 1].weight)
{
temp = edge[j];
edge[j] = edge[j + 1];
edge[j + 1] = temp;
}
}

int kruskal :: spanningtree(int k)
{
int i, t, sum;
arrange_edges(k);
t = 1;
sum = 0;
for (i=1;i<=k;i++)
cout< for (i = 1; i <= k; i++)
if (find (edge[i].u) != find (edge[i].v))
{
tree[t][1] = edge[i].u;
tree[t][2] = edge[i].v;
sum += edge[i].weight;
join (edge[t].u, edge[t].v);
t++;
}
return sum;
}

void kruskal :: display(int cost)
{
int i;
cout << "\nThe Edges of the Minimum Spanning Tree are\n\n";
for (i = 1; i < n; i++)
cout << tree[i][1] << " - " << tree[i][2] << endl;
cout << "\nThe Cost of the Minimum Spanning Tree is : " << cost;
}

int main()
{
int ecount, totalcost;
kruskal k;
ecount = k.readedges();
k.makeset();
totalcost = k.spanningtree(ecount);
k.display(totalcost);
return 0;
}

Đọc tiếp →
-->đọc tiếp...

Oct 13, 2009

Tổng hợp các phím tắt trong Windows 7

Tổng hợp các phím tắt trong Windows 7

win7Bài viết sau thống kê hầu hết các phím tắt trong Windows 7 giúp các bạn thao tác nhanh và tiện lợi hơn rất nhiều.

>> Hướng dẫn cài Windows XP Mode trong Windows 7

Windows logo + Up: Mở lớn cửa sổ
Windows logo + Down: thu nhỏ kích thước cửa sổ
Windows logo + Left: Đưa cửa sổ sang bên trái màn hình
Windows logo + Right: Đưa cửa sổ sang bên trái màn hình
Windows logo + Shift + up: Kéo dài cửa sổ bằng chiều dọc màn hình
Windows logo + Shift + Down: Thu nhỏ cửa sổ xuống TaskbarVnEtips -
Windows logo + D: Show Desktop, Khôi phục lại các cửa sổ
Windows logo + G: Đưa gadget lên trên cửa sổ
Windows logo + F: Mở cửa sổ tìm kiếm
Windows logo + R: Mở hộp thoại “run”
Windows logo+ E: Mở Windows Explorer
Windows logo+ M: Show Desktop
Windows logo+ Shift + M: Phục hồi lại các cửa sổ sau khi Show Desktop
Windows logo+ L: Khoá máy
Windows logo+ Pause: Mở cửa sổ System Properties
Windows logo+ T: Duyệt qua các ứng dụng trên thanh Taskbar
Windows logo + Shift + T: Duyệt qua các ứng dụng trên thanh Taskbar theo chiều ngược lại
Windows logo+ U: Mở the Ease of Access Center
Windows logo+ P: Mở tuỳ chọn hiển thị khi trình chiếu
Windows logo+ X: Mở Mobility Center tuỳ chỉnh am lượng, độ sáng màn hình, ……..
Windows logo+ #: Mở ứng dụng đang chạy ở cị trí # trên Taskbar
Windows logo+ Space: Show tạm thời desktop khi bạn đang mở nhiều cửa sổ, buông phím ra các ứng dụng sẽ trở lại như cũ
Windows logo + dấu “+”: Zoom lớn VnEtips -
Windows logo + dấu “-”: Zoom nhỏ
Windows logo + Tab: Mở Flip3D: Giữ phím logo và bấm tab liên tục để duyệt qua các ứng dụng, bấm thêm shift để duyệt ngược lại.
Shift + Click vào ứng dụng trên Tasbar: Mở mới một cửa sổ ứng dụng khi ứng dụng đó đang chạy
Ctrl + Shift + Click vào ứng dụng trên Tasbar: Mở mới một cửa sổ ứng dụng khi ứng dụng đó đang chạy với quyền admin
Shift + Right-click vào ứng dụng trên Tasbar: Mở Show window menu (Minimize, Restore, Move, Size, Task Manager, Exit)
Shift + Right-click vào nhóm icon trên taskbar: Show window menu, tuỳ chọn sẽ tác động tới toàn nhóm chương trình
Ctrl + click vào nhóm chương trình đang mở trên Tasbar: Chuyển giữa các cửa sổ hoặc các tab trong nhóm
F1: Help
F3: Search/Find
F11: Fullscreen view
Giữ phím Shift phải 8 giây để chuyển Filter Keys On/Off
Left Alt + Left Shift + Print Screen: Turn High Contrast On/Off
Giữ Shift 5 giây: Turn Sticky Keys On/Off
Giữ NUM LOCK 5 giây: chuyển Toggle Keys On/Off
Ctrl + C Copy
Ctrl + X Cut
Ctrl + V Paste
Ctrl + Z Undo
Ctrl + Y Redo
Shift + Delete: Xoá thẳng file không qua thùng rác
F2: Đổi tên đối tượng được chọn
Ctrl + Right: Đưa con trỏ nhảy qua phải một từ
Ctrl + Left: Đưa con trỏ nhảy qua trái một từ
Ctrl + Up: Đưa con trỏ đến đầu đoạn
Ctrl + Down: Đưa con trỏ đến đầu đoạn tiếp theo
Ctrl + Shift + phím mũi tên: Chọn (bôi đen) đối tượng
Ctrl + A: Chọn hết
Alt + Enter: Mở cửa sổ Properties cho đối tượng đã chọn
Alt + F4 Close/Exit VnEtips -
Alt + Spacebar: Mở menu ngắn cho cửa sổ hiện hành
Ctrl + F4: Đóng tài liệu hiện hành.
Alt + Tab: Chuyển giữa các đối tượng đang mở
Ctrl + Nút cuộn chuột: Thay đổi kích thước Icon trên Desktop
F6 Chuyển vòng giữa các đối tượng trên cửa sổ hoặc Desktop
F4 Chuyển đến thanh địa chỉ trong Internet Explorer.
Shift + F10: Hiển thị menu cho đối tượng được chọnVnEtips -
Ctrl + Esc: Mở start menu
F10: Mở thanh menu của chương trình.
F5: Làm mới lại cửa sổ đang mở
Alt + Up: Chuyển ra thư mục đang chứa thư mục hiện hành trong Windows Explorer
Ctrl + Shift + Esc: Mở the Task Manager VnEtips -
Shift khi bỏ CD vào máy: Ngăn việc tự động chạy CD
Ctrl + + F: Tìm kiếm máy tính khi trong mạng
Ctrl + N: Mở cửa sổ mới.

(www.VnEtips.com - người dịch: NTT)

Đọc tiếp →
-->đọc tiếp...

DeeMaz Transferpatch 1.0 - All teams and nationals updated to 7 October 2009 !

DeeMaz Transferpatch 1.0 - All teams and nationals updated to 7 October 2009 !
Hi ,i'm DeeMaz:) i'm glad to present my transferpatch to you all!
I have updated every team and every national for the best pes 6 experience:)
i've worked hard on it ,around 6/7 hours per day for 2 weeks,but now,finally,is ready! Lancast have just approved that then you can use it on the pes6j server

These are the features :
-Rosters of every team and national updated to 7 October 2009 : the goal of this patch is realism then all the rosters have their current players (no fantasy teams in other a,for example)
-instead of some relegated teams,i have putted (without change team name, i have just added the players to make these teams) :

teesside -> stoke city
berkshire blues -> birmingam city
south yorkshire -> hull city
hertfordshire -> burnley
south east london reds -> sunderland
ascoli -> bologna
empoli ->napoli
messina -> bari
reggina -> genoa

-On the teams that doesn not reach 11 players ,i have added random players named Player1 player2 etc
-few nationals cant be updated because there are not players to replace who is not playing anymore (for example arabia)

that's all!i have checked everything many times,i think that you can't find something wrong;) but if u discover some error please report that.I hope you will like my work. To download the patch,click on this link ,then choose free download:

http://saveqube.com/getfile/063ce1c58db1ccf538f322325a23df4e5e4cce63f8422eb452/DeeMaz_1.0_TransferpatchOct09.DKZ.html

sharedownload.org

p.s. Here there is a tutorial if you don't know how to install the patch
http://www.pes6j.net/forum/index.php?topic=2334.0
p.s.2 please don't make any other mirror.thanks!

nguon: pes6j.net
Đọc tiếp →
-->đọc tiếp...

Oct 9, 2009

Sử dụng lại tần số

Sử dụng lại tần số là việc cấp phát cùng một nhóm
tần số vô tuyến tại các vị trí địa lý khác nhau trong
mạng mà không làm ảnh hưởng đến chất lượng
kết nối tại giao diện vô tuyến do nhiễu đồng kênh
và nhiễu kênh lân cận gây nên.
Đọc tiếp →
-->đọc tiếp...

Oct 5, 2009

Hướng dẫn cài Windows trực tiếp từ ngay ổ cứng

Đối với máy chỉ boot được bằng USB và CD:

Bao gồm hầu hết các loại máy hiện giờ.
Bạn tạo một USB boot theo hướng dẫn tại đây :
http://www.4shared.com/file/27999878..._bang_USB.html
- Nhớ chép thêm bộ công cụ hỗ trợ cài đặt Windows từ ổ cứng vào USB đó tại đây : http://www.4shared.com/file/27999798...l_Windows.html
- Sau đó mở USB ra.
- Bạn vào File > New > Folder, đặt tên cho folder này là : WinXP
rồi mở đĩa CD XP ra và copy nguyên toàn bộ nội dung bên trong vào trong folder WinXP (nếu làm đúng theo thứ tự, thì khi mở folder C (hay E) > WinXP ra, bạn sẽ thấy một trong các thư mục tiếp theo là I386, hay TOOLS, hay SUPPORT,...)
- Cuối cùng, bạn làm tương tự như trên để format lại các ổ đĩa, sau đó đưa toàn bộ nội dung USB vào ổ cứng máy bạn.

Khởi động lại máy, trong DOS, gõ A:\>fdisk.exe.
- Nhấn Enter để đăng nhập vào Fdisk.



- Trong dòng: "Do you wish to enable large disk support (Y/N)", gõ Y > Enter.
- Trong dòng: "should NTFS partitions on all drivers be treated as large (Y/N)", gõ Y > Enter.
- Khi cài theo cách này lần đầu tiên, bạn bắt buộc phải format lại toàn bộ ổ cứng.
- Trong bảng lựa chọn,ở mục "Enter choice" gõ số 3 để chọn Delete Partition or logical DOS drive, nhấn Enter.
- Tiếp theo, gõ số 1 > Enter trong "Enter choice" để chọn Delete primary DOS partition.

Lúc này sẽ xảy ra hai tình huống:

Trường hợp 1:

Bước 1:
- Nếu xuất hiện thông báo "What primary partition do you want to delete?", bạn gõ số 1 > Enter.
- Dòng Enter volume label? Gõ C > Enter.
- Chương trình sẽ hỏi lại xem bạn có chắc chắn về hành động của mình không trong dòng "Are you sure?", gõ Y > Enter > Esc.
- Nhấn phím 3 > Enter để chọn Delete primary or logical DOS drive.
- Nhấn tiếp phím 4 > Enter để chọn Delete Non-DOS partition.
- Dòng "What Non-DOS partition do you want to delete?", gõ phím 1 > Enter.
- Dòng "Do you wish to continue (Y/N)?", nhấn Y > Enter > Esc.

Bước 2:
- Nhấn phím 1 > Enter để chọn "Create DOS partition or logical DOS drive". - Gõ tiếp 1 > Enter để chọn Create primary DOS partition.
- Chờ chương trình kiểm tra ổ đĩa và thể hiện các thông số % ổ đĩa đã được kiểm tra trên màn hình.
- Dòng "Do you wish to use the maximum available size for a primary DOS partition and make the partition active (Y/N)?", gõ N > Enter.
- Chương trình sẽ tiến hành tạo phân vùng bạn chọn, kết quả thể hiện bằng chỉ số % mức độ hoàn thành.


- Dòng "Enter partition size in Mbytes or percent of disk space (%) to create a primary DOS partition" bạn chọn dung lượng sao cho nó chiếm từ 50%-2/3 dung lượng ổ đĩa cứng của bạn. Nhấn Enter > Esc.
- Gõ số 1 > Enter để chọn mục "Create DOS partition or logical DOS drive.
- Nhấn phím 2 > Enter để chọn tiếp "Create extended DOS partition.
- Dòng "Enter partition size in Mbytes or percent of disk space (%) to create an extended DOS partition", nhấn Enter để chương trình lấy phần dung lượng còn dư lại.
- Nhấn tiếp Esc và chờ chương trình đếm đủ từ 1%-100% để hoàn tất việc tạo phân vùng thứ hai.
- Nhấn Enter lần nữa để tạo Logical drives.
- Bấm Esc để quay lại lưạ chọn kích hoạt phân vùng hệ thống.
- Nhấn phím 2 > Enter để chọn "Set active partition".
- Điền số 1 để chọn ổ đĩa Primary DOS.
- Nhấn Esc 3 lần để quay lại menu ban đầu.

Máy sẽ khởi động lại, trong DOS, gõ A:\>dir_C:

*- Lưu ý quan trọng : kí hiệu _ để thay cho khoảng trắng vì nếu lệnh trên mà để khoảng trắng thì có thể các bạn sẽ bị nhầm lẫn, và khi gõ thì bạn phải gõ là A:\> dir C: rồi nhấn Enter, nếu máy không khởi động lại thì tức là bạn đã làm đúng.

- Gõ tiếp A:\>format_C:_/s rồi nhấn Enter để chờ format lại ổ cứng.
- Chọn Y nếu chương trình hỏi "Proceed with format" rồi nhấn Enter.
- Nếu không được bạn khởi động máy rồi bằng cách nhấn phím Power rồi làm lại từ bước gõ A:\>dir_C:

Chương trình sẽ chỉ ra thông số % format được ở ổ điã.
Sau đó, trong dòng Volume label (11 characters, Enter for none), bạn nhấn phím Enter, nếu không được thì bạn điền Disk C rồi gõ Enter.
Tương tự, gõ tiếp A:\>format_D:_/s rồi nhấn Enter > Y > Enter để format lại phân vùng D, và tiếp tục đặt tên cho phân vùng là D hoặc Enter để lấy tên mặc định.

Khởi động lại máy, trong DOS bạn gõ lệnh sau A:\>copy_A:\*.*_C:\ để copy toàn bộ nội dung đĩa mềm vào ổ đĩa cứng (dùng để cài Windows) của bạn.
Lúc đó, trong dòng "Overwrite C:\command.com" bạn chọn N > Enter.


Trường hợp 2:

Bước 1:
- Nếu không xuất hiện thông báo "What primary partition do you want to delete?". Nhấn ESC.
- Bấm phím 3 > Enter > 4 > Enter.
- Tiếp theo, bạn gõ số của phân vùng dung lượng lớn hơn (bằng cách xem trong cột Usage, thường thì partition 1 luôn có dung lượng lớn hơn các patition khác)
- Nếu chọn phân vùng 1, bạn gõ 1 > Enter để xóa phân vùng không hỗ trợ DOS.
- Nhấn phím 2 > Enter, Gõ số của phân vùng còn lại rồi nhấn Enter > ESC
- Khởi động lại máy rồi gõ fdisk.exe > Enter > Enter, bấm tiếp 3 > Enter > 2 > Enter > Y > Enter > ESC để xóa các Logical DOS Drive đi.

- Bước 2:
Làm tương tự bước 2 trường hợp 1.

Phần III-Cài Đặt Lần Đầu Tiên:

Phần này sẽ hướng dẫn bạn cài Fresh trong khi file cài đặt đang nằm trong ổ C. Điều này có nghĩa là chúng ta sẽ phải format ổ C và tất nhiên sẽ xóa luôn thư mục cài đặt- nhưng điều tuyệt vời là việc cài đặt vẫn có thể tiếp tục mà không cần...file cài đặt. Đây là một điều cực kì bất hợp lý nhưng...vẫn có thể xảy ra mà không thể làm được khi cài bằng CD hay bất kì thứ nào khác. Đó là nhờ hai bước thiết lập và chuẩn bị rất công phu mà chúng ta đã làm ở trên.

- Bước 1:
- Khởi động lại máy, trong DOS bạn gõ : WinXP\I386\WINNT.EXE rồi nhấn Enter.
- Tiếp theo, Windows sẽ hỏi bạn chính xác vị trí chứa file cài đặt Windows XP, bạn gõ lại : WinXP\I386 - rồi nhấn Enter để bắt đầu cài.
- Cài đặt kiểu này, bạn không cần bất kì một thiết bị ngoại vi nào khác và thời gian cài đặt sẽ nhanh hơn rất nhiều so với cách cài thủ công khác khoảng nửa tiếng cho tới 45 phút tùy máy mạnh hay máy yếu.

Có thể khi cài đặt, quá trình load các file cài đặt sẽ không được hiển thị như quá trình cài bình thường làm cho máy bạn có vẻ như đang bị treo, nhưng thực tế thì quá trình load file vẫn đang diễn ra bình thường và bạn chịu khó chờ khoảng năm đến bảy phút thì việc cài đặt sẽ diễn ra bình thường trở lại.



- Bước 2:
- Sau khi load các file cài đặt vào bộ nhớ tạm (khoảng 5-15 phút tùy máy), bạn nhấn Enter để khởi động lại máy và không làm gì cả cho tới khi màn hình Welcome to Setup xuất hiện.
- Nhấn Enter > F8.
- Bạn dùng phím mũi tên để chọn phân vùng C rồi nhấn Enter.
- Sau đó, dùng phím mũi tên chọn mục : "Leave the current file system intact (no changes)" và nhấn Enter > C.
- Sau đó, quá trình cài đặt còn lại giống như các quá trình cài đặt Windows khác mà bạn đã từng làm.



Phần IV-Cài Đặt Cho Các Lần Sau:

- Sau này, khi muốn cài lại Windows, trong màn hình DOS, bạn chỉ đơn giản di chuyển đến chọn lựa Microsoft Windows rồi nhấn Enter.
- Sau đó bạn cũng gõ WinXP\I386\WINNT.EXE và làm tương tự như bên trên (Cài Đặt Lần Đầu Tiên) là được.



Phần V-Cài Đặt Các Công Cụ Bổ Sung:

Nếu sau này, bạn cần cài thêm các bộ gõ của Windows hay cài thêm các công cụ trong nhón Components,...thì do không có ổ CD, nên bạn cần tạo một đĩa CD ảo trong máy, sau đó đưa thư mục WinXP vào trong đó là xong. Cách tạo ổ CD ảo, bạn có thể tham khảo ở khắp nơi .
Đọc tiếp →
-->đọc tiếp...

Brazillian's football skills



Đọc tiếp →
-->đọc tiếp...

Oct 2, 2009

Tai lieu lap trinh yahoo voi java

1. Build Your Own Messaging Application in Java with jYMSG: http://www.devx.com/Java/Article/22546/0/page/1

Đọc tiếp →
-->đọc tiếp...