Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 8th, 2004, 9:26 PM   #1
Kylixen
Programmer
 
Kylixen's Avatar
 
Join Date: Jun 2004
Location: SC
Posts: 60
Rep Power: 5 Kylixen is on a distinguished road
Send a message via AIM to Kylixen Send a message via MSN to Kylixen
#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[]){

	char string[80] = "";
	char new_string[80] = "";
	
	int counter;

	for(counter = 1; counter < argc; counter++){

 strcat(string, argv[counter]);
 strcat(string, " ");
 
	} 

	convert(string, new_string);	

	printf("%s", new_string);

}

convert(char *string, char *new_string){

	int counter;
	
	for(counter = 0; counter < strlen(string); counter++){

 switch(string[counter]){
 
 	case 'A':
  new_string[counter] = '4';
  break;
 	case 'a':
  new_string[counter] = '4';
  break;
 	case 'B':
  new_string[counter] = '8';
  break;
 	case 'b':
  new_string[counter] = '8';
  break;
 	case 'E':
  new_string[counter] = '3';
  break;
 	case 'e':
  new_string[counter] = '3';
  break;
 	case 'L':
  new_string[counter] = '1';
  break;
 	case 'l':
  new_string[counter] = '1';
  break;
 	case 'O':
  new_string[counter] = '0';
  break;
 	case 'o':
  new_string[counter] = '0';
  break;
 	case 'S':
  new_string[counter] = '5';
  break;
 	case 's':
  new_string[counter] = '5';
  break;  
 	case 'T':
  new_string[counter] = '7';
  break;
 	case 't':
  new_string[counter] = '7';
  break;
 	default:
  new_string[counter] = string[counter];
  break;

 }
	
	}

}

http://www.tsargoth.com/kylixen/leet.c

Just for kicks
__________________
ALLOW IMAGES IN SIGNATURES NOW
Kylixen is offline   Reply With Quote
Old Aug 9th, 2004, 12:23 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Hmmm. Just nosing around on your site... noticed you liked my avatar...

http://www.tsargoth.com/kylixen/images/owned1.jpg


So what is this code below suppose to do?
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 9th, 2004, 8:02 AM   #3
Kylixen
Programmer
 
Kylixen's Avatar
 
Join Date: Jun 2004
Location: SC
Posts: 60
Rep Power: 5 Kylixen is on a distinguished road
Send a message via AIM to Kylixen Send a message via MSN to Kylixen
Quote:
Originally posted by Infinite Recursion@Aug 9 2004, 04:23 AM
Hmmm. Just nosing around on your site... noticed you liked my avatar...

http://www.tsargoth.com/kylixen/images/owned1.jpg


So what is this code below suppose to do?
Compile it and pass it a string for arguments

./leet I love candy
__________________
ALLOW IMAGES IN SIGNATURES NOW
Kylixen is offline   Reply With Quote
Old Aug 10th, 2004, 5:41 PM   #4
sarumont
Hobbyist Programmer
 
sarumont's Avatar
 
Join Date: Apr 2004
Location: /dev/urandom
Posts: 154
Rep Power: 5 sarumont is on a distinguished road
Send a message via ICQ to sarumont Send a message via AIM to sarumont Send a message via Yahoo to sarumont
Haha...you must've gotten bored today.

Cool prog. B)
__________________
"Time is an illusion. Lunchtime doubly so."
-the late, great Douglas Adams
sarumont is offline   Reply With Quote
Old Aug 10th, 2004, 5:47 PM   #5
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
wow you must have been bored i just compiled and ran it. great work tho
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Aug 10th, 2004, 11:58 PM   #6
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Haha... I wrote that script once for mIRC (only to annoy people)
__________________
Clifford Matthew Roche &lt;geek@cliffordroche.com&gt;
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Aug 31st, 2004, 12:10 PM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Try:

  case 'A':
  case 'a':
    new_string[counter] = '4';
    break;

Wouldn't this reduce the amount of code?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:56 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC