梁亦清++林嘉靖++孫嘉敏
摘要:為了使遠(yuǎn)程控制軟件順利的通過windows防火墻和殺毒軟件的封鎖,與服務(wù)器端主機(jī)進(jìn)行實時通信。該文分析與闡述了通過可靠的TCP協(xié)議建立的套接字技術(shù),綁定反彈端口,實現(xiàn)了服務(wù)端程序始終對反彈端口進(jìn)行實時監(jiān)聽。
關(guān)鍵詞:反彈端口;套接字編程;MFC;遠(yuǎn)程控制
中圖分類號:TP311 文獻(xiàn)標(biāo)識碼:A 文章編號:1009-3044(2016)06-0018-03
Application and Implementation of Rebound Port in Remote Control Software
LIANG Yi-qing, LIN Jia-jing, SUN Jia-min
(Department of Mathematics and Computer Science,Northwest University for Nationalities, Lan Zhou 730100, China)
Abstract: In order to make remote control software pass the blockade of windows firewall and anti-virus software so as to carry out real-time communication with the sever host, this paper conducts an analysis and elaboration on how to apply socket technology established by reliable TCP protocol to bind rebound port and realize persistent real-time monitoring on rebound port with server program.
Key words:rebound port; socket programming; MFC; remote control
1 背景
使用一般的主動連接服務(wù)器型的遠(yuǎn)程控制軟件很容易被防火墻所阻止,而使用反彈端口技術(shù),可以通過傳統(tǒng)的端口輕松透過防火墻以及其他防病毒軟件,尤其是通過一些特殊的端口,如網(wǎng)頁瀏覽端口80,F(xiàn)TP端口23,Telnet端口21等,在這樣的情況下,在windows客戶機(jī)上通過反彈端口連接服務(wù)器,既能滿足控制軟件和服務(wù)器之間進(jìn)行通信,也能滿足控制軟件在客戶機(jī)上進(jìn)行操作。
2 需求分析
設(shè)計一個通過反彈端口進(jìn)行主動通信的客戶端軟件以及一個管理服務(wù)器,客戶端軟件根據(jù)服務(wù)器端指令對客戶機(jī)進(jìn)行控制及管理,這里只對一些常用操作進(jìn)行管理。
3 軟件設(shè)計
3.1 服務(wù)器端軟件
服務(wù)器端軟件主要是完成接收客戶端發(fā)送的信息,同時能夠提供人機(jī)交互界面,對客戶端進(jìn)行設(shè)置,主要流程如圖1所示: