PDA

View Full Version : php


Palmer
May 6th, 2009, 09:00 PM
So many batch threads... It's getting really old.
There isn't really any PHP threads so here is what I came up with in hope that it will spark up something kind of new.

Post any PHP based programs, web-pages, or whatever else in PHP.


I start with this terribly basic page just for the sake of starting.
I was pretty much just being dumb when I did this.
This was my very first PHP based code and was also created in less than 10 minutes out of boredom so it's expected to be lame and basic.

It used to be uploaded and saved to a remote host so you could view it as a regular webpage link, but I deleted it from there so you will have to view attachments and download it to use it.

pg. 1
http://pastie.org/470668

pg. 2
http://pastie.org/470673

EDIT*
Uploaded it in tarball instead.
http://www.mediafire.com/download.php?1y0dmmk1tgz

Anyways- hope to see more code here.

Palmer
June 5th, 2009, 06:11 PM
BUMP
Nobody has ANYTHING other than faggot ass batch files?
Someone has to have something PHP based.

Lanimal
June 6th, 2009, 05:48 AM
Can't really understand what you want to get done by php. What these scripts you posted may be used for? Defaced page?

Palmer
June 6th, 2009, 10:36 PM
Can't really understand what you want to get done by php. What these scripts you posted may be used for? Defaced page?

What do you mean? I'm just looking for anyone to post anything from their PHP collection, just to get away from all of the batch files and finally have something in this section... and just for shits-and-giggles, of course.
Mine was just an initial post, a very basic webpage to get it started, hoping that people would post other things they made (anything, not just webpage) in PHP.

krestean
June 11th, 2009, 06:33 PM
really easy dynamic scripting in php:
__________________________________________________ _________________

<?php

// check if the page ?page variabel is set, and set the $page variable to be the one from the url
if ( isset($_GET["page"]) && $_GET["page"] != "") $page = $_GET["page"];

// if its not, the page is home
else $page = "home";

if ($page == "home") {

echo "text to display on the 'home' page";

}
elseif ($page == "about") {

echo "text to display on the 'about' page";
}
else {
echo "text to display if invalid page, if the page variable don't match any of the above 'pages' ";
}

?>

__________________________________________________ __________

if you want to navigate trough these different "pages" if this file is called index.php,
create links like this:

<a href="index.php?page=home">home</a>
<a href="index.php?page=about">about</a>

DoG MikkyW
June 16th, 2009, 08:41 PM
Well, I've always wanted to learn PHP, I learn quickly, I'd just like to have someone to teach me.

Palmer
June 16th, 2009, 09:10 PM
How old are you? just take classes for it. lol =p
I am learning it too, but I am teaching myself (which is a slower way to learn when it comes to languages)

DoG MikkyW
June 18th, 2009, 08:44 AM
I'm 16...
asdf

Xon
June 18th, 2009, 10:47 AM
classes are to damn slow... get a book and start coding. It isn't that hard especially if you have ever done java or c++

Palmer
June 20th, 2009, 08:54 AM
I'm 16...
asdf

Yeah? and? You can take highschool classes as a freshmen and/or sophomore (like I did). I'm only 17.
buuut..............

classes are to damn slow... get a book and start coding. It isn't that hard especially if you have ever done java or c++

What Xon said is probably a better idea. :D

Cuddles
June 20th, 2009, 12:03 PM
How old are you? just take classes for it. lol =p
I am learning it too, but I am teaching myself (which is a slower way to learn when it comes to languages)

uhh....no.....learning on your own, if you actually make an attempt to learn, is exponentially faster.

also, it's only WORTH taking a course on a language if you know the teacher is good. otherwise, you're just gonna wind up with a bunch of bad habits, and knowing how to do some simple tasks, but not understanding what the language does to complete those tasks.

Palmer
June 20th, 2009, 12:19 PM
Yeah... I mean I am not self-driven enough to actually teach myself using the resources I have.

Honestly, I would rather have a class [which I don't have the option anymore], but it all depends on the teacher so you aren't guaranteed anything..... which is when the programming books and other resources would come in handy. :D

Did you take professional computer classes?
(jw)

Cuddles
June 20th, 2009, 12:36 PM
Yeah... I mean I am not self-driven enough to actually teach myself using the resources I have.

Honestly, I would rather have a class [which I don't have the option anymore], but it all depends on the teacher so you aren't guaranteed anything..... which is when the programming books and other resources would come in handy. :D

Did you take professional computer classes?
(jw)

if you consider that taking, sure

i sat through a c++ class in highschool--by sat through, i mean i had learned c++ on my own, and had the highest grade in the class and was bored and done with my work 10 minutes into the ...50 minute? class...every day....we had 3 weeks to do our final project, for instance...i fiddled with the same function for the first 2 weeks and 4 days, then did the entirety of the project in half an hour on the last day. and got a 97, because it was self-graded, and i decided i didnt want a 100. no one else got a 97. =P also, my teacher was fucking fascinated with the thing, even tho it was effortless to make...which scares me...

didnt i say that entire story in like 2 other threads....

i also had 2 years of qbasic, which was fucking IRRITATING and worthless. and worthless....maybe it was 1 year...no....2...i forgot, block scheduling means i had two years of computer programming in one year of courses....

Twisted420
June 20th, 2009, 07:26 PM
Here are some unfinished scripts I wrote a while ago for an Object-Oriented CMS.

http://pastie.org/518905 -> Registration
http://pastie.org/518907 -> Login
http://pastie.org/518910 -> Forum Backend

Just as a side note: This code is not secure. I wasn't going to secure it until i was done, but I obviously never finished.

Palmer
June 21st, 2009, 06:03 PM
Ewwie!
Red3v0lution...

Why!?!? D=
BTW, I haven't seen you posting in a while. lol

Twisted420
June 23rd, 2009, 05:44 AM
BTW, I haven't seen you posting in a while. lol
Eh, I've been around, just haven't been posting.

Ewwie!
Red3v0lution...

Why!?!? D=


What's up with that? I'm sorta confused.

Palmer
June 23rd, 2009, 05:54 PM
"<?php

/**
*By Red3v0lution
*Object-Oriented Content Management System
*PHP 5.2.9-1 && MySQL Database 5.1.32
*April 21, 2009
**/

/**
Usage:"

etc, etc...
There was a site I went to... that was from them... and they were absolutely total posers. D=
said that "apparently to make a site like 'hackthissite.org' you have to actually have the skills to do it." and that's why they didn't have theirs up correctly yet and a bunch of really retarded shit on it.

Twisted420
June 24th, 2009, 01:27 AM
Oh. Wow. You really shouldn't talk about things you don't understand. I am Red3v0lution. That site you would have found, enigmagroup.org (www.enigmagroup.org), which doesn't happen to be run by a bunch of posers.

If you want confirmation on any of that, ask Ishkur and Cuddles, as they both know me as Red3v0lution as well.

Regards,
Red3v0

DoG MikkyW
June 24th, 2009, 02:08 AM
Oh, you're Red3v0!! Hahaha, this is CrimsonEpoch. Yeah Palmer, I'd be interested what challenged base hacking site you go to that is better than enigmagroup.org?

putkapopper1990
June 24th, 2009, 01:07 PM
wow mad helpful

Twisted420
June 25th, 2009, 12:53 AM
huh? what's helpful? that statement was a bit vague

Xon
June 25th, 2009, 10:54 AM
Okay, that dude is a newb... You shouldn't even pay attention to such ones as him....

Palmer
June 27th, 2009, 11:39 AM
Oh. Wow. You really shouldn't talk about things you don't understand. I am Red3v0lution. That site you would have found, enigmagroup.org (www.enigmagroup.org), which doesn't happen to be run by a bunch of posers.

If you want confirmation on any of that, ask Ishkur and Cuddles, as they both know me as Red3v0lution as well.

Regards,
Red3v0

P.S: I dare you to email one of the people who run enigmagroup.org, psychomarine, and let him know you feel he's a poser.

What? then people are using your name and giving you a bad rep.
No, not the people from enigmagroup...
http://www.anarchistcookbook.com/f54/awesome-hacking-prank-this-fucking-logs-your-ip-t30095/
<broken link/removed>
http://red3v0lution.110mb.com/

It said "IP logged" in plain text... actually, I rant about it in the thread. go there.

On the site it said "After trying for many weeks, we have finally figured it out. In order to write the missions, you have to have coding skills! blah blah blah." That was you? if so, then that was something really lame to put on there... It said the point of creating it was to be something like hackthissite or enigmagroup or something but couldn't. I'm not talking about the actual groups
It had the most basic code for the site I have ever seen... well, not thee most basic, but pretty basic.

It was also posted by leezpo on the thread I posted above, so IDK.

BTW, I would send them a message, I can guarantee they wouldn't do anything about it... :p

EDIT*
Oh, and- there is a bit of unfinished PHP on that thread that I posted too... lol.
I stopped in the middle of creating it though, so the first part is the only working part.

DoG MikkyW
June 28th, 2009, 12:08 AM
Umm, I think he might be submitting that page to EG for the user-made missions, they have a lot of the same "tonage"...

Palmer
June 28th, 2009, 03:52 AM
That's the thing though... There's nothing on it. XD
And leezpo posted something in plain text from that so IDK.

Twisted420
June 28th, 2009, 06:32 AM
Crimson/Doggy: Yes, I was at one point writing a mission for enigmagroup, though after an argument with one of the administrators about the security of actual sql injection in a mission, it was canceled. I've no use to finish that mission as they won't put it up anyway. It was going to allow users to actually inject sql into a PoI, in order to have a real mission, rather than the simulated ones the site is used to. I was going to have it run off of SQLite, so that the database file could be stored in each user's session.

Palmer: You're post in that other thread shows just how much of a noob you really are. Being as PHP is a server-side language, you never actually get to see the code(unless you find an LFI vulnerability). It is all done before the server, in this case apache, sends the data to your browser.


<?php

$ip = $_SERVER['REMOTE_ADDR'];
$fh = fopen('./ip.txt', 'a+');
fwrite($fh, $ip);
fclose($fh);

echo "IP Logged.";

?>


That simple little code right there would allow someone to log your IP address. The only reason I made that, and the reason Leezpo made a thread about it, is because I logged his IP for mass a while back.


No one would fall for this- all you did was upload a 1 line plain text document to a "free file host."

you could have at least made an HTML or PHP code that made it look somewhat legitimate.
Not very funny.

Clever idea, because some people actually think that if anyone else sees their IP it is the end of their world (like their IP is a hand in 5-card poker or something)... I have to give you credit for that. But you could have did more with this.

EDIT*
To all the morons that actually believed this:
............... *Facepalm*

Yeah, maybe you should stop flaunting your own mediocrity. Though, now I'm wondering when the f*** I put a link to that 110mb.com site in my code, because i have no need to use that. Hell, WAMP is running right now.

So, umm, maybe you're the one in need of a good facepalm?

Regards,
Red3v0

Palmer
June 28th, 2009, 01:01 PM
Yeah... I realize this... but why the fuck are people actually falling for it??
I know how PHP works and guess what?.. I said that in the thread if you look towards the end.
I realise that it's a server-side language, and it is in a different output form (xHTML) because the PHP only tells it how to handle the web page, etc etc... w/e
So what is your point to that in telling me what I already know?

Who cares if anyone has the IP address? That is the whole fucking point. No one gives a fuck.
BTW, if you read through the thread, I posted a few different PHP codes in there for exactly what you just did. They are unfinished because I just did them off the top of my head but oh well...

Honestly, this site is the fucking biggest fail of a hacking section I've seen.
"OMFG n00bz0rd I have your IP111" then show you your IP and call you a "n00b" and that's it. How is that an own, or even a good prank?
Honestly, who gives a fuck? I even posted my own IP in that thread.
I can guarantee that no one would be able to do a god damn thing with it.

After all of this, I am that last person in need of a facepalm, because IP doesn't do a god damn thing and is logged by every single site you go to. That's it, after that there is no argument.

Oh BTW- pretty much everything I explained is in the other thread. It doesn't look legit, he could have made it actually look like it did something.
TBH I've never had a problem with you, since you joined this site, until now... Like I've been saying, the site is basic as fuck, and no one gives a shit if you see their IP. nd you're calling me a newb when you have something that says you don't have the skills, and saying that what leezpo posted is an own. XD
Seriously!!?
WTF is with that?

r00t34d
June 28th, 2009, 01:02 PM
Crimson/Doggy: Yes, I was at one point writing a mission for enigmagroup, though after an argument with one of the administrators about the security of actual sql injection in a mission, it was canceled. I've no use to finish that mission as they won't put it up anyway. It was going to allow users to actually inject sql into a PoI, in order to have a real mission, rather than the simulated ones the site is used to. I was going to have it run off of SQLite, so that the database file could be stored in each user's session.

Palmer: You're post in that other thread shows just how much of a noob you really are. Being as PHP is a server-side language, you never actually get to see the code(unless you find an LFI vulnerability). It is all done before the server, in this case apache, sends the data to your browser.



That simple little code right there would allow someone to log your IP address. The only reason I made that, and the reason Leezpo made a thread about it, is because I logged his IP for mass a while back.



Yeah, maybe you should stop flaunting your own mediocrity. Though, now I'm wondering when the f*** I put a link to that 110mb.com site in my code, because i have no need to use that. Hell, WAMP is running right now.

So, umm, maybe you're the one in need of a good facepalm?

Regards,
Red3v0

everything in there that your saying seems legit, but you can not use a php shell without uploading it something... and if the administrator has turned that shit of it is still possible, but i am not gonna go off and telling you that because i doubt you know what im talking about at all...

and this also does not make sense at all : "Yeah, maybe you should stop flaunting your own mediocrity. Though, now I'm wondering when the f*** I put a link to that 110mb.com site in my code, because i have no need to use that. Hell, WAMP is running right now."

that does not make sense at all... and i doubt you even know what LFI really does and can really do if you know it very well, i also doubt that you know what LFI stands for...

and your totally wrong about everything else LFI is not really near RFI and RFI and much easier then LFI...

you were pointing out about "<?php

$ip = $_SERVER['REMOTE_ADDR'];
$fh = fopen('./ip.txt', 'a+');
fwrite($fh, $ip);
fclose($fh);

echo "IP Logged.";

?> " without the "" in it...

and that's mostly hosting that on a php site and doing what/ev, or just uploading it on this site and getting the ip... which is RFI and not LFI, LFI is much more harder then that you should know, LFI is local, and RFI is Remote, Remote stuff is so much easier then Local again you should know that ;) piece of shit, anyways you were stating that, thats en LFI shell or something like that it is not a LFI shell and not really a "SHELL" at all you should also know that...

i can keep going on of what you know and what you don't know and trust me you don't know shit ;)

Your a fail fag, read up before you post stuff like that you don't know what your talking about trust me man you really do not


-ETA r00t34d

Twisted420
June 28th, 2009, 01:54 PM
Lmfao :) You're a complete idiot.

@Palmer: That site was made as a mission for enigmagroup.org. It's NOT a real site.

LFI: Local File include. What I was explaining was NOT an RFI(Remote File include), as the cod in which I was talking about is local to the server.

Getting the IP is RFI? Who the fuck have you been taling to that told your dumb ass that shit? I suggest you go read up a little more before trying to tell me bullshit, as I actully know what i'm talking about.

@Palmer: The Ip Logger was simply made to get Leezpo's IP. I tricked him into going to it, so he got pissed and put a bunch of links to it on this site. nothing other than that. Mass had wanted his ip just so he could fuck with him, so i got it. As for that, I've never had a problem with you up until now either, but you keep trying to tell me shit when you obviously don't understand half of what you have been saying.

i can keep going on of what you know and what you don't know and trust me you don't know shit

I don't know what I'm talking about? Can ishkur or cuddles tell this moron just how wrong he is please?

r00t34d
June 28th, 2009, 02:05 PM
You have know idea what you're talking about ;)

Palmer
June 28th, 2009, 04:22 PM
That makes more sense, thanks for clarifying.
But trust me, i know what I'm talking about.
I already know that it exports it as (x)HTML and it's "server-side" etc.
I wouldn't have made this thread if I didn't know what php was.

Leezpo is just a douche bag for posting that, regardless. he still sucks ass for putting that on there and they are retarded for freaking out like "Oh noes my IP".

Anyways, who gives a fuck, on with the thread.

<?php
$now = getdate(time());
$time = mktime(0,0,0, $now['mon'], 1, $now['year']);
$date = getdate($time);
$dayTotal = cal_days_in_month(0, $date['mon'], $date['year']);

print '<table><tr><td colspan="7"><strong>' . $date['month'] . '</strong></td></tr>';
for ($i = 0; $i < 6; $i++) {
print '<tr>';
for ($j = 1; $j <= 7; $j++) {
$dayNum = $j + $i*7 - $date['wday'];
//Print a cell with the day number in it. If it is today, highlight it.
print '<td';
if ($dayNum > 0 && $dayNum <= $dayTotal) {
print ($dayNum == $now['mday']) ? ' style="background: #ccc;">' : '>';
print $dayNum;
}
else {

print '>';
}
print '</td>';
}
print '</tr>';
if ($dayNum >= $dayTotal && $i != 6)
break;
}
print '</table>';
?>

Empty calendar pwn't. XD
(lame joke) =/

Twisted420
June 28th, 2009, 07:56 PM
A tip for you palmer, echo statments are faster than print. And instead of concatenating the different parts together, with echo, just use a comma to separate each one. It's much more efficient.

Also, whenever using for loops, if you are just incrementing or decrementing the value each time, increment the value before php reads it, like this: ++$i. Otherwise, when doing this: $i++, php must first read the value of $i, increment it, and the read it again. It's much more efficient to increment the value beforehand.

If someone has an idea of something they would like to see coded in PHP, let me know.

Palmer
June 29th, 2009, 08:14 PM
... FML.
Thanks for the tip..?
I'll have to work on that then. =/

DoG MikkyW
June 30th, 2009, 11:02 AM
That's cool. I always wondered why Rik told me to put the increments before the var. Thanks!

Twisted420
July 2nd, 2009, 07:32 PM
Come on people, nobody has anything PHP related they want to share? You people are no fun.

Xon
July 2nd, 2009, 08:00 PM
? What do you mean good sir?

DoG MikkyW
July 3rd, 2009, 04:24 AM
I honestly don't know PHP. I'm going to start learning it this August.

Xon
July 3rd, 2009, 08:26 AM
Really? I don't know much, but enough to mess with scripts and such needed for editing forums and crap.

Palmer
July 3rd, 2009, 02:35 PM
Yeah, you guys are lame, post more PHP. lol. =p

Xon
July 3rd, 2009, 04:16 PM
Hey palmer, any good with templates and shit?

Palmer
July 3rd, 2009, 04:18 PM
Not really. =/

Xon
July 3rd, 2009, 04:20 PM
Damn you... Then I will make do with what I have...

Oh, the sites up, well down for a sec, but it will be up in a sec. PM me with your desired screen name k.

Twisted420
July 3rd, 2009, 08:04 PM
I pwn templates :D

Xon
July 3rd, 2009, 09:05 PM
vbulletin templates?

killerpit4e
July 7th, 2009, 06:32 PM
<?php

require_once(dirname(__FILE__)."/../pfccommand.class.php");

class pfcCommand_me extends pfcCommand
{
var $usage = "/me {message}";

function run(&$xml_reponse, $p)
{
$clientid = $p["clientid"];
$param = $p["param"];
$sender = $p["sender"];
$recipient = $p["recipient"];
$recipientid = $p["recipientid"];

$c =& pfcGlobalConfig::Instance();
$u =& pfcUserConfig::Instance();
$ct =& pfcContainer::Instance();

if (trim($param) == "")
{
// error
$cmdp = $p;
$cmdp["param"] = _pfc("Missing parameter");
$cmdp["param"] .= " (".$this->usage.")";
$cmd =& pfcCommand::Factory("error");
$cmd->run($xml_reponse, $cmdp);
return;
}

$msg = phpFreeChat::PreFilterMsg($param);
$ct->write($recipient, "*me*", $this->name, $u->getNickname()." ".$msg);
}
}

?>

Palmer
August 1st, 2009, 01:37 AM
Kühl...
I haven't been working on PHP very much at all lately... =/

killerpit4e
August 1st, 2009, 11:40 AM
so bastard fucked up my chat room that that code i put up was from and i havent been doing php that much anymore could one of u help me hack him or send him a virus or help me fix my chat room

DoG MikkyW
August 1st, 2009, 11:51 AM
so bastard fucked up my chat room that that code i put up was from and i havent been doing php that much anymore could one of u help me hack him or send him a virus or help me fix my chat room

Speak english and use grammar, tell us your problem intelligently, and we might be able to help you...

killerpit4e
August 1st, 2009, 09:57 PM
www.ambroid.co.uk/ambroid_talk/chat

killerpit4e
August 13th, 2009, 12:09 PM
i got the chatroom back up but now someones trying to take over my site

DoG MikkyW
August 15th, 2009, 12:08 AM
Hmmm, I found an xss vulnerability on the login on the main site...