MSNP协议的通信过程[En]

YOLOv11改进-卷积-引入Upsampling by Dynamic DySample 解决传统上采样灵活性问题 现有的上采样方法如等,依赖于动态卷积来生成上采样的内容感知核,但这些方法需要额外的子网络生成动态卷积核计算量较大。尤其是 FADE 和 SAPA 需要高分辨率的特征图作为引导,进一步增加了计算负担,并限制了应用场景。DySample的核心思想是将上采样过程重新定义为点采样(Point Sampling)。通过学习输入特征图中的采样点坐标,DySample 生成内容感知的采样点来对特征图进行重新采样,而不是使用动态卷积核。具体实现步骤如下:​​1. 输入特征图:大小为 C×H×W的输入特征图。 阅读详情

You have been using MSN for quite some time wondering how it works. Well You need not look any further. This article will not just tell you how MSN works but will also tell you how to make your own version of MSN messenger. You can download a sample application from here MSN Clone .Let's get ready to rumble!!!!

 

We can split up the working of MSN messenger into 2 phases

  • Authentication Phase

  • Instant Messaging Phase

 

The Authentication Phase involves logging into the MSN messenger server and also (friends) list retrieval in this case.

The Instant Messaging Phase involves sending/accepting requests for an Instant Messaging session and also sending/receiving messages.

 

The MSN messenger protocol is an ASCII based protocol. In other words the commands are in pure English !!!.The first phase involves connecting to an MSN messenger server .In this case we shall connect to the server 64.4.13.58 on port 1863(MSN messenger works through port 1863).

Once the connection is done we need to start the log in process. The first stage in this phase is the versioning stage. In this stage the client (in this case your app) lists/sends the versions that it can support to the server and waits for the server to respond.

VER 0 MSNP7 MSNP6 MSNP5 MSNP4 CVRO

In the MSN messenger protocol a "trial id" is sent along with every command. The trial id starts from 0 and is incremented every time the server responds successfully to the client's commands.

 

The server responds like this

VER 0 MSNP7 MSNP6 MSNP5 MSNP4

The Client and the server have agreed on a version in which they will communicate.

 

Next the client sends a request to the server asking it for the name of the security package it supports for authentication.

INF 1

Unlike Yahoo, Rediff and a few other Messengers MSN does not actually send the password as it is.It encrypts the password while sending it ensuring that your password will not be leaked out easily if somebody monitors your port.

 

The server responds with this

INF 1 MD5

Here MD5 is the name of the security package which the server currently supports.

Next the client sends the userid to the server

 

USR 2  MD5  I  venky_dude@hotmail.com

Here the server does a check whether it contains all the relevant details about the user for authentication .If it does not then it sends the following reply

 XFR 2  NS 64.4.13.55:1863  0

What the server says is that the client should connect to the Notification Server(NS) on 64.4.13.55 on port 1863. We close the current connection and repeat the  steps while being connected to the new server i.e  64.4.13.55

  • (client)   VER 3 MSNP7 MSNP6 MSNP5 MSNP4 CVRO

  • (server) VER 3 MSNP7 MSNP6 MSNP5 MSNP4 

  • (client)   INF  4

  • (server) INF  4  MD5

  • (client)  USR  5  MD5 I venky_dude@hotmail.com

Now the server to which we are connected to has the relevant information about the user trying to log in. The server replies this way

USR 5  MD5  S 989048851.1851137130

 The string which is sent by the server is the " MD5 Hash". It is a hash generated by the server and is used in the authentication process. The client then has to send the password which is encrypted using the MD5 algorithm.In effect the client has to send the unique MD5 equivalent of the MD5 hash i.e 989048851.1851137130 in this case and the password combined .i.e. MD5 equivalent of (hash+pass). In this case it turns out to be 3b7926d277068ec49576a0c40598ff21.

USR 6 MD5 S 3b7926d277068ec49576a0c40598ff21

