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

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

?? dps.c

?? its a full portscan... it works for all type of scanning. here we use libcap
?? C
?? 第 1 頁 / 共 3 頁
字號:
                         libnet_addr2name4( spoofed_src_ip, LIBNET_DONT_RESOLVE ),
                         dst_port, src_port );
            }

            /* Compile the filter */
            if( pcap_compile( pcap_cfg.p, &pcap_cfg.f_program,
                              pcap_cfg.f_code, 1, pcap_cfg.netmask ) == -1 )
            {
                printf("Cannot compile the filter code: %s\n", pcap_geterr( pcap_cfg.p ) );
                pcap_close( pcap_cfg.p );
                exit( EXIT_FAILURE );
            }
            free( pcap_cfg.f_code );

            /* Set the filter program on the interface */
            dps_set_filter( pcap_cfg.f_program );

            /* Write the scan packet */
            dps_write_packet();

            /* Listen for response */
            received = 0;
            start_time = time( NULL );

            while( start_time + cfg.timeout > time( NULL ) && !received )
            {
                rcv_packet = ( u_int8_t * ) pcap_next( pcap_cfg.p, &header );
				if( rcv_packet == NULL || rcv_packet == 0 )
                    continue;

                ip = ( struct libnet_ipv4_hdr * ) ( rcv_packet + LIBNET_ETH_H );

                switch( ip->ip_p )
                {
                    case IPPROTO_TCP:
                        tcp = ( struct libnet_tcp_hdr * )
                              ( rcv_packet + LIBNET_ETH_H + ( ip->ip_hl << 2 ) );
                        current_port->recv_control = tcp->th_flags;
                        if( tcp->th_flags == ( TH_RST | TH_ACK ) )
                        {
                            current_port->status = PORT_CLOSED;
							result.closed++;
                            if( cfg.verbosity == 2 )
                                printf("STATUS [closed]\n");
							if( current_port->sent_control == TH_SYN )
								current_port->status_win = PORT_CLOSED;
							else
								current_port->status_win = PORT_OPEN | PORT_CLOSED;
                        }
                        else if( tcp->th_flags == ( TH_SYN | TH_ACK ) )
                        {
                            current_port->status = PORT_OPEN;
                            current_port->status_win = PORT_OPEN;
                            result.open++;
							if( cfg.verbosity == 2 )
								printf("STATUS [open]\n");
                            if( cfg.verbosity == 1 )
                                printf("  Port %d [OPEN]\n", current_port->port );
                        }
                        else if( tcp->th_flags == ( TH_RST ) )
                        {
                            current_port->status = PORT_UNFILTERED;
                            current_port->status_win = PORT_UNFILTERED;
                            result.unfiltered++;
							if( cfg.verbosity == 2 )
								printf("STATUS [unfiltered]\n");
                            else if( cfg.verbosity == 1 )
                                printf("  Port %d [UNFILTERED]\n", current_port->port );
                        }
                        received = 1;
                        break;
                    case IPPROTO_UDP:
                        udp = ( struct libnet_udp_hdr * )
                              ( rcv_packet + LIBNET_ETH_H + ( ip->ip_hl << 2 ) );
                        current_port->status = PORT_OPEN;
                        current_port->status_win = PORT_OPEN;
                        result.open++;
						if( cfg.verbosity == 2 )
							printf("STATUS [open]\n");
                        else if( cfg.verbosity == 1 )
                            printf("  Port %d [OPEN]\n", current_port->port );
                        received = 1;
                        break;
                    case IPPROTO_ICMP:
                        icmp = ( struct libnet_icmp_hdr * )
                               ( rcv_packet + LIBNET_ETH_H + ( ip->ip_hl << 2 ) );
                        if( icmp->icmp_type != ICMP_UNREACH ||
                            icmp->icmp_code != ICMP_UNREACH_PORT )
                            continue;
                        udp = ( struct libnet_udp_hdr * )
                              ( rcv_packet + LIBNET_ETH_H + ( ip->ip_hl << 2 )
                              + LIBNET_ICMPV4_UNREACH_H );

                        current_port->status = PORT_CLOSED;
                        current_port->status_win = PORT_CLOSED;
                        result.closed++;
						if( cfg.verbosity == 2 )
							printf("STATUS [closed]\n");
                        received = 1;
                        break;
                }
            }

            if( !received )
            {
                if( strcmp( cfg.scan_type, "UDP" ) != 0 )
                {
                    /* TCP Scan */
                    if( current_port->sent_control == SCAN_ACK ||
						current_port->sent_control == SCAN_SYN )
                    {
                        current_port->status = PORT_FILTERED;
                        current_port->status_win = PORT_FILTERED;
                        result.filtered++;
						if( cfg.verbosity == 2 )
							printf("STATUS [filtered]\n");
                    }
                    else
                    {
                        current_port->status = PORT_FILTERED | PORT_OPEN;
                        current_port->status_win = PORT_FILTERED;
                        result.open_filtered++;
						if( cfg.verbosity == 2 )
							printf("STATUS [open|filtered]\n");
                        else if( cfg.verbosity == 1 )
                            printf("  Port %d [OPEN|FILTERED]\n", current_port->port );
                    }
                }
                else
                {
                    /* UDP Scan */
                    current_port->status = PORT_FILTERED | PORT_OPEN;
                    current_port->status_win = PORT_FILTERED | PORT_OPEN;
					result.open_filtered++;
					if( cfg.verbosity == 2 )
						printf("STATUS [open|filtered]\n");
                }
            }
            current_port->next = ( struct port_data * ) malloc( sizeof( struct port_data ) );
            current_port = current_port->next;
            current_port->next = NULL;
            usleep( 50000 );
        }
    }
    current_port = NULL;
	scan_end = time( NULL );
	scan_time = scan_end - scan_begin;
    if( cfg.verbosity )
        printf("Ending Scanning...\n");
}

void dps_build_arp( int arp_op, u_int32_t src_ip, u_int32_t dst_ip,
                    u_int8_t *src_eth, u_int8_t *dst_eth )
{
    libnet_cfg.arp = libnet_build_arp(
                      ARPHRD_ETHER,      /* hardware type */
                      ETHERTYPE_IP,      /* protocol type */
                      HRD_ADDR_LENGTH,   /* hardware address length */
                      PRO_ADDR_LENGTH,   /* protocol address length */
                      arp_op,            /* ARP packet operation */
                      src_eth,           /* Ethernet source address */
                      (u_char *)&src_ip, /* IP destination address */
                      dst_eth,           /* Ethernet destination address */
                      (u_char *)&dst_ip, /* IP destination address */
                      NULL,              /* optional payload */
                      0,                 /* payload size */
                      libnet_cfg.l,      /* libnet handle */
                      0                  /* libnet protocol tag */
                      );
    if( libnet_cfg.arp == -1 )
    {
        printf("Cannot build ARP header\n");
        exit( EXIT_FAILURE );
    }

    libnet_cfg.eth = libnet_build_ethernet(
                      dst_eth,       /* Ethernet destinatin address */
                      src_eth,       /* Ethernet source address */
                      ETHERTYPE_ARP, /* protocol type */
                      NULL,          /* optional payload */
                      0,             /* payload size */
                      libnet_cfg.l,  /* libnet handle */
                      0              /* libnet protocol tag */
                      );
    if( libnet_cfg.eth == -1 )
    {
        printf("Cannot build Ethernet header\n");
        exit( EXIT_FAILURE );
    }
}

void dps_build_tcp( u_int8_t control, u_int16_t src_port, u_int16_t dst_port,
                    u_int32_t src_ip, u_int32_t dst_ip, u_int8_t *src_eth,
                    u_int8_t *dst_eth )
{
    libnet_cfg.tcp = libnet_build_tcp(
                      src_port,      /* source port */
                      dst_port,      /* destination port */
                      SEQ,           /* sequence number */
                      ACK,           /* ack number */
                      control,       /* control flags */
                      WIN,           /* TCP windows size */
                      0,             /* header checksum */
                      0,             /* urgent pointer */
                      LIBNET_TCP_H,  /* TCP packet size */
                      NULL,          /* optional payload */
                      0,             /* payload size */
                      libnet_cfg.l,  /* libnet_handle */
                      0              /* libnet protocol tag */
                      );
    if( libnet_cfg.tcp == -1 )
    {
        printf("Cannot build TCP header\n");
        exit( EXIT_FAILURE );
    }

    libnet_cfg.ip = libnet_build_ipv4(
                     TCPIP_LEN,     /* total packet size */
                     TOS,           /* Type of Service */
                     ID,            /* Identification */
                     0,             /* fragmentation */
                     TTL,           /* Time to Live */
                     IPPROTO_TCP,   /* protocol */
                     0,             /* checksum */
                     src_ip,        /* IP source address */
                     dst_ip,        /* IP destination address */
                     NULL,          /* optional payload */
                     0,             /* payload size */
                     libnet_cfg.l,  /* libnet handle */
                     0              /* libnet protocol tag */
                     );
    if( libnet_cfg.ip == -1 )
    {
        printf("Cannot build IP header\n");
        exit( EXIT_FAILURE );
    }

    libnet_cfg.eth = libnet_build_ethernet(
                      dst_eth,       /* Ethernet destinatin address */
                      src_eth,       /* Ethernet source address */
                      ETHERTYPE_IP,  /* protocol type */
                      NULL,          /* optional payload */
                      0,             /* payload size */
                      libnet_cfg.l,  /* libnet handle */
                      0              /* libnet protocol tag */
                      );
    if( libnet_cfg.eth == -1 )
    {
        printf("Cannot build Ethernet header\n");
        exit( EXIT_FAILURE );
    }
}

void dps_build_udp( u_int16_t src_port, u_int16_t dst_port, u_int32_t src_ip,
                    u_int32_t dst_ip, u_int8_t *src_eth, u_int8_t *dst_eth )
{
    libnet_cfg.udp = libnet_build_udp(
                      src_port,     /* source port */
                      dst_port,     /* destination port */
                      LIBNET_UDP_H, /* packet size */
                      0,            /* checksum */
                      NULL,         /* optional payload */
                      0,            /* payload size */
                      libnet_cfg.l, /* libnet handle */
                      0	            /* libnet protocol tag */
                      );
    if( libnet_cfg.udp == -1 )
    {
        printf("Cannot build UDP header\n");
        exit( EXIT_FAILURE );
    }


    libnet_cfg.ip = libnet_build_ipv4(
                     UDPIP_LEN,     /* total packet size */
                     TOS,           /* Type of Service */
                     ID,            /* Identification */
                     0,             /* fragmentation */
                     TTL,           /* Time to Live */
                     IPPROTO_UDP,   /* protocol */
                     0,             /* checksum */
                     src_ip,        /* IP source address */
                     dst_ip,        /* IP destination address */
                     NULL,          /* optional payload */
                     0,             /* payload size */
                     libnet_cfg.l,  /* libnet handle */
                     0              /* libnet protocol tag */
                     );
    if( libnet_cfg.ip == -1 )
    {
        printf("Cannot build IP header\n");
        exit( EXIT_FAILURE );
    }

    libnet_cfg.eth = libnet_build_ethernet(
                      dst_eth,       /* Ethernet destinatin address */
                      src_eth,       /* Ethernet source address */
                      ETHERTYPE_IP,  /* protocol type */
                      NULL,          /* optional payload */
                      0,             /* payload size */
                      libnet_cfg.l,  /* libnet handle */
                      0              /* libnet protocol tag */
                      );
    if( libnet_cfg.eth == -1 )
    {
        printf("Cannot build Ethernet header\n");
        exit( EXIT_FAILURE );
    }
}

int dps_ping()
{
    time_t   start_time;
    u_int8_t *rcv_packet;
    u_int8_t ip_hl;

    struct pcap_pkthdr       header;
    struct libnet_icmpv4_hdr *icmp;

    /* 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女www一区二区| 欧美一级国产精品| 日本一区二区久久| 极品美女销魂一区二区三区| 欧美电影影音先锋| 亚洲国产欧美一区二区三区丁香婷| 91在线观看免费视频| 中文在线一区二区| 国产suv精品一区二区三区| 精品免费一区二区三区| 免费看日韩精品| 制服丝袜一区二区三区| 日日噜噜夜夜狠狠视频欧美人| 日本韩国欧美国产| 一区二区不卡在线播放| 欧美在线观看视频一区二区| 一级精品视频在线观看宜春院| 一本在线高清不卡dvd| 亚洲影院理伦片| 欧美嫩在线观看| 青青国产91久久久久久| 91.com视频| 麻豆精品国产传媒mv男同 | 这里只有精品99re| 午夜精品久久久久久久久久| 欧美一区二区三区视频免费播放| 人禽交欧美网站| 日韩免费看的电影| 国产成人在线视频免费播放| 中文乱码免费一区二区| av亚洲精华国产精华| 亚洲女人小视频在线观看| 欧美性大战久久| 久久国产精品99精品国产 | 色婷婷精品大视频在线蜜桃视频 | 久久国产精品无码网站| 欧美成人r级一区二区三区| 国产精品白丝av| 樱桃国产成人精品视频| 在线观看视频一区二区欧美日韩| 无码av免费一区二区三区试看| 精品国产乱码久久久久久老虎| 久久超级碰视频| 日韩一区欧美小说| 欧美精品高清视频| 成人精品亚洲人成在线| 亚洲一区二区三区中文字幕 | 日本女人一区二区三区| 国产三级久久久| 欧美性猛片xxxx免费看久爱| 亚洲午夜免费视频| 久久夜色精品一区| 欧美怡红院视频| 国产精品一线二线三线精华| 亚洲精品高清视频在线观看| 国产三级精品视频| 欧美日韩一区二区三区在线看| 国产在线播放一区三区四| 亚洲韩国精品一区| 亚洲女爱视频在线| 国产日韩精品视频一区| 精品久久久久久综合日本欧美| 欧美人狂配大交3d怪物一区| 91女神在线视频| 成人黄色软件下载| 成人免费视频视频| 国产成人午夜视频| 国产麻豆9l精品三级站| 麻豆91在线观看| 秋霞影院一区二区| 日韩av中文字幕一区二区三区| 亚洲影视在线播放| 亚洲综合视频网| 亚洲一区二区三区自拍| 一区二区三区免费观看| 亚洲欧美日韩一区| 亚洲激情自拍视频| 夜夜精品视频一区二区| 一区二区三区免费网站| 一区二区久久久| 午夜影院在线观看欧美| 亚洲成av人片在www色猫咪| 亚洲福利一区二区| 午夜视频在线观看一区二区| 午夜精品久久久久久| 午夜精品成人在线| 日本一区中文字幕| 蜜桃久久av一区| 国产一区二区三区黄视频 | 午夜欧美电影在线观看| 亚洲超碰97人人做人人爱| 午夜不卡av在线| 美女视频一区二区三区| 久久er精品视频| 国产精品99久久久久久似苏梦涵 | 欧美在线你懂的| 欧美一卡二卡三卡四卡| 欧美精品一区二区三区高清aⅴ| www久久久久| 18成人在线视频| 婷婷综合五月天| 黑人精品欧美一区二区蜜桃| 丁香另类激情小说| 色偷偷久久一区二区三区| 在线电影一区二区三区| 精品剧情在线观看| 国产精品久久看| 亚洲成人自拍偷拍| 精久久久久久久久久久| 成人短视频下载 | 欧美成人国产一区二区| 日本一区二区视频在线观看| 亚洲精品国产一区二区精华液| 午夜激情综合网| 国产91富婆露脸刺激对白| 欧美中文字幕亚洲一区二区va在线| 日韩亚洲欧美成人一区| 国产精品你懂的| 偷拍与自拍一区| 成人免费观看男女羞羞视频| 欧美日韩国产另类不卡| 日本一区二区三区四区在线视频| 亚洲一区二区三区中文字幕在线 | www.色精品| 欧美一区二区三区视频免费| 中文字幕制服丝袜一区二区三区| 午夜精品国产更新| 9色porny自拍视频一区二区| 日韩欧美中文字幕制服| 亚洲人成网站影音先锋播放| 久久97超碰色| 欧美日韩精品一区二区三区四区 | 精品免费99久久| 亚洲综合免费观看高清完整版| 黑人巨大精品欧美黑白配亚洲| 欧美视频一区在线| 国产精品青草久久| 精品一区二区在线视频| 欧美在线观看18| 最新国产の精品合集bt伙计| 国产一区二区调教| 欧美老女人在线| 伊人婷婷欧美激情| 成人夜色视频网站在线观看| 精品日韩一区二区| 午夜亚洲福利老司机| 91美女在线观看| 中文一区一区三区高中清不卡| 精品一区二区三区在线观看| 欧美日韩国产一二三| 国产精品盗摄一区二区三区| 国产乱子伦视频一区二区三区| 制服丝袜在线91| 视频在线观看91| 欧美日韩五月天| 亚洲国产视频一区二区| 91国在线观看| 亚洲免费高清视频在线| 99re66热这里只有精品3直播| 国产拍揄自揄精品视频麻豆| 国产毛片精品国产一区二区三区| 日韩免费一区二区| 免费成人在线网站| 日韩欧美一区二区三区在线| 视频一区二区欧美| 欧美精品777| 日本aⅴ免费视频一区二区三区| 欧美美女视频在线观看| 午夜av一区二区三区| 91精品欧美综合在线观看最新| 亚洲v中文字幕| 91精品国产综合久久久蜜臀粉嫩| 亚洲3atv精品一区二区三区| 欧美日韩国产小视频| 日韩高清不卡在线| 日韩女优毛片在线| 国产一区二区免费看| 国产蜜臀av在线一区二区三区| 成av人片一区二区| **性色生活片久久毛片| 色又黄又爽网站www久久| 一区二区高清免费观看影视大全| 欧美日韩国产首页| 免费av网站大全久久| 亚洲精品一区二区三区香蕉| 国产精品自拍一区| 中文字幕在线观看不卡视频| 在线看日韩精品电影| 亚洲va国产天堂va久久en| 91精品国产欧美一区二区| 狠狠色丁香久久婷婷综| 久久国产精品第一页| 日韩美一区二区三区| 国产精品18久久久久久久久 | 99久久精品国产一区二区三区 | 亚洲第一狼人社区| 欧美一级专区免费大片| 国产一区激情在线| 亚洲婷婷国产精品电影人久久| 欧美卡1卡2卡|