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:

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
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 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