If the password is right then the server replies with this

USR 6 OK venky_dude@hotmail.com venkat

Here the last word is the nickname/name by which the user is known.

In the new version of the protocol (MSNP7) the server sends additional data like some general information about the user and a authentication code something similar to a cookie which can be used for various other functions.

 

MSG Hotmai Hotmail 362
MIME-Version: 1.0
Content-Type: text/x-msmsgspro file; charset=UT
LoginTime: 1011252477
EmailEnabled: 1
MemberIdHigh: 84736
MemberIdLow: - 1434729391
lang _preference: 103
preferredEmai l: venky_dude@hotmail.com
country: IN
PostalCode:
Gender: M
Kid:0
Age: 22
sid: 517
kv: 2
MSPAuth: 2AAAAAAAADU0p4uxxxJtDJozJSlUTS0i7YpwnC9PUHRv56YKxxxCTWmg$$

Now we are logged into the server but our status is still offline. We need to change our status to online in order to send and receive messages. The client does this in the following way

CHG 7 NLN

The server replies with friends who are online and in various states.

CHG 7 NLN

ILN 7 NLN btxxxe@hotmail.com nick
ILN 7 AWY wmpyxxx@msn.com mike
ILN 7 BSY tehpxxpxx@hotmail.com yeaxxx

MSG Hotmail Hotmail 223
MIME-Version: 1.0
Content-Type: text/x-msmsgsinitialemailnotification; charset=UTF-8

Inbox-Unread: 293
Folders-Unread: 0
Inbox-URL: /cgi-bin/HoTMaiL
Folders-URL: /cgi-bin/folders
Post-URL: http://www.hotmail.com

 

The next command to be sent to the server pertains to the version of the client currently being used.The client send to the server it's version number and also information about the machine like the OS and the build.

CVR 8 0x0409 win 4.10 i386 MSMSGS 4.5.0127 MSMSGS

Here 0x409 win 4.10 i386 specifies that the client is running win98 on a intel microprocessor, and MSMSGS 4.5.0127 MSMSGS here specifies the version and build no of msmsgs.exe (basically the version no of MSN messenger).

The server responds with the url to download the latest version and some other info

CVR 8 4.5.0127 4.5.0127 1.0.0863 http://download.microsoft.com/download/msnmessenger/install/4.5/win98me/en-us/mmssetup.exe http://messenger.microsoft.com

 

It is not necesarry to send the CVR command, the messenger protocol will function properly regardless of this command being sent

 

To get a list of people who are in our friends list we may send this command

LST 9 RL

On sending this command the server will reply by sending the reverse list .The reverse list is basically a list of users who can see you when you are online and send you a message.You could alternatively also request for the forward list by sending LST 9 FL .The forward list contains a list of all users whom the user has added to his/her list.

The server responds this way

LST 9 RL 69 1 19 venky_dude@hotmail.com venkat
LST 9 RL 69 2 19 puxxxxx@hotmail.com PUJA
LST 9 RL 69 3 19 vancxxxxx@hotmail.com ramachandran
LST 9 RL 69 4 19 moxxxxx@hotmail.com chandramouli
LST 9 RL 69 5 19 v_n_xxxxx@hotmail.com Narayanaswamy
LST 9 RL 69 6 19 dexxxxx@hotmail.com Venkatesh
LST 9 RL 69 7 19 lousydxxxxx@hotmail.com deepika%20kalyani%20Vairam                                                  LST 9 RL 69 8 19 hexxxxxr@hotmail.com Hetchar%20Ramachandran
LST 9 RL 69 9 19 ambxxxxx@hotmail.com Aiyer
LST 9 RL 69 10 19 suxxx@hotmail.com Ganesh
LST 9 RL 69 11 19 deexxxxx@hotmail.com Deepak
LST 9 RL 69 12 19 anilxxxxx@hotmail.com anil
LST 9 RL 69 13 19 dixxxxx@hotmail.com <Diamond>
LST 9 RL 69 14 19 nvxxxx@hotmail.com giri
LST 9 RL 69 15 19 shxxx@hotmail.com Hari
LST 9 RL 69 16 19 radhikashuxxxxx@hotmail.com radhika
LST 9 RL 69 17 19 eskaxxxxx@hotmail.com kannan
LST 9 RL 69 18 19 shaxxxxx@hotmail.com Shankar
LST 9 RL 69 19 19 puneetagarxxxxx@hotmail.com puneet

 

 

*Every time a friend comes online the server(NS) sends us the following command

NLN 10NLN deaxxxx@hotmail.com Venkatesh

and when the friend goes offline the server sends us this

FLN 10 FLN deaxxxx@hotmail.com

With the MSNP7 protocol msn has introduced a new challenege authentication mechanism. The MSN server sends t a challenge key which the user has to authenticate succesfully in order for the session to continue.

CHL 0 20881396011366812350

 

The client has to send the md5 equivalent of this string which is formed by appending this hash with the string "Q1P7W2E4J9R8U3S5".So the final string which will be sent to the server will be the md5 equivalent of 20881396011366812350Q1P7W2E4J9R8U3S5

i.e MD5string(20881396011366812350Q1P7W2E4J9R8U3S5 )

So the client response would be something like this

QRY 18 msmsgs@msnmsgr.com 32
0212eaad0876afb8505859ca75d21a78

Here 18 is the trial id .Replace it by the appropriate trial id in your program .

The server will respond in the following way if the authentication is right

QRY 18

We have successfully logged into the MSN Messenger server. The Instant Messaging phase is next.






Instant Messaging in MSN Messenger is session based . The people in between whom the conversation is going to take place have to be in a session mode. We cannot send/receive messages unless we start a chat session with a user. 

There are basically two methods in  which a user can be in a chat session                                                           

  • User sends a chat session request to another user
  • User receives a chat session request from another user

 

User sends a chat session request

 

The client(user) sends a command to the server asking it for the address of the SwitchBoard(SB) server. All instant messaging conversation take place via the switchboard server.

XFR 9 SB

The server(SB) replies back with the ip address of the switchboard server(SB),the port on which to connect and a CKI hash. CKI is a security package and the client has to use the hash to connect to the switchboard server.

 XFR 9 SB 64.4.13.88:1863 CKI 989487642.2070896604     

Now we have to make another  new connection this time to the switchboard server. Our previous connection to the MSN messenger server  must be kept as it is. If we lose connection with that server we would log out.

After we have connected to the switchboard server(SB) we send the following command to the switchboard server.

USR 1 venky_dude@hotmail.com  989487642.2070896604  

If the CKI hash sent by us is right the server(SB) responds back with this

USR 1 OK venky_dude@hotmail.com venkat

After this has been done the user has to "Call" the other user to the chat session. This is done by sending the following command.

CAL 2 deadxxx@hotmail.com 

The server replies back with the a session id which it will pass on to the other user

CAL 2 RINGING 11717653

When the other user replies and is ready for a chat the server(SB) sends us this command

JOI deadlee@hotmail.com Venkatesh

This indicates that the other user has joined in the conversation and we are now ready to send and receive messages.

 

User receives a chat session request

When we are being invited to a chat session by a user the server(NS) send us the following message.

 

RNG 11742066 64.4.13.74:1863 CKI 989495494.750408580 deaxxxx@hotmail.com Venkatesh

Here the server(NS) sends us the session id ,the ip address of the SwitchBoard server to connect to,the port on which to connect to ,the CKI hash and the user trying to start a conversation with us.

Now we have to make another  new connection this time to the switchboard server. Our previous connection to the MSN messenger server  must be kept as it is. If we loose connection with that server we would log out.

We  connect to the switchboard server and send the following command

ANS 1 venky_dude@hotmail.com 989495494.750408580 11742066

Here we send our login name ,the CKI hash that was sent to us and the session Id that was sent to us

The server responds back with 

IRO 1 1 1 deaxxxx@hotmail.com Venkatesh

and

ANS 1 OK

We are now ready to send and receive messages.

 

Before sending/receiving messages let us see how the message is constructed.

When we are sending a message we build the header information  in the following way

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-MMS-IM-Format: FN=Microsoft%20Sans%20Serif; EF=; CO=0; CS=0; PF=22

While sending a message we send it this way

MSG  2  N 137                                                                                                                                                            MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-MMS-IM-Format: FN=Microsoft%20Sans%20Serif; EF=; CO=0; CS=0; PF=22

hello

Here 2 is the trial id which has to incremented each time we send a message. 137 is the total length of the message i.e length of the header and length of the actual message that we are sending in this case it is 'hello'.

 While receiving the message it is more or less similar

Here is an example of a message received

MSG deaxxxx@hotmail.com Venkatesh 137
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-MMS-IM-Format: FN=Microsoft%20Sans%20Serif; EF=; CO=0; CS=0; PF=22

hello

 

When the other user is typing a message we receive the foll message

MSG deaxxxx@hotmail.com Venkatesh 100
MIME-Version: 1.0
Content-Type: text/x-msmsgscontrol
TypingUser: deaxxxx@hotmail.com

 

I guess now u guys are well on your way to make your own version of  MSN messenger.Post your doubts/comments/message in the Forumn .Do visit my projects page for some cool vb & c++ codes

 I'll keep adding to the protocol ,will try to put in addition functions like add/remove users ,rename user id,file transfer and voice chat, so keep checking back

 

References:

You could take a look at these sites for more information

This is the original protocol published by microsoft.

http://www.tlsecurity.net/Textware/Misc/draft-movva-msn-messenger-protocol-00.txt

This is the MD5 homepage where u can find programs/codes for doing the MD5 encryption

http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html

皮肤病识别 - 使用DenseNet或EfficientNet模型在ISIC数据集上进行皮肤病识别任务 在本篇博客中,我们探讨了如何使用 DenseNet 和 EfficientNet 模型在 ISIC 数据集上进行皮肤病识别任务。我们加载了数据集,并进行了预处理。然后我们使用 Keras 构建了两个不同的模型,并训练和评估了它们。最后,我们使用训练好的模型对新的皮肤病图像进行了预测。 阅读详情

相关推荐

Android GWP-Asan机制详解

基本用途:GWP-ASan是一种原生内存分配器功能,在内存分配时额外记录一些信息,用于检测DOUBLE_FREE、USE_AFTER_FREE、INVALID_FREE、BUFFER_OVERFLOW、BUFFER_UNDERFLOW五种内存错误问题。

专注于系统快稳省领域 4157

Failed to install XXXX.apk on device '5358baa3': timeout

eclipse连入真机测试的时候老是安装不上。出现一下情况: [2015-03-24 09:50:10 -XXXX] Android Launch! [2015-03-24 09:50:10 -XXXX] adb is running normally. [2015-03-24 09:5...

chumomin2634的博客 2万+

PyCharm中安装OpenCV全指南:从环境配置到报错解决

Python开发中,环境配置往往是新手入门的第一道坎。理解解释器、虚拟环境与包管理工具pip之间的关系,是解决ModuleNotFoundError等问题的关键。PyCharm作为常用IDE,其项目默认创建独立虚拟环境,若在系统终端安装的OpenCV与该环境不一致,便会导致import cv2失败。OpenCV作为计算机视觉领域的基础库,广泛应用于图像处理、摄像头调用及深度学习预处理等场景。掌握基于虚拟环境的安装与验证方法,不仅能一次性解决cv2导入错误,还能为后续项目隔离依赖、避免版本冲突打下基础。本文从

weixin_31742871的博客 301

MSNP18协议分析(一)--- MSN协议介绍

主要介绍MSNP18协议的发展和基本概念,为这一些列的开篇。

CC的技术专栏 7301

维纳滤波和卡尔曼滤波

本文的主要内容是维纳滤波和卡尔曼滤波的介绍,包含匹配滤波器、维纳滤波器、维纳预测、卡尔曼滤波等内容。

西岸贤 9532

SAP-ABAP:SAP创建CDS视图(SQL语句创建)实例详解

通过Eclipse和ADT创建CDS视图是SAP开发中的一项重要技能。CDS视图不仅简化了数据建模,还提供了高性能和灵活性。掌握CDS视图的开发和使用,可以帮助你更好地支持SAP S/4HANA和Fiori应用的开发。

baidu_35680696的博客 1827

CentOS 7 静默安装Oracle11g R2

CentOS 7 静默安装Oracle11g R2

记昨日书的博客 425

LabVIEW进行MQTT通信及数据解析

该文章介绍了LabVIEW的MQTT通信的开源VI控制,以及如果进行数据的解析,特别是一些需要注意的点

heda3的博客 4118

HDOJ 1201 18岁生日

HDACM1201 如果他的生日是xxxx年2月29日,若xxxx+18不是润年则输出-1,否则开始判断他是在3月前出生还是在3月后出生,若是3月前出生,则判断今年是不是闰年,是闰年则+1,若是3月后出生则判断下一年是不是闰年,是闰年则+1,依次循环到第17年。import java.util.Scanner;public class Main{ public static void ma

whale blog 6万+

DeepFashion 服装识别:基于 YOLOv10 的深度学习实现与 UI 界面开发

随着深度学习的发展,目标检测算法在服装识别任务中表现出色,特别是 YOLO(You Only Look Once)系列模型。服装识别(Fashion Recognition)是计算机视觉领域的重要任务,广泛应用于。已提供,可用于服装分类、款式识别、虚拟试衣等应用。训练服装识别模型,并开发。

YOLO 805

点云体积计算方法之一 附python代码

另外需要注意,这个只适合点云密集分布的场景来计算体积,比如树木扫描的体积;如果只是有表面积扫描的点云,该方法就不能计算整个物体的体积了。通过计算点云所占用的体素的数量来计算点云的近似体积。这是一个非常粗略的近似值,对于复杂的形状可能不准确。

三维点云技术探索 1893

Android 源码编译如何确定模块安装的位置

1、system/app include $(BUILD_*)  LOCAL_* include $(BUILD_PACKAGE)#or#LOCAL_MODULE_CLASS := APPSinclude $(BUILD_PREBUILT) not set LOCAL_MODULE_PATHnot set LOCAL_MODULE_RELATIVE_PATHnot set LOCAL_PROPRIETARY_MODULEn

cczhengv 6441

C#上位机与西门子PLC全链路通信实战教程:数据采集+SQL存储+数据库报表查询+报警历史完整实现

在工业自动化领域,西门子PLC(S7-200Smart/1200/1500)凭借稳定的性能、强大的功能、完善的生态,稳居工业控制器的主流地位;而凭借开发效率高、界面美观、兼容性强、数据库操作便捷的优势,成为工业上位机开发的首选编程语言。二者的组合,是目前制造业、自动化产线、智能仓储、暖通自控等场景的绝对主流方案,也是工业上位机工程师必须吃透的核心技术栈。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1872

Jono's Linux Top Tips

  Jonos Linux Top Tips by Jono Woodhouse-------------------------14 May 2008 : Jono WoodhouseVersion 2.22------------------------------------------------------------------------

ldong2007的专栏 3万+

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

工作中使用到的单词(软件开发)

1.エイリアス   alias 别名 powershell使用 get-help 命令时,会得到与此命令 相关(别名)的命令 2.プロキシ proxy 代 理 3.プロモート   promote 促进,提升   开发的系统新功能上线发布,有时会使用到这个词,比如 STプロモート 还有使用リリース这个词的。比如STリリース。个人认为两者含义相同。 4.見逃し み................................................................

sun0322 6万+

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

hdoop面试题6 后面的面试题各公司面试题,算法数据结构相关面试题 后面没看 阿善有用...

1.列出安装hadoop流程步骤 a)创建hadoop账号 b)更改ip c)安装java更改/etc/profile配置环境变量 d)修改host文件域名 e)安装ssh配置无密码登录 f)解压hadoop g)配置hadoopconf下面的配置文件 h)Hadoopnamenode-format格式化 i)Start启动 2.列出hadoop集群启动中的...

