RE: alternative way of addressing
i couldnt get this program to compile, so i wrote a quick sh script to do the same thing. !/bin/sh # change your ip to DWORD # another quickie by eric polin.. [EMAIL PROTECTED] echo "what is your ip address? " read OC1 IP1=`echo $OC1 | awk -F. '{print $1}'` IP2=`echo $OC1 | awk -F. '{print $2}'` IP3=`echo $OC1 | awk -F. '{print $3}'` IP4=`echo $OC1 | awk -F. '{print $4}'` echo -e "your ip address in dword is: \c" expr \( \( \( \( \( $IP1 \* 256 + $IP2 \) \* 256 \) + $IP3 \) \* 256 \) + $IP4 \) enjoy, eric polin --- Jean-Frangois_Asselin <[EMAIL PROTECTED]> wrote: > http://www.pc-help.org/obscure.htm > Using info from above URL i wrote a small program that will do conversion from decimal to IP and back http://nocon.darkflame.net/files/ip2d.c -NC __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
RE: alternative way of addressing
--- Jean-François_Asselin <[EMAIL PROTECTED]> wrote: > http://www.pc-help.org/obscure.htm > Using info from above URL i wrote a small program that will do conversion from decimal to IP and back http://nocon.darkflame.net/files/ip2d.c -NC __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
RE: alternative way of addressing
http://www.pc-help.org/obscure.htm > -Original Message- > From: John Doe [mailto:[EMAIL PROTECTED]] > Sent: January 24, 2002 23:51 PM > To: [EMAIL PROTECTED] > Subject: alternative way of addressing > > > Hi. > > I remember a while back on this list, there was a discussion > of alternative > ways of addressing URLs (using hex code and binary, I think). > Can anyone > give me a refresher course? > > Thanks in advance... > > > > _ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > >
Re: alternative way of addressing
John Doe wrote: > > Hi. > > I remember a while back on this list, there was a discussion of alternative > ways of addressing URLs (using hex code and binary, I think). Can anyone > give me a refresher course? > >Check here: >http://www.pc-help.org/obscure.htm >"How to Obscure Any URL" Using above info, i have written a small program that will do conversion from decmial to IP and back ;-) --- /* IP 2 Decimal and Back agian -- Ever see a URL in the form of http://3232235521/ Basicly all that is the actual decimal value of 192.168.0.1 This Program converts an IP ( dotted notation ) to the Decimal ( dotless notation) and Back agian. Compile: gcc -lm -o ip2d ip2d.c For more Conversion info: http://www.pc-help.org/obscure.htm [EMAIL PROTECTED] */ #include #include #include #include int a,b,c,d; char ip_address[20]; double num,num2,num3,num4; int x,x2,x3,x4; unsigned int numa; int main(int argc, char *argv[]) { if(argc!=2) { printf("\nUsage: %s [-c] [-d]\n",argv[0]); printf("\t\t-c --- IP to Decimal\n"); printf("\t\t-d --- Decimal to IP\n\n"); exit(1); } if(argv[1][0]=='-' && argv[1][1] =='c') { printf("Enter IP to Convert: "); fgets(ip_address, sizeof(ip_address), stdin); sscanf(ip_address,"%d.%d.%d.%d",&a,&b,&c,&d); /* Convert Dotted notation to dotless Notation */ num=(pow(256,3))*a; num2=(pow(256,2))*b; num3=256*c; num4=num+num2+num3+d; printf("%0.f\n",num4); } if(argv[1][0]=='-' && argv[1][1] =='d') { printf("Enter Number to Convert: "); fgets(ip_address, sizeof(ip_address), stdin); sscanf(ip_address,"%u",&numa); /* Covert Dotless notation to dotted Notation */ x=numa/pow(256,3); x2=(numa-(x*pow(256,3)))/pow(256,2); x3=((numa-(x*pow(256,3)))-(x2*pow(256,2)))/256; x4=(((numa-(x*(pow(256,3-(x2*(pow(256,2-(x3*256)); printf("%d.%d.%d.%d\n",x,x2,x3,x4); } return(0); } __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
Re: alternative way of addressing
Quoting John Doe ([EMAIL PROTECTED]): > I remember a while back on this list, there was a discussion of alternative > ways of addressing URLs (using hex code and binary, I think). Can anyone > give me a refresher course? URLs can be (at least with IE/Win, Mac is a bit picky about this and under Unix such behavior is controlled by the stack and may differ) either hex, oct or decimal, dotted quad or single-rep. | #!/usr/bin/env perl | | $IP = $ARGV[0]; ## Usage: perl obfucate.pl 10.1.1.1 | ($one, $two, $three, $four) = split(/\./, $IP); ## Split quads | $right = (($two * 256 + $three)*256)+$four; ## calculate "right" side | print $one.".".$right; ## print FIRST.CALCULATED perl obfuscate.pl 192.168.1.5 yields: 192.11010309 or, you could translate all four quads into their octal, decimal or binary representations. Or, you could not have any dots in it at all: | $sright = $one * 256 + $two) * 256) + $three) *256) +$four; | print $right; == 3232235781 for $ARGV[1] == 192.168.1.5 This works with Opera, some versions of IE (IE6/WinXP doesn't work), some versions of Netscape, OmniWeb, iCab, etc. This trick is used by SPAMmers to obfuscate their URLs and by malicious attackers to trick unsuspecting victims into opening a seemingly benign website: http://www.cnn.com?article-id=0xdeadbeef&data=extract@3232235781 will in fact not open cnn's website but 192.168.1.5 (note the @ sign, which is used to decalre everything prior to it as a "username" and passed as such. jonas -- Jonas M Luster -- d-fensive networks, Inc. -- http://www.d-fensive.com
Re: alternative way of addressing
John Doe wrote: > > Hi. > > I remember a while back on this list, there was a discussion of alternative > ways of addressing URLs (using hex code and binary, I think). Can anyone > give me a refresher course? Check here: http://www.pc-help.org/obscure.htm "How to Obscure Any URL" Basicly: You can convert characters into hexcode and it's still a valid URL. http://www.pc-help.org/obscure.htm can also be http://3468664375@3468664375/o%62s%63ur%65%2e%68t%6D You can also pretent it to be a part of (example) ibm.com : http:[EMAIL PROTECTED]/obscure.htm Or, convert a IP number to a Base10 number and use that as the URL. You can easily do this with shellscripting, read more about it: http://digiover.selwerd.nl/textfiles/own/base10-and-IP.txt Regards, Jan -- Dutch Security Information Network : http://www.dsinet.org Personal site : http://digiover.selwerd.nl alt.hack.nl FAQ : http://www.dsinet.org/hackfaq mailto:[EMAIL PROTECTED]