Jump to content

YMSG protocol support


Recommended Posts

  • 2 weeks later...
  • Replies 132
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hello. Did you managed to reproduce that "Error:-1"? I noticed that it stops every 2 hours and 25 minutes. But only at 25 minutes. I analyzed packets sent and received by Yahoo Messenger 9 with "Colasoft Capsa" and I noticed that every minute is sent a packet to yahoo server and the server responds. I'm not an expert and I don't know if this is the cause of error but maybe my notices can help you with something.

Link to comment
Share on other sites

The only error I was able to reproduce was a 1014, which seems to occur after long periods of time on alot third-party clients.

Supposedly the error is a notification of a session expiration.

(which can display as -1 here if the socket closes before the last packet is processed)

I need to investigate what other clients are sending in the way of ping packets, what intervals they do so at, whether they do it on YMSG16 and 102 etc, and whether they even have any effect on 1014's.

I don't have Yahoo! Messenger installed, but if it actively uses YMSG16 or a similar version of the protocol, it would be nice to have a log of what it sends over long periods on pager and in chat.

If they don't have any effect, the alternative would be to make clients that try to automatically reconnect.

Also, I have many things that require my time at this point, so I might not be able to pay this project as much attention as often as I did before - But I'll make attempts to continue to advance it as I can.

@JackyChan

If you meant using different aliases of the same account for PM's or Chat, I can add this functionality if I get around to it.

If you meant logging in multiple accounts,

I'm not going to add examples relating to multiple accounts on yahoo, simply because that road often leads to things that you wouldn't do in good conscience.

However, I can't stop you from making programs of this nature, even though I don't like it.

@LeHuynhNam

It was an example script, not a full, shiny program.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

@JackyChan

If you meant using different aliases of the same account for PM's or Chat, I can add this functionality if I get around to it.

If you meant logging in multiple accounts,

I'm not going to add examples relating to multiple accounts on yahoo, simply because that road often leads to things that you wouldn't do in good conscience.

However, I can't stop you from making programs of this nature, even though I don't like it.

Yes, thank for reply.

You can add that func for convenient.

I very need to "logging in multiple accounts". Because i need for learn. I'm learning about multiple connection (TCP).

If you can, please send a private message for me about "logging in multiple accounts" or "a example of multiple connection".

Thank you very much.

JackyChan

Link to comment
Share on other sites

  • 1 month later...

How can I force to get CASE '00F1' TO get buddy list, to refresh if someone sign in of someone sign out?

I'm not sure I understood your question, however I'll give it a shot.

** If you're asking about retrieving the buddylist from Yahoo a second time:

The BuddyList packet (00F1) is *usually* only sent when you successfully login to yahoo, if I recall correctly.

As far as I know, the only way you can refresh the entire buddylist is by disconnecting and reconnecting.

There were ways of requesting your buddylist, but they were only available on the [now-defunct] older YMSG protocols.

However, you can request the status of all online users on your buddylist by sending packet 000A, you can use _YMSG_Client_BudStatus($sYourUsername) to accomplish this.

** If you're asking about refreshing the seen buddylist for when a buddy notification is received:

The status for buddies can recieved in packet 00F0, but other sometimes packets pertain to buddy notifications also:

Buddy Signs In: packet 0001

Buddy Signs out: packet 0002

Buddy Visible/Invisible: packet 00C5

Buddy Away-state: packet 00C6

Note: these packets have other uses and meanings also, they are not only notification packets.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

  • 4 weeks later...

Hi. Yesterday I had searched yahoo protocol till i when found this script . I don't know very well to programming in AutoIt and I need a function or a class for yahoo status but not invisible scanner .(for example my friend put :" br right back" my script php return me this status message ). Excuse me for mistakes, I don't know very well English.

Link to comment
Share on other sites

Hi. Yesterday I had searched yahoo protocol till i when found this script . I don't know very well to programming in AutoIt and I need a function or a class for yahoo status but not invisible scanner .(for example my friend put :" br right back" my script php return me this status message ). Excuse me for mistakes, I don't know very well English.

As far as I know, without retrieving your buddylist, you can only get the public "online" and "offline" states for a user.

On the other hand, you can log in to Yahoo Pager with an account that has the user on your buddylist. (with buddy request accepted)

Then you can receive Online, Offline, Away states and Custom away text.

The Chat Client example (not Yahsmosis) does display away states as text when you first log in as an example of the second method. The script is available in the ZIP.

There may be some caveats for doing this in PHP:

- If you are planning on allowing the input of a username to check, there is no nice way to receive away states for unknown/random users. (At least without further abusing the protocol)

- If you are allowing multiple requests, you do not want your script to log into yahoo multiple times within a short timespan, this will result in a temporary login ban.

PS:

Exactly what "class" (course? or class object?) requires you to delve into an officially undocumented service?

If you say "course", I figure either you decided you wanted the capability yourself or that is not the real reason you're asking. :)

Edit: missing word

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

Hi,

I try with packet C1 check invisible status , but it not working

Func _YMSG_Client_c1Request($sAlias,$sToAlias,$iVersion=-1,$iVendor=-1,$hSessionID=-1)
    ;Header("C1", "1À€" & whofrom & "À€5À€" & Whoto & "À€206À€1À€")
    
    Local $sData=_YMSG_FieldCreate(1,$sAlias)
    $sData&=_YMSG_FieldCreate(5,$sToAlias)
    $sData&=_YMSG_FieldCreate(206,1)
    Local $sHeader
    _YMSG_HeaderCreate($sHeader,$iVersion,$iVendor,StringLen($sData),'00C1',1,$hSessionID)
    
    Return $sHeader&$sData
EndFunc

this packet is correctly send and is taken this packet by victim yahoo ID , but not receive reply packet to find user is invisible of offline,

for sending C1 packet must use different yahoo login protocol?

Please help me, Thanks.

Link to comment
Share on other sites

Hi,

this packet is correctly send and is taken this packet by victim yahoo ID , but not receive reply packet to find user is invisible of offline,

for sending C1 packet must use different yahoo login protocol?

Please help me, Thanks.

Sorry,

I've had time to think about it and I've decided that I'm not going to offer any further help that negatively effects others. If you want to make software that violates user's privacy, go somewhere else.

I do know that I made an invisibility scanner script, but that was a mistake.

Furthermore, I am not going to offer any help on the following topics: "Booters", Flooders, Spammers, Bots, and Bugs used to abuse others, or anything abusive really.

I think that discussing any of these topics would be wrong as well as compromise the integrity of this forum - not to mention that Yahoo Chat already has enough of that stuff going around.

I will, however, help with preventative measures against the above topics if possible.

---

Your question both falls under "Bugs to abuse others" and violating their privacy - as what you're asking for is help with a protocol exploit that uncovers whether they're invisible.

I can't keep you from writing your program or even using this YMSGLib, but I'm not going to participate in what you ask.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

Sorry,

I've had time to think about it and I've decided that I'm not going to offer any further help that negatively effects others. If you want to make software that violates user's privacy, go somewhere else.

I do know that I made an invisibility scanner script, but that was a mistake.

Furthermore, I am not going to offer any help on the following topics: "Booters", Flooders, Spammers, Bots, and Bugs used to abuse others, or anything abusive really.

I think that discussing any of these topics would be wrong as well as compromise the integrity of this forum - not to mention that Yahoo Chat already has enough of that stuff going around.

I will, however, help with preventative measures against the above topics if possible.

---

Your question both falls under "Bugs to abuse others" and violating their privacy - as what you're asking for is help with a protocol exploit that uncovers whether they're invisible.

I can't keep you from writing your program or even using this YMSGLib, but I'm not going to participate in what you ask.

If you don't know anything, please do not respond. You don't force to answer.

Link to comment
Share on other sites

I can't keep you from writing your program or even using this YMSGLib, but I'm not going to participate in what you ask.

Actually an invisible scanner is not malware but you are right, is some common sense, so we should not encourage this but we cannot stop people that want to make that.

When the words fail... music speaks.

Link to comment
Share on other sites

@haiishq - I'd have to investigate what requests are being sent to attempt to implement it.

Information, logs, etc are always welcome.

----------------------

Update: YMSGLib 2.9c

+Added 3 types of ping packets, information is limited on how often these need to be sent.

0012 _YMSG_Client_Ping(...)
008A _YMSG_Client_PagerPing($sAccountName, ...)
00A1 _YMSG_Client_ChatPing($sAlias,$fSendUsername=true, ...)

If the $fSendUsername parameter of _YMSG_Client_ChatPing is True, field 1 is appended with the selected alias also.

Ping information sources:

YahELite forum:

1 (A1 every 30 minutes, 8A every minute, 12 per 5 minutes)

2 (A1 every 5 minutes, 8A every minute, 12 per 5-10 minutes)

Other, 8A every minute, 12 / A1 every 3600 seconds (1 hour).

Timing settings vary by the source.

Update: YMSGLib.INI

~Minor changes to yahoo error code entries.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

  • 1 month later...

The Yahoo Error code 52 (followed by 1014) does not appear to be occuring (or at least not as often??) in a newer Yahsmosis Beta, which added pings.

For reference I am going to list what Yahsmosis sends so that they can be reused in other applications using this YMSG library.

_YMSG_Client_Ping(); Every 5 minutes, not username related
_YMSG_Client_PagerPing($Username); Every 1 minute
_YMSG_Client_ChatPing($Username, True); Every 5 minutes while a chat session is active (not necessarily in a chat room)

The second parameter of _YMSG_Client_ChatPing is a workaround that optionally adds a different field with the username, this supposedly boosts time of your chat session past the norm, but has not been verified.

-----------------------------

@previous questions,

I can provide an explanation for Connection Error -1 without description for disconnects that occur after several hours:

receiving/sending errors are processed immediately; before the remaining YMSG packets that are kept in a "buffer" (variable holding multiple packets' data), this means you get a disconnect before you can get a notification of the Yahoo error code in some cases, and in this case the remaining buffer of data is discarded.

Usually this error is caused by the Error 52/1014 that occurs after a long period of time, I can't say anything about one that occurs after several minutes - as I cannot reproduce it.

I'm not sure why an actual winsock error was not gotten. ;)

In Yahsmosis, connection errors are still processed immediately - but the remaining data in the "buffer" is processed directly afterwards in the disconnect action/event.

Similarly, I can't seem to get a -1 connection error in Yahsmosis, but rather I get actual Winsock error codes...

Note: the "buffer" variable here should not be confused with the socket's buffer.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

  • 3 weeks later...

The main scripts are now under a license if it is possible for me to license AutoIt script files that I write.

This license is very permissive and is GPL-compatible.

I frankly can't see anyone having a problem with this license unless it is because of the 'wording', in which case I'll be happy to do something different - if it is absolutely necessary.

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

  • 2 months later...

YMSGLib 3.1

Added support for Mobile/SMS:

- - Validate and Get carrier information for a specific number

- - Send a message via a packet to a mobile number, like a PM packet.

Functions added:

_YMSG_ValidateMobile($sMobileNumber,$sYCookie,$sTCookie,$intl='us')
_YMSG_Client_SMS($sAlias,$sMobileNumber,$sCarrier,$sText,$iVersion=-1,$iVendor=-1,$hSessionID=-1)

_YMSG_ValidateMobile will (on success) return data like:

<validate>
 <mobile_no msisdn = "mobile number">
 <status>Valid</status>
 <carrier>carrier string</carrier>
 </mobile_no>
 </validate>

The carrier string is necessary to send SMS packets to the number.

ValidateMobile does require login cookies to be supplied to succeed.

- - - - -

This credit for this functionality goes to communication with, and information published by, Lost_Protocol and WickedCoder.

Additional information about handling SMS packets, making requests, etc. can be viewed on their page: Yahoo SMS Specification

PS: There has been some talk about validating usernames, the following was proposed to me by several individuals as a way to classify usernames by their content:

Yahoo Username Classifications

Edit: Removed double-post; I have no idea how that occurred.

Edit: Fixed second link

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

I recently posted this as a reply to a PM, but I thought it might be informative to those still with questions about using SMS

I'm not quite sure of what regions or carriers Yahoo supports altogether; I'd have to ask some people that know better.

I do know that you have to have the country-code before the number, so you could just try to use ValidateMobile() on the number you want to check.

Here is an simplistic example that gets the "carrier" string of a number with ValidateMobile() and then creates an SMS Packet:

#include <YMSGLib.au3>

Local $Sender='myusername'; username you are using in a pager session
Local $Number='15163032083'
Local $YCookie='Y=v=1 ...';example only
Local $TCookie='T=z= ...' ;example only
Local $Carrier=_Mobile_GetCarrier($Number,$YCookie,$TCookie)
; . . . or
;Local $Carrier='pcsms.us.tmobile'; etc carriers

If $Carrier=='' Then
    Switch @error
        Case 1
     ConsoleWrite('Error: Number not validated; it is not supported by Yahoo SMS.'&@CRLF)
        Case 2
            ConsoleWrite('Error: ValidateMobile response unknown, make sure your cookies are valid '& _
        'and there are no problems using TCP connections.'&@CRLF)
 EndSwitch
    Exit
EndIf
Local $Packet=_YMSG_Client_SMS($Sender,$Number,$Carrier,'hello, how are you?')
ConsoleWrite('Success: SMS Packet created.'&@CRLF)
Exit





Func _Mobile_GetCarrier($sNumber,$YCookie,$TCookie,$intl='us'); Bad way of checking content! but it works.
    Local $sCarrier=''
    Local $vResponse=_YMSG_ValidateMobile($sNumber,$YCookie,$TCookie,$intl)
 If IsBinary($vResponse) Then $vResponse=BinaryToString($vResponse)
 If StringInStr($vResponse,'<validate>')>0 Then
        If StringInStr($vResponse,'<status>Valid</status>')>0 Then
        Local $startPos=StringInStr($vResponse,'<carrier>')+9
        Local $endPos=StringInStr($vResponse,'</carrier>')-1
        Local $strLen=($endPos-$startPos)+1
     $sCarrier=StringMid($vResponse,$startPos,$strLen)
        Else
        Return SetError(1,0,'')
        EndIf
    Else
 Return SetError(2,0,'')
    EndIf
    Return $sCarrier
EndFunc

Notes:

  • You will need real, valid, unexpired Y and T yahoo cookies to use ValidateMobile; it doesn't even matter if these cookies are for the username you want to send the SMS with, they just need to be valid cookies.
  • If you support multiple SMS', it is suggested you cache the carrier for each number instead of retrieving it repeatedly; too many Yahoo HTTP requests can cause Yahoo to give you a temporary ban for the requested resource.
  • If you want to use the created packet you will either need the global YMSG protocol Version/VID/SID defined (as done in the chat examples after authorization), or supply them via the 5th 6th and 7th parameters of _YMSG_Client_SMS()
  • The chat client/login examples in the YMSG thread show how I send packets, amongst other things. However, assuming you have the right Version, VID, SID and you are already logged into Yahoo Pager/Chat, you should just be able to TCPSend it on your Yahoo Pager/Chat socket.
  • I will be posting this code to the YMSG thread
PS: no idea why the indentation is messed up after quoting the reply. Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...