Show DevBest talkietalkie - MySQLi based chat

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
made this to talk with a few friends decided to release it:

press clear to clear chatbox, change mysqli connection settings on get.php, and clean.php.
Change $admin variable on line 16 of index.php and line 4 on ctt.php (if you don't, you can't clear the database's messages)

download:
EDIT: See the comments for Version 2, this has a exploit and doesn't have as many features
 
Last edited:

Zeddicus

The Glorious PC Gaming Master Race
Mar 23, 2012
459
178
SO DATS WHAT U WERE WORKING ON

it looks... hmmm.. idk

18vd.png


Nah jks. I'll download it and give it a wee testeroonie.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
SO DATS WHAT U WERE WORKING ON

it looks... hmmm.. idk

18vd.png


Nah jks. I'll download it and give it a wee testeroonie.
Feel free to change the css in style.css,
also don't forget to run the .sql file into your database.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
That's what she said.

Btw looks clean and simple - any commands?
None, this was just to communicate with friends without having to use email (NSA). Since this is going on the TOR network I'm making a more secured version. This is what's going on my site for now.
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\get.php on line 17

Throws this error dude.
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,132
2,456
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\get.php on line 17
Throws this error dude.

Seems like it can't get the information from the database.
Make
PHP:
$mysqli = new mysqli($host, $user, $pass, $db);
to
PHP:
$mysqli = new mysqli($host, $user, $pass, $db) or die(mysqli_error());

And post the error it gives.
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
I was extremely bored sitting in the lecture in my college, Hence why I added a little feature of banning the certain user.

sZkWmk6.png



It basically, redirects you to "ban.php" and shows you list of all users who are registered by fetching the Query from users table allowing you a little X option which then bans the users IP address.

I've altered the users table with reg_ip (Which gets banned)

and for unbanning you need to go into the database and change ban = 0; for unbanning them. Pretty gay but whatever.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\get.php on line 17
Throws this error dude.
The only reason that would happen is because your database is coming back with something besides what it wants. There should be another error. it works 100% fine on my site. I'd ignore this thread for now because I'm releasing another version that disables the XSS lol.

I was extremely bored sitting in the lecture in my college, Hence why I added a little feature of banning the certain user.

sZkWmk6.png



It basically, redirects you to "ban.php" and shows you list of all users who are registered by fetching the Query from users table allowing you a little X option which then bans the users IP address.

I've altered the users table with reg_ip (Which gets banned)

and for unbanning you need to go into the database and change ban = 0; for unbanning them. Pretty gay but whatever.
On post php you could also do
Code:
if($username == "banned username here") {
//Nothing happens because they're banned
} else {
//make sure the MySQLi query is RIGHT HERE
}
You could also change the if statement to check the database if they're banned.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
Here's version two: (Double post because impatient and yolo)
1) fixed XSS
2) Changed CSS / File structure
3) Changed rank and Color system
4) a few minor changes

Change the config in app/core.php
To make some on an admin change the rank value from 0 to 1 in the mysql database,
To clear the chatbox type /clear (only works for admin),
To change the color of a user type /color {user} {color} (E.G /color Mace red or a hex code without the # (Only works for admin))

(This is a download link)
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
Here's version two: (Double post because impatient and yolo)
1) fixed XSS
2) Changed CSS / File structure
3) Changed rank and Color system
4) a few minor changes

Change the config in app/core.php
To make some on an admin change the rank value from 0 to 1 in the mysql database,
To clear the chatbox type /clear (only works for admin),
To change the color of a user type /color {user} {color} (E.G /color Mace red or a hex code without the # (Only works for admin))

(This is a download link)


Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\app\get.php on line 10
Throws the error.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\app\get.php on line 10
Throws the error.
it has something to do with your SQL database, I'm not sure what it is because it works on 6 different systems that I've tried it on. Try doing whatever you did to fix it earlier.

EDIT: if you're using the new version (by the error it looks like it), did you update the MySQL database? There's two new columns in the users table.
 
Last edited:

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
it has something to do with your SQL database, I'm not sure what it is because it works on 6 different systems that I've tried it on. Try doing whatever you did to fix it earlier.

EDIT: if you're using the new version (by the error it looks like it), did you update the MySQL database? There's two new columns in the users table.
I fixed it. :)
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
What'd you do?
I had to run the new SQL, Btw You haven't added the CLEAR option for admin in this one?!

So, you could fix this in V3, When a user types long shit, This occurs @Macemore
And comparing it to the V1, this ones abit slow at sending messages, Not sure if its only me.
eRXJtKA.png
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
I had to run the new SQL, Btw You haven't added the CLEAR option for admin in this one?!

So, you could fix this in V3, When a user types long shit, This occurs @Macemore
And comparing it to the V1, this ones abit slow at sending messages, Not sure if its only me.
eRXJtKA.png
I can add a message limit. And if you read my post you have to elevate your user in the mysql database (users -> username -> edit -> rank set to 1) and then type /clear
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
I can add a message limit. And if you read my post you have to elevate your user in the mysql database (users -> username -> edit -> rank set to 1) and then type /clear
I have done that, Yet not showing up.
 

Users who are viewing this thread

Top