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

url2ip.c

url2ip.c
Posted Jul 24, 2002
Authored by Pf1shy

Url2ip.c 0.1p3 resolves the ip's of url's stored in a file. Useful for synscan.

systems | unix
SHA-256 | fdcf3a3aec6641775dbad19ea77843263773acfbf61730c3e35f94482e38044d

url2ip.c

Change Mirror Download
/* 
* url2ip.c 0.1p3
* resolves the ip's of url's stored in a file.
* eg. usefully for synscan etc.
* by pf1shy of buttP!RATEZ
* <pf1shy@segfault.ch>
*
* mad greetz to:
* buttP!RATEZ (cy_, d1saster, dopestar, immortal, outlawP-], p0rt, robhouse, sh0rdy)
* GOBBLES, hackweiser :), electronic souls, interwn.nl, trippin' smurfs, woh, woot-project, zone-h.com,
* brainstorm, davetower, eth1cal, module, nouse, pantera, philer, phrackman, preamble, r00t (!@#),
* <add your nick here :)>
*
* middle finger to:
* cyclop08, who has changed the comments of shame2.c and submitted it to packetstorm.com with his name.
* (btw dude, you forgot to remove my "<°)))><-pf1shy-logo" which was on the last line of shame2.c, *G*)
* fd0: du schwule schlumpf, figg mi ned eifach a wenn mi noed mal kennsch, easy?!
*
* sunday_21th july 2002/13:59/switzerland
*/

#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

int verbose=0;

void checkout(char *box, char *file);

main(int argc, char *argv[])
{
int opt;
char buf[127];
FILE *unf;
struct in_addr ip;

printf("url2ip.c 0.1p3\nby pf1shy of buttP!RATEZ\n<pf1shy@segfault.ch>\n\n");
if(argc < 3) {
printf("usage: %s <input> <output> [-v]\n\n", argv[0]);
printf("input\t\tfile which contains the url's\n");
printf("output\t\toutput file\n");
printf("-v\t\tverbose mode\n\n");
exit(1);
}
if((unf = fopen(argv[1], "r")) == NULL) { perror(argv[1]); exit(0); }

while ((opt=getopt(argc,argv,"v"))!= -1) {
switch(opt)
case 'v': verbose=1; printf("+ verbose mode enabled...\n\n"); break;
}

while(fgets(buf, sizeof(buf), unf) != NULL) {
if(buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) - 1] = '\0';

checkout(buf, argv[2]);
}
}

void checkout(char *box, char *file)
{
struct hostent *hostp;
struct sockaddr_in lookup;
char ip[17], bullshit[256];
FILE *out;
if((hostp=gethostbyname(box)) != NULL) {
lookup.sin_addr = *((struct in_addr *)hostp->h_addr);
sprintf(ip, "%s\n", inet_ntoa(lookup.sin_addr));
if(verbose)
printf("+ %s -> %s", box, ip);
/* ip[strlen(ip) - 1] = '\0';
sprintf(bullshit, "%s (%s)\n", ip, box); */ //change this if you want...
out = fopen(file, "aw+");
/* fprintf(out, bullshit); */ // and this too...
fprintf(out, ip);
fclose(out);
}
}
/* <°))>< *sniff* *sniff* */
Login or Register to add favorites

File Archive:

September 2022

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

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close