okbin1991的博客 2万+

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

Connecting to https://XXXXXXXXXXXXXXXXXXXXXXXX:8440/ca

INFO 2017-08-05 01:14:38,849 HeartbeatHandlers.py:115 - Stop event received INFO 2017-08-05 01:14:38,849 NetUtil.py:125 - Stop event received INFO 2017-08-05 01:14:38,849 ExitHelper.py:53 - Performi

wangjunji34478的专栏 48万+

MySql 存储过程 将15位xxxx转化为18位返回

DROP PROCEDURE IF EXISTS get18Id; /* 功能名称: 将15位身份证号转化为18位返回,非15位身份证号原值返回 作者:InJavaWeTrust 日期:2016/02/25 参数 IN/OUT 类型 说明 identityCard IN ...

19万+

android18lazuli,Free 18 Japan for you on AliExpress.

Great news!!!You’re in the right place for free 18 japan. By now you already know that, whatever you are looking for, you’re sure to find it on AliExpress. We literally have thousands of great product...

weixin_34779181的博客 93万+

关于MSNP协议的连接说明

Connections OverviewAll connections to MSN servers take place over TCP/IP. The client always makes the outgoing connections to the servers. The official port for MSN Messenger is 1863, although there

南京程序员俱乐部 1753

验证(15位或者18位)身份证号码的正确正则表达式

我们在开发页面的过程中难免会遇到一些表单验证,以下就对身份证号码进行验证,在开发过程中做的简单笔记: 身份证号码: 18位(xxxxxx yy MM dd xxxx) 15位(xxxxxx yy MM dd xxx) 正则表达式: /1\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}KaTeX parse error: Expected 'EOF',...

MrGuo522的博客 7万+

正则表达式

------- android培训、java培训、期待与您交流! ----------  1  匹配 手机号段只有13xxx  15xxx  18xxx String telReg="1[358]\\d{9}"; /* 校验qq号码,首位不能是0,由0到9数字组成,5到15位 */ class QQDemo { public static void main(String[] a

黑马程序员_技术日记 3万+

linux系统基本命令

本人从事linux平台开发两三年的一些笔录,有些零碎,但很实用,都是在实战过程记录下来的。

Eikis的博客 7912

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxxxx

问题: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yss.cn.modules.mapper.TBaseAuthMapper.queryTBaseAuthList 解决方案:配置文件没有配置mybatis信息 #mybatis mybatis.mapper-locatio...

y368769的博客 8818

MSN协议中文释义(Zz)

我们可以把MSN的工作机制分成两个阶段:认证阶段认证阶段包括登陆到MSN即时通的服务器并且取得好友列表即时通讯阶段即时通讯阶段包括发送/接受进入即时通讯阶段的请求和发送/接受消息。MSN即时通讯软件的协议是基于ASCII码的协议,用其他话来讲就是所有的命令都必须是英文的!第一个阶段包括连接到MSN即时通软件的服务器。在这个阶段我们应该连接到服务器“messenger.hotmail.com”的18

【反思—FANCC】的专栏 4411

EVM18xx

<br />EVM18xx

gogoyuan2010的专栏 2万+
上一篇: 对MSNP9协议的简单使用示例
下一篇: 关于MSNP协议的连接说明
大雨仔
博客等级 码龄23年 28粉丝 159原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址