comments 2

FIGlet Generator

Hi :woot: , this is my second post for today. Do you know Figlet ? if you never know about FIGlet , you must read it first Figlet History . The purpose of this tool is just for help us create figlet font. We using figlet.php from zend framework. You can grab it on figlet.php . And if you want to add your font DB for FIGlet , you can visit this site .
Okay here we go ! 8)


Sponsored links


 
<?php
 
# Figlet Generator
# Rosdyana Kusuma - admin@r3m1ck.us
# using figlet.php from zend framework :P
# Exploit-ID :: IndonesianCoder :: KebumenCyber

require_once 'figlet.php'; //this file from zend framework
 
class figlet_gen{
 
	function __construct($text, $model){
		//check if parameter is empty show the help
		if(empty($text) || empty($model)){
			$this->help();
			exit;
		}
 
		//list of font style
		if($model == 1){
			$options = array('font' => 'font/small.flf');
		}
		else if($model == 2){
			$options = array('font' => 'font/lean.flf');
		}
		else if($model == 3){
			$options = array('font' => 'font/graffiti.flf');
		}
		else if($model == 4){
			$options = array('font' => 'font/standard.flf');
		}
		else{
			$this->help();
			exit;
		}
	//put font style	
	$figlet = new Zend_Text_Figlet($options);
 
	//render the figlet
	echo $figlet->render($text);
	}
 
	//func. to show help
	function help(){
	echo("
 
 _____ _       _      _      ____                           _
|  ___(_) __ _| | ___| |_   / ___| ___ _ __   ___ _ __ __ _| |_ ___  _ __
| |_  | |/ _` | |/ _ \ __| | |  _ / _ \ '_ \ / _ \ '__/ _` | __/ _ \| '__|
|  _| | | (_| | |  __/ |_  | |_| |  __/ | | |  __/ | | (_| | || (_) | |
|_|   |_|\__, |_|\___|\__|  \____|\___|_| |_|\___|_|  \__,_|\__\___/|_|
         |___/    by Rosdyana Kusuma - admin@r3m1ck.us
 
	");
		print "\nfont list :\n";
		print "1. small\n";
		print "2. lean\n";
		print "3. graffiti\n";
		print "4. standard\n";
		print "\nHow to using :\n";
		print "figlet_generator.php < plaintext > < figlet font style > \n";
		print "figlet_generator.php r3m1ck 3 \n";
	}
}
 
$figletGen = new figlet_gen($argv[1], $argv[2]);
 
?>

figlet_generator

I have explain line per line, and its easy to understanding. :lol:
Happy Coding comrades !! 8)

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *