- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
远程Shell(国外英文资料)
远程Shell(国外英文资料)
Header file and basic parameter definitions
In the beginning of the program, we should be the following header file: the procedures used in the Strcat () function string, it contains a String.h; Winsock programming technique used in this program, of course Winsock2.h is essential:
#include stdio.h
#include string.h
#include winsock2.h
Next, this is to use the network communication function defined in Ws2_32.lib:
#pragma comment (LIB, ws2_32.lib)
In order to open the port for communication, here we randomly assigned a port 1234 as communication port server monitoring, once on the 1234 connection request server can be some corresponding treatment:
#define PORT 1234
Here are some of the most common global variable declarations: ServerSocket is the socket used by the server, and ClientSocket is the socket used by the client. In order to read and write operations from anonymous pipes, declare four handles, wherein hReadPipe and hWriteFile are for the thread processing function of ThreadFuncRead services, while the other two were for the thread processing function of ThreadFuncWrite services. Because we want to write and read data into the communication buffer by using WriteFile and ReadFile, so File is used here. I hope the readers can understand it. In order to make the program to determine whether the server program is still in the normal work, also defines two variables varRead and varWrite, when these two variables are of 1 when the program is considered the two thread function pipeline read and write are ready, will continue the following operation:
SOCKET ServerSocket = INVALID_SOCKET;
SOCKET ClientSocket = INVALID_SOCKET;
HANDLE, hReadPipe, hWritePipe, hWriteFile, hReadFile;
U_char, varRead, varWrite;
Socket: the pipeline is a simple inter process communication mechanism for Windows systems, named pipes and anonymous pipes, two. Named pipes can be used between different processes on the same computer, anonymous pipes can only be used in the parent-
您可能关注的文档
最近下载
- 光伏电站运行常见故障及技术解决方案.pdf VIP
- 军队文职考试《公共科目》试题与参考答案(2024年).docx VIP
- 生成式AI在小学英语课堂中的应用:教师教学决策优化研究教学研究课题报告.docx
- 初二物理导学案-全一册.pdf VIP
- 邮政企业快递企业安全生产重大事故隐患判定标准解读.pdf VIP
- 人民大2023学术规范和论文写作PPT第2章 选:论文选题与研究设计.pptx VIP
- 2025年中国食品级碳酸氢钠数据监测报告.docx
- 能源与动力工程研究教授——程林同志事迹材料— .doc VIP
- 高中物理竞赛-话题5:多质点在动态多边形顶点的相遇问题和多解问题.doc VIP
- 《提升基层干部管理能力》课件.ppt VIP
文档评论(0)