TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
Advertisement
Associates
Associates
techtuts Darkmindz
CSS Tutorials Tutorialsphere.com - Free Online Tutorials
Boston PHP SurfnLearn
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-28-2008, 07:45 AM   #21 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 445
Thanks: 49
ReSpawN is on a distinguished road
Default

Search the web for GD library. And uh, why start a silent command (@imagecreatetruecolor) and then call up the or die ("..") function...? Couldn't you then just better $im = @imagecreatetruecolor(...); if (!$im) { exit('DieCommand'); }
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 04-28-2008, 11:54 AM   #22 (permalink)
The Frequenter
Advanced Programmer Top Contributor Good Samaritan 
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 469
Thanks: 26
sketchMedia is on a distinguished road
Default

PHP Code:
die(chr(0x54) . chr(0x61) . chr(0x6C) . chr(0x6B) . chr(0x70) . chr(0x68) . chr(0x70)); 
__________________

Last edited by sketchMedia : 05-27-2008 at 08:37 PM.
sketchMedia is offline  
Reply With Quote
Old 05-22-2008, 02:41 PM   #23 (permalink)
The Addict
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 247
Thanks: 6
Kalle is on a distinguished road
Default

HTML Code:
<p>Hello TalkPHP!</p>
=P
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
Old 05-22-2008, 07:28 PM   #24 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 445
Thanks: 49
ReSpawN is on a distinguished road
Default

*sigh* ...

Didn't see this one yet.
PHP Code:
die('Bye Bye TalkPHP'); 
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 05-22-2008, 08:42 PM   #25 (permalink)
The Gregarious
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Cana'derr
Posts: 653
Thanks: 24
delayedinsanity is on a distinguished road
Default

Quote:
Didn't see this one yet.
You beat yourself to it by using exit() earlier, but this person also did. ;)

Outputting data without print/echo
delayedinsanity is offline  
Reply With Quote
Old 05-23-2008, 11:31 AM   #26 (permalink)
The Addict
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 247
Thanks: 6
Kalle is on a distinguished road
Default

As in response to ReSpawN's exit() code:
You can't use exit()'s parameter to specify a shutdown message, thats why we have die(). exit()'s parameter is an integer that tells the shutdown code.

exit(0); means that the program shutdown correct just like in C++:

Code:
int main()
{
	return 0;
}
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
Old 05-23-2008, 12:39 PM   #27 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 713
Thanks: 2
Salathe is on a distinguished road
Default

exit can take a string argument (in place of the usual integer). If the argument is a string, it gets printed just before exiting just like with die. Try it.
__________________
Salathe is online now  
Reply With Quote
Old 05-23-2008, 01:53 PM   #28 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 224
Thanks: 2
Jim is on a distinguished road
Default

Hai
Can Has Stdio?
Visible "hai Talkphp"
Kthxbye
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 06-12-2008, 09:27 PM   #29 (permalink)
The Wanderer
 
Join Date: Jun 2008
Posts: 8
Thanks: 1
TexasMd91 is on a distinguished road
Default

By typing it...

Never said it had to be in PHP. XD
TexasMd91 is offline  
Reply With Quote
Old 06-25-2008, 04:18 PM   #30 (permalink)
The Gregarious
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 593
Thanks: 15
Village Idiot is on a distinguished road
Default

PHP Code:
$im = @imagecreatefromJPEG("bg.jpg");
$black imagecolorallocate($im000);
imagestring($im352"Hello TalkPHP"$black);
header("content-type: image/jpeg");
echo 
imagejpeg($im);
imagedestroy($im); 
__________________
There are two ways to write bug-free code, only the third one works.
Village Idiot is offline  
Reply With Quote
Old 07-27-2008, 05:11 PM   #31 (permalink)
The Wanderer
 
Join Date: Jul 2008
Posts: 6
Thanks: 1
Oilik is on a distinguished road
Default

Quote:
Originally Posted by Jim View Post
Hai
Can Has Stdio?
Visible "hai Talkphp"
Kthxbye
xD lolcode. :P


Mah way of outputting data without using echo/print:
PHP Code:
<?php
system
("echo wut");
?>
...hey i didn't use php's echo. :(
Oilik is offline  
Reply With Quote
Old 08-22-2008, 07:40 AM   #32 (permalink)
The Wanderer
 
Dr_Neffy's Avatar
 
Join Date: Aug 2008
Location: italy
Posts: 7
Thanks: 0
Dr_Neffy is on a distinguished road
Default

PHP Code:
<?php
$a 
= array("TalkPHP Rulez\n");
print_r($a);
?>
or with a system and without any echo or print
PHP Code:
<?php
system
("perl -e 'printf `hi TalkPHP\n`'");
?>
(lol)
Send a message via MSN to Dr_Neffy
Dr_Neffy is offline  
Reply With Quote
Old 08-23-2008, 01:25 AM   #33 (permalink)
The Wanderer
 
wiifanatic's Avatar
 
Join Date: Sep 2007
Posts: 24
Thanks: 8
wiifanatic is on a distinguished road
Default

Code:
document.write('O HAI');
wiifanatic is offline  
Reply With Quote
Old 08-23-2008, 09:03 AM   #34 (permalink)
The Visitor
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
rune_kg is on a distinguished road
Default The same, but different

<?=`echo Hello_World`?>
rune_kg is offline  
Reply With Quote
Old 08-26-2008, 09:32 AM   #35 (permalink)
The Wanderer
 
Join Date: Aug 2008
Posts: 3
Thanks: 0
zendkush is on a distinguished road
Default

Use a java bridge!
Code:
// action handler to fill button
function clicked($sender, $e) {
   $win = new Mono("Gtk.Window", "phpinfo()");
   $win->set_DefaultWidth(640);
   $win->set_DefaultHeight(400);
   $pane = new Mono("Gtk.ScrolledWindow");
   $view = new Mono("Gtk.TextView");
   $buffer = new Mono("Gtk.TextBuffer", new Mono("Gtk.TextTagTable"));
   ob_start();
   phpinfo();
   $buffer->set_Text(ob_get_contents());
   ob_end_clean();
   $view->set_Buffer($buffer);
   $pane->add($view);
   $win->add($pane);
   $win->ShowAll();
 }
 $btn = new Mono("Gtk.Button", "Show output from phpinfo()");
 $btn->add_Clicked(new Mono(
 			       "System.EventHandler",
 			       mono_closure($this, "clicked")));
// then send button to window.
zendkush is offline  
Reply With Quote
Old 09-02-2008, 07:04 PM   #36 (permalink)
The Wanderer
 
Join Date: Sep 2008
Posts: 6
Thanks: 1
zspencer is on a distinguished road
Default Howzabout some Error Tossing

PHP Code:
<?
ini_set
('display_errors','on');
error_reporting(E_ALL);
trigger_error('Woah, error d00d',E_USER_NOTICE);
?>
What? It works. You can even execute stuff after it too

Last edited by zspencer : 09-02-2008 at 07:04 PM. Reason: %s/cen/can/ig
zspencer is offline  
Reply With Quote
Old 09-02-2008, 09:16 PM   #37 (permalink)
The Contributor
 
redSHIFT's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 69
Thanks: 3
redSHIFT is on a distinguished road
Default

PHP Code:
file_put_contents('error.html''<p>error\'d</p>');

$ch curl_init('error.html');
// explanatory line
curl_setopt($chCURLOPT_RETURN_TRANSFERfalse);
curl_exec($ch); 
redSHIFT is offline  
Reply With Quote
Old 09-10-2008, 04:14 AM   #38 (permalink)
The Gregarious
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 593
Thanks: 15
Village Idiot is on a distinguished road
Default

C++
Code:
#include <stdlib.h>
#include <fstream>
using namespace std;
int main()
{
    fstream file_op("test.txt",ios::out);
    file_op<<"Hello World";
    file_op.close();
    system("test.txt");
    return 0;
}
Only tested on windows XP, but should run cross platform.
__________________
There are two ways to write bug-free code, only the third one works.
Village Idiot is offline  
Reply With Quote
Old 09-10-2008, 11:52 AM   #39 (permalink)
The Frequenter
Advanced Programmer Top Contributor Good Samaritan 
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 469
Thanks: 26
sketchMedia is on a distinguished road
Default

I can confirm it compiles on linux, although you may need to change the line:
cpp Code:
system("test.txt");
to something like
cpp Code:
system("cat test.txt");//cat vi nano whatever
 
so linux knows what to do with it.

in a similar vein, heres ruby:
ruby Code:
File.open('test.txt', 'w') {|f| f.write("Hello World \n\r") }
exec("cat test.txt")
__________________

Last edited by sketchMedia : 09-10-2008 at 12:13 PM.
sketchMedia is offline  
Reply With Quote
Old Yesterday, 09:59 PM   #40 (permalink)
The Visitor
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
erect is on a distinguished road
Default

how about breaking out of php and just getting the html to output?

PHP Code:
?>text to this page<?
no echo's or print's involved
erect is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Linear Mode Linear Mode
Threaded Mode