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
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-28-2008, 06:45 AM   #21 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
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, 10:54 AM   #22 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

PHP Code:
die(chr(0x54) . chr(0x61) . chr(0x6C) . chr(0x6B) . chr(0x70) . chr(0x68) . chr(0x70)); 
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)

Last edited by sketchMedia : 05-27-2008 at 07:37 PM.
sketchMedia is offline  
Reply With Quote
Old 05-22-2008, 01:41 PM   #23 (permalink)
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
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, 06:28 PM   #24 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
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, 07:42 PM   #25 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
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, 10:31 AM   #26 (permalink)
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
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, 11:39 AM   #27 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
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 offline  
Reply With Quote
Old 05-23-2008, 12:53 PM   #28 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

Hai
Can Has Stdio?
Visible "hai Talkphp"
Kthxbye
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 06-12-2008, 08: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, 03:18 PM   #30 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
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); 
__________________

Village Idiot is offline  
Reply With Quote
Old 07-27-2008, 04: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, 06: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, 12:25 AM   #33 (permalink)
The Contributor
 
wiifanatic's Avatar
 
Join Date: Sep 2007
Posts: 29
Thanks: 8
wiifanatic is on a distinguished road
Default

Code:
document.write('O HAI');
wiifanatic is offline  
Reply With Quote
Old 08-23-2008, 08: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, 08:32 AM   #35 (permalink)
The Visitor
 
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, 06: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 06:04 PM. Reason: %s/cen/can/ig
zspencer is offline  
Reply With Quote
Old 09-02-2008, 08:16 PM   #37 (permalink)
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross 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); 
Ross is offline  
Reply With Quote
Old 09-10-2008, 03:14 AM   #38 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
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.
__________________

Village Idiot is offline  
Reply With Quote
Old 09-10-2008, 10:52 AM   #39 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
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")
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)

Last edited by sketchMedia : 09-10-2008 at 11:13 AM.
sketchMedia is offline  
Reply With Quote
Old 12-02-2008, 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

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 03:42 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design