亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? windows internet programming part1.html

?? a collection of mega hacking tools
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<html>

<body>

<pre>

<font color=red>

              _________________

             /_               /\  

              \/  _______    /  \

              /  /      /   /   /

             /  /______/   /   /

            /           __/   /

           /  _______   \  __/

          /  /      /   /  \

         /  /______/   /   / 

       _/             /   /      

      /______________/   /       BLACK SUN RESEARCH FACILITY

      \              \  /      	   <a href="http://blacksun.box.sk">HTTP://BLACKSUN.BOX.SK</a>

       \______________\/





</font>





WINDOWS INTERNET PROGRAMMING

=================================================







   WRITTEN BY                 [ <a href="mailto:cos125@hotmail.com">cos125@hotmail.com</a>                :E-MAIL    ]      

           <a href="mailto:cos125@hotmail.com">BINARY RAPE</a>        [ 114603188                         :ICQ#      ]      

                              [ <a href="http://www.geocities.com/wininetprogram">www.geocities.com/wininetprogram</a>  :WEB SITE  ]

                              [ <a href="http://blacksun.box.sk">http://blacksun.box.sk</a>            :TURORIALS ]      











Thanks to cyberwolf for letting me write this and BSRF for releasing it.







Disclaimer

=======================================



None of the information or code in this tutorial is meant to be used against others

or to purposely damage computer systems or cause any loss of or damage to property.



Further more neither myself or any other contributor to, or member of, the Blacksun

research Facility (BSRF) can be held responsible for damage or loss of property of

computer systems as a result of this tutorial.



In this tutorial the code is provided as a learning aid so you can see how its done

its not meant for you to use against yourself or others.



Also in the Exercises sections you are encouraged to alter the code and improve it.

I say create or build a program to do something not create or build a program to do

something and use it for that purpose.





CONTENTS

=======================================



1.  Introduction

2.  Different types of Sockets

3.  Protocols

   

    3.1 What is TCP

    3.2 What is UDP - An alternative

    3.3 Introducing IP - The main protocol

    3.4 TCP and UDP common functions

    3.5 UDP specific functions

    3.6 TCP specific functions

    3.7 Structures

    3.8 Converting

    3.9 The application layer



4.  Clients and servers



    4.1 Bracaman's Server example - Win32

    4.2 Bracaman's Client example - Win32



5.  Exploring the Winsock

   

    5.1 Looking at inet_addr()

    5.2 Looking at htons()

    5.3 Exploring Winsock functions



    [ EXERCISES ]



6.  Common Internet Programs



    6.1 DNS

    6.2 Port Scan

    6.3 Nuker



    [ EXERCISES ]



7.  E-Mail - SMTP



    [ EXERCISES ]



8.  WinInet - FTP



    [ EXERCISES ]



9.  Another Protocol - ICMP



    [ EXERCISES ]



10. Other Internet code



    10.1 Internet connections

    10.2 CGI Programming



    [ EXERCISES ]



11. Last Words





    Questions And Answers





    APPENDIXES 



    A - The Compiler

    B - IP and Port Numbers

    C - Servers and Clients

    D - Routers and Gateways

    E - Further reading

    F - Code







________________________________________________________________________________________________________





1.0 INTRODUCTION

=======================================



Welcome to Windows Internet Programming Part 1, the demented ramblings of a drunken Irish man.





Learning Internet programming can be very useful in many areas, not just for programmers that 

wish to expand their knowledge but also to network administrators who should be more familiar

with how it all works and students who need to learn quick or they will fail their exams ;).



Even if you just want to learn programming as a hobbie then internet programming is a very easy

way to get more power over connections and to better understand whats really going on underneath

the hood of the internet.



The language of choice in this tutorial is c++ and the compiler is microsoft visual c++. To find

out how to set up your compiler for internet programming skip on ahead to Appendix A - The Compiler.



If you are not familiar with several topics on the internet such as the following:



1. IP address's and Port numbers.

2. Server and client relationships.

3. Routers and Gateways.



Then I suggest you at least read the sections Appendix B, Appendix C and Appendix D,

or goto Appendix E - Further Reading.



The protocols TCP, UDP, ICMP and IP are going to be discussed in the following sections but

they will all be addressed as we meet them so don't worry too much about them right now :).



Most of the following sections have an Exercises section at the end, just some suggestions about what

to do with the code after you read the section.



Youy are free to distribute the code that I write in this tutorial and this tutorial itself but

remember you must keep it intact. Use this file as a reference for anything you want even your own

papers or tutorials but please let me know if you do, id just like to know if this tutorial is of use

to you.



Ive made a website to coincide with this, and future tutorials and it should have a mailing list on it to,

this website will have articles and source code that are like add-on's to the tutorial, even when its finished.

The site should deal with internet technologies and programming in general as well as this tutorial.



The url is available at the top of the page (^ UP THERE ^).



There should be more additions to this tutorial soon as this is only version 1.0.



Feel free to send comments, questions and suggestions to me at my e-mail address above or add me to your

icq list.



Well without further adue Please read on as because im about to send this e-mail onto cyberwolf because

he keeps giving out to me for it being late :).





(Sorry cyber ive just been having alot of sex the last couple of weeks)



________________________________________________________________________________________________________





2.0 DIFFERENT TYPES OF SOCKETS

=======================================



There are 2 different main types of Sockets.



1. Streaming sockets.

2. Datagram  sockets.



Programming TCP and UDP from scratch is difficult and involves alot of overhead. For this reason 

the idea of sockets were created. The socket paradigm was developed at the University of California 

at Berkelely. These sockets were designed for unix and similiar operating systems. In January of 1993 

the Winsock was created to keep Bill Gates feet warm.. nnaahhh winsock is short for Windows Sockets 

and is an implementation of Berkeley sockets but designed to take advantage of Windows message driven

architecture.





The winsock API was designed quickly in order to get it out as early as possible and therefore the 

scope of the architecture mostly focused on TCP/IP but could still implement protocols such as 

UDP (thankfully!).



Because Windows Sockets is based on the same sockets as unix, porting is quiet easy between the two, 

we'll cover porting and multiple platform support in a later tutorial.



The Winsock is implemented trough the Winsock32.DLL in one of you system folders. It acts as a 

layer between you (the programmer) and the hardware level (where packet generation and so on takes place).



You provide some perameters for the winsock such as the contents of the datagram, the target IP 

address and the target port number and by calling some functions like sendto(); or recvfrom(); the 

winsock creates the neccessary packets and sends or recieves datagrams.



The current version of Winsock is 2.0 and it takes more advantage of windows messaging and implements 

better support for protocols other than TCP/IP.







      +----------------------+    +-------------------------+      	Your Application

      |                      |    |                         |

      | Winsock2 Application |    | Winsock 1.1 Application |

      |                      |    |                         |

      +----------------------+    +-------------------------+

                 |                                  |

                 |                                  |

                 |                                  |

      +-----------------------------------------------------+      	The Winsock

      |         Wsock32.dll - The Winsock DLL               |

      +-----------------------------------------------------+

                                |

                                |

                                |

      +-----------------------------------------------------+      	The Transport Layer

      |                The Hardware Layer                   |

      +-----------------------------------------------------+





      FIG 1. - How your program and sockets talk.





________________________________________________________________________________________________________





3.0 PROTOCOLS

=======================================



There are several protocols that we use in internet programming.

The first is IP and this is the base layer for Protocol programming.

The next 2 protocols are TCP, which is orientated with streaming sockets,

and then theres UDP which is orientated around datagram sockets.



Using these protocols we can build programs which run on the application layer and form

protocols such as FTP and HTTP.





3.1 WHAT IS TCP?

=======================================



TCP is the Transmission Control Protocol.



TCP is a protocol developed to make sure that packets were not lost on the internet as routers sent them 

from computer to computer. You see when you want to send a file across the internet trough TCP you send

the file to the "TCP stack" (which is just another way of saying the Winsock).



TCP then splits up the file into little pieces, each piece is called a datagram, the size of each piece

depends on how good the tcp is on your computer and on the computer your sending the file to.



So if your computer can handle datagrams that are 1 kb large and smaller and your friends computer can 

handle datagrams that are 500 bytes large and smaller, your TCP will divide a file into datagrams that 

are 500 bytes largeso that both your computer and your friends can handle the size of the datagrams.



Otherwise it would be like trying to push a triangular peg into a round hole, it wouldn't fit.

The same as trying to squeeze digital larceny's mother into a normal bus seat, her ass is just too fat.



Now TCP was designed to keep track of every piece that it sends and to do so it numbers every datagram 

that it creates, so we have 3 datagrams from a 1.5 kb file, first datagram is numbered 0, second 500 and

third is 1500.



Thanks to this numbering feature and some built in error checking functions TCP ensures that when you 

send the datagrams A, B and C in that order they arrive in the order A B C and not something like C A B.



But how does TCP store these numbers? These numbers along with other information about the datagram, 

such as the IP address and port number of where its being sent, is stored in something called a header.



A Datagram is wrapped up in a Header which contains information, this is why TCP was created, to store

and control the safe sending and recieving of Datagrams across the internet.



So with this example in mind say if I wanted to send a 1.5 kb file to a friend. Its a fairly small file 

compared to most but still big enough that it needs to be split up by TCP.







      +-----------------+      	File before being sent

      |   1.5 kb file   |

      +-----------------+

               |

         +-----+------+

         |     |      |

      +----+-----+------+      	File split into datagrams on a 500 byte TCP connection

      | 0  | 500 | 1500 |

      +----+-----+------+

        |     |      |

        |     |      |

      +----+-----+------+      	TCP headers wrapped around Datagrams

      | H  |  H  |  H   |

      +----+-----+------+

      | 0  | 500 | 1500 |

      +----+-----+------+







      FIG 2. - TCP spliting a file into datagrams and wrapping them in their header.





3.2 WHAT IS UDP - AN ALTERNATIVE

=======================================



UDP was designed as an alternative to TCP, only problem is while TCP has built in error checking and

ensures that your file is recieved just the same way as it was sent UDP doesn't it just sends out its

datagrams and lets them find their own way to the host.



With TCP your quarenteed your sending A B C to a person but with UDP it could be more like B A C.



Because of this UDP is considered unreliable and is not counted on for important transfers.

Still UDP is not as bad as every-one says and the error rate is kinda low, still for important transfers

you just can't count on 'kinda' low.



UDP is better used on lan's and ethernet's than the internet because on these smaller networks it is

extremely rare that you would loose a datagram.



So if it is so unreliable why was it created?



Well there is a reason UDP is unreliable, it sacrifices its reliability for speed. There are many cases

where UDP is a definite advantage such as when you only need one datagram sent, then you wouldnt need to

worry whether A B C arrived in order cos' your only sending A.



UDP wraps datagrams in its own header for transmission, these headers are smaller and contain less info

than TCP headers but like I said sometimes UDP is a definite advantage.





3.3 INTRODUCING IP - THE MAIN PROTOCOL

=======================================



IP stands for Internet Protocol and all other protocols such as TCP and UDP ride piggy back on it.

IP doesn't divide files up into datagrams and the like it already has that job done for it by TCP and UDP.



IP is sent the datagram with a header wrapped around it (either a TCP or UDP header it doesn't matter),

and it wraps its own header around it.



Now we have a datagram with 2 seperate headers wrapped around it, the TCP header and the IP header.

This formation is known as an IP Packet. All information, e-mails, web-pages, messages and files are sent

across the internet in IP Packets.



IP headers are used to provide information to routers as opposed to, say for example TCP, whose headers

are meant for servers and clients to tell them how to put datagrams together.



The IP header contains information like the IP# and port number of the host its being sent to, which it 

extracts from the TCP or UDP header, so that it can tell the routers where it wants to go.



The TTL is the Time To Live of the packet we are sending. Rather than the time to live specifying the 

amount of time in seconds or minutes that the packet exists for it contains a number which states how many 

routers the packet can meet before it is destroyed. The TTL is a number specified by you (the programmer).



For example if we set the time to live field as 10 in the IP header then the packet can meet ten 

routers before it is destroyed. Each router that the packet meets subtracts 1 from the number so that after 

the packet meets the first router the TTL will be equal to 9 and after the second it will be 8.



When the TTL hits 1 the router subtracts 1, gets 0 and throws away the packet, this is to ensure that 

if a packet gets lost it wont just wander around the internet forever.







      +-----------------------+

      |       IP Header      	|

      +-----------------------+

      |+---------------------+|

      ||     TCP  Header     ||

      |+---------------------+|

      ||+-------------------+||

      |||                   |||

      |||     Datagram      |||

      |||      	          |||

      |||                   |||

      ||+-------------------+||

      |+---------------------+|

      +-----------------------+



      

      Fig 3. - Structure of an IP Packet.





3.4 TCP AND UDP COMMON FUNCTIONS 

=======================================



TCP and UDP contain both common and different functions. All of these functions are contained within the 

winsock.h header file (which is contained in windows.h).



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久精品国产| 日韩欧美自拍偷拍| 91精品在线麻豆| 国产精品久久久久9999吃药| 日韩专区一卡二卡| 成人免费看黄yyy456| 日韩视频免费观看高清完整版| 国产精品色婷婷| 国产一区美女在线| 欧美日韩精品久久久| 综合分类小说区另类春色亚洲小说欧美| 麻豆精品蜜桃视频网站| 在线观看国产精品网站| 17c精品麻豆一区二区免费| 久久99精品久久久久婷婷| 欧美卡1卡2卡| 亚洲综合色网站| 日本韩国欧美国产| 中文字幕中文字幕在线一区| 国产经典欧美精品| 欧美tickle裸体挠脚心vk| 亚洲chinese男男1069| 色噜噜狠狠色综合欧洲selulu| 综合久久给合久久狠狠狠97色 | 成人av电影在线| 精品国内二区三区| 日韩高清一区在线| 欧美精品日韩综合在线| 亚洲国产精品一区二区久久| 色综合久久综合中文综合网| 亚洲国产精品二十页| 国产91精品露脸国语对白| 久久久99免费| 国产精品88av| 欧美经典一区二区| 成人app软件下载大全免费| 欧美激情在线观看视频免费| 成人一区二区三区| 国产精品久久久久影院亚瑟 | 激情综合色综合久久| 日韩欧美国产综合一区| 久久精品国产**网站演员| 91精品免费观看| 久久精品国产99国产精品| 精品欧美一区二区三区精品久久| 毛片基地黄久久久久久天堂| 精品国产伦一区二区三区观看体验| 久久国产精品第一页| 国产校园另类小说区| 99久久精品费精品国产一区二区 | 国产日韩欧美综合在线| 国产精品系列在线观看| 国产精品每日更新在线播放网址| 一本大道久久精品懂色aⅴ| 亚洲二区视频在线| 日韩欧美一区二区免费| 成人午夜视频在线| 亚洲综合一区二区三区| 日韩美一区二区三区| 成人丝袜高跟foot| 亚洲综合在线电影| 欧美电影精品一区二区| 96av麻豆蜜桃一区二区| 亚洲国产一区二区a毛片| 日韩免费成人网| 99久久久国产精品免费蜜臀| 日韩国产欧美在线视频| 国产日本亚洲高清| 欧美亚洲一区三区| 国产自产视频一区二区三区| 亚洲另类色综合网站| 精品国产乱码久久久久久闺蜜| 96av麻豆蜜桃一区二区| 久久99精品久久久久久久久久久久 | 国内外成人在线视频| 日韩伦理电影网| 精品久久久久久无| 欧洲av一区二区嗯嗯嗯啊| 国产一区二区三区黄视频| 一区二区久久久| 久久婷婷色综合| 欧美麻豆精品久久久久久| 高清国产午夜精品久久久久久| 日韩国产欧美在线播放| 综合激情网...| 国产清纯美女被跳蛋高潮一区二区久久w | 国产精品久久久久久久久果冻传媒| 欧美视频中文一区二区三区在线观看| 国模一区二区三区白浆| 亚洲电影一区二区| 国产精品超碰97尤物18| wwwwww.欧美系列| 91精品国产入口在线| 色诱亚洲精品久久久久久| 国产精品一区专区| 久久国产人妖系列| 日本在线不卡视频| 亚洲综合一区在线| 亚洲免费三区一区二区| 国产欧美精品区一区二区三区| 日韩欧美一区中文| 欧美欧美欧美欧美首页| 欧美在线观看视频在线| 91免费国产在线观看| 成人av小说网| www.色精品| 成人18视频日本| 丁香另类激情小说| 国产成人在线视频网站| 国产精品亚洲第一| 国产一区二区久久| 国产剧情一区在线| 韩国精品主播一区二区在线观看| 久88久久88久久久| 麻豆视频一区二区| 国内精品写真在线观看| 国产精品一区二区黑丝 | 婷婷国产v国产偷v亚洲高清| 亚洲国产精品综合小说图片区| 一区二区三区成人| 亚洲成人一二三| 日韩av一二三| 国内久久精品视频| 国产成都精品91一区二区三| 成人激情黄色小说| 色丁香久综合在线久综合在线观看 | 日韩午夜激情免费电影| 欧美一卡二卡在线| 精品国产欧美一区二区| 久久久久久久电影| 中文字幕一区二区三区精华液| 椎名由奈av一区二区三区| 亚洲乱码国产乱码精品精的特点| 亚洲靠逼com| 日韩精品成人一区二区三区| 蜜臀av一区二区| 粗大黑人巨茎大战欧美成人| 99久久99精品久久久久久| 欧美少妇一区二区| 欧美一区二区三区四区五区| 2019国产精品| 一区二区三区加勒比av| 日韩电影在线免费看| 高清国产一区二区| 欧美性色综合网| 欧美zozo另类异族| 国产精品人人做人人爽人人添| 亚洲综合色噜噜狠狠| 激情综合网激情| 色狠狠一区二区| 久久久精品综合| 亚洲成在线观看| 国产99久久久国产精品| 欧美日韩激情一区二区三区| 久久网站热最新地址| 亚洲午夜免费福利视频| 国产精品99久久久久久似苏梦涵| 91久久精品日日躁夜夜躁欧美| 精品国产制服丝袜高跟| 一区二区三区四区在线| 黑人精品欧美一区二区蜜桃 | 99综合电影在线视频| 欧美肥妇bbw| 国产精品二区一区二区aⅴ污介绍| 五月婷婷激情综合网| 成人免费毛片app| 日韩美女在线视频| 亚洲国产综合在线| av电影天堂一区二区在线| 精品国产免费人成在线观看| 亚洲aaa精品| 在线看日韩精品电影| 欧美极品aⅴ影院| 蜜臀av一级做a爰片久久| 在线观看中文字幕不卡| 国产精品美女一区二区| 经典三级一区二区| 欧美性一区二区| 一区二区三区中文字幕精品精品 | 在线不卡中文字幕| 亚洲精品亚洲人成人网| 成人一区二区三区中文字幕| 欧美不卡一二三| 日韩国产一区二| 欧美美女喷水视频| 亚洲国产日韩综合久久精品| 91视频免费播放| 久久久精品蜜桃| 久久99久久99| 精品免费99久久| 久久精品国产在热久久| 91精品国产高清一区二区三区 | 亚洲综合男人的天堂| 色综合一区二区三区| 中文乱码免费一区二区| 成人污视频在线观看| 国产日产精品1区| 成人性色生活片免费看爆迷你毛片| 精品91自产拍在线观看一区| 久久国产成人午夜av影院|