what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

eprobe2.c

eprobe2.c
Posted Aug 17, 1999

No information is available for this file.

tags | spoof
systems | unix
SHA-256 | 2e578b8bc3a554e7ebb5badda2ee8fd66797805c4e4a2cffcc8a23d50da7a339

eprobe2.c

Change Mirror Download
#include "tcpip.h"

void ssyn(int sendsock, u_long srcaddr, u_long dstaddr, u_short srcport,
u_short dstport, u_long seq)
{
char *pack, *tpack;
int sent;
struct sockaddr_in stuffz;

tpack = create_tcp(srcaddr, dstaddr, htons(srcport),
htons(dstport), htonl(seq), 0, TH_SYN, NULL, 0);
pack = create_ip (srcaddr, dstaddr, IPPROTO_TCP, 75, 1,
tpack, 20);
stuffz.sin_family = AF_INET;
stuffz.sin_port = htons(dstport);
stuffz.sin_addr.s_addr = dstaddr;
sent = sendto(sendsock, pack, 40, 0, (struct sockaddr *)&stuffz,
sizeof(stuffz));
if (sent != 40) { perror("sending SYN"); exit(-1); }
}
int getpack(int listsock, u_long srcaddr, u_long dstaddr, u_short srcport,
u_short dstport, u_long seq)
{
return 1;
}

main (int c, char *v[])
{
int ssock, lsock;
struct hostent *hent;
struct servent *srvent;
u_long us, them, fuckk;
u_short sport, eport;
u_short skrap;
u_char flags;
char mahname[80];
struct tcphdr *tcphead;

if (c!=4) { printf("usage: %s <host> <start port> <end port>\n", v[0]);
exit(-1); }
gethostname(mahname, 79);
hent = gethostbyname(mahname);
if (hent == NULL) {
printf("couldn't get my hostname!@#\n");
exit(-1);
}
bcopy(hent->h_addr, (char *)&us, hent->h_length);
hent = gethostbyname(v[1]);
if (hent!=NULL)
bcopy(hent->h_addr, (char *)&them, hent->h_length);
else {
printf("could not resolve: %s\n", v[1]);
exit(-1);
}
sport = atoi(v[2]);
if (sport==0) {
printf("can't use %s as a starting port..\n", v[2]);
exit(-1);
}
eport = atoi(v[3]);
if (eport==0) {
printf("can't use %s as an ending port..\n", v[3]);
exit(-1);
}
ssock = socket(AF_INET, SOCK_RAW, 255);
if (ssock == -1) { perror("getting send socket"); exit(-1); }
lsock = socket(AF_INET, SOCK_RAW, 6);
if (lsock == -1) { perror("getting listen socket"); exit(-1); }
printf("active ports between: %d and %d:\n", sport, eport);
for (skrap=sport;skrap<eport+1; skrap++) {
ssyn(ssock, us, them, getpid()+skrap, skrap, 10000000+skrap+getpid());
usleep(100);
tcphead = read_tcp();
while ((ntohs(tcphead->th_sport) != getpid()+skrap) &
(ntohs(tcphead->th_dport) != skrap) & ((tcphead->th_flags == TH_SYN) ||
(tcphead->th_flags == TH_RST))) {
tcphead = read_tcp();
}
if (tcphead->th_flags & TH_SYN) {
fuckk = tcphead->th_ack - ntohs(tcphead->th_sport) - getpid();
if (fuckk = 26777216) {
srvent = getservbyport(tcphead->th_sport, "tcp");
if (srvent != 0)
printf("%s.%d(%s)\n", v[1], ntohs(tcphead->th_sport), srvent->s_name);
else
printf("%s.%d\n", v[1], ntohs(tcphead->th_sport));
execl("rst %s %d %s %d %ul", gethostbyname(mahname), getpid()+skrap, gethostbyname(v[1]), skrap, htonl(seqnum));

}
}
}
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close