Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-29-2009, 05:55 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Mailbox System

Hello people of the Graal forums!

I made this system a few months ago. It was just to test out the sqlite functions, and see how they work.

I never intended to release it, so some things might seem a bit...inefficient.
Also, some of the gui controls have some very long and unneccesary names. But that is because every gui control had the prefix "Npulse".
The reason being, I scripted this on Npulse. So, I just replaced 'Npulse' with 'Mail'.
And that made some gui controls have weird names, such as "Mail_Mail_*".

Its just a basic mailing system.

You can compose mail, read mail, reply, add and manage contacts.
You can move the mail between your inbox and a saved folder, or delete them. So its just basic functionality of a mailbox.


As I said, this was never meant for release, but since its not being used for anything, I decided to release it.
So, use it as you wish, edit it, mock it, praise it, do as you see fit.

I'll include some screenshots as well so you can see how it looks.
Attached Thumbnails
Click image for larger version

Name:	ss_1.png
Views:	237
Size:	13.1 KB
ID:	50128   Click image for larger version

Name:	ss_2.png
Views:	240
Size:	6.8 KB
ID:	50129   Click image for larger version

Name:	ss_3.png
Views:	228
Size:	6.1 KB
ID:	50130  
Attached Files
File Type: txt mail_system_c.txt (24.0 KB, 332 views)
Reply With Quote
  #2  
Old 12-29-2009, 06:02 AM
k_killar k_killar is offline
retired graal veteran
k_killar's Avatar
Join Date: Aug 2007
Posts: 243
k_killar is infamous around these parts
Send a message via AIM to k_killar
hey didnt you script stuff for Dark horizon? im manager and we could use you send me a forum pm for info yo.
Reply With Quote
  #3  
Old 12-29-2009, 06:03 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by k_killar View Post
hey didnt you script stuff for Dark horizon? im manager and we could use you send me a forum pm for info yo.
I don't know, and I didn't realize I was posting a resume. (I don't script for uc playerworlds anyways because I don't have a gold account)
Reply With Quote
  #4  
Old 12-29-2009, 06:25 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You have no escapes on anything before you store it in the table, so using a single quote will result in SQL Errors which in turn makes SQL Injection a possibility.

PHP Code:
function onCreated() {
  
temp.str "How's it going!";
  echo(
temp.str.escape()); // Prints the Escaped String

__________________
Quote:
Reply With Quote
  #5  
Old 12-29-2009, 06:31 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
I have all 's being parsed clientside before sending it serverside though.

Altho, adding that would be better...I just didn't think of sql injections on Graal. :P
Reply With Quote
  #6  
Old 12-29-2009, 06:32 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Quote:
Originally Posted by oo_jazz_oo View Post
I have all 's being parsed clientside before sending it serverside though.
Doesn't stop me from using a memory editor ;O
Reply With Quote
  #7  
Old 12-29-2009, 06:33 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
You shouldn't be using a memory editor on Graal. Tisk tisk, I thought I raised you better.
Reply With Quote
  #8  
Old 12-29-2009, 06:49 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by 12171217 View Post
Doesn't stop me from using a memory editor ;O
u so cool
__________________
Reply With Quote
  #9  
Old 12-29-2009, 07:29 AM
zephirot zephirot is offline
Banned?
Join Date: Sep 2004
Location: Paris
Posts: 1,311
zephirot is a name known to allzephirot is a name known to allzephirot is a name known to all
Send a message via AIM to zephirot Send a message via MSN to zephirot
Cool system!
__________________

Quote:
Originally Posted by unixmad
Can you just shut up ?
MAGA
MFGA
MEGA
Reply With Quote
  #10  
Old 12-29-2009, 07:34 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
I was speaking in terms of how it could be exploited. It was more or less an explanation as to why parsing them clientside is a bad idea compared to escaping them on the server. Why did nobody get butthurt when SQL injections were mentioned? Jesus Christ.

And I like your stuff, Jazz, it's good.
Reply With Quote
  #11  
Old 12-29-2009, 07:06 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by oo_jazz_oo View Post
I have all 's being parsed clientside before sending it serverside though.
I tested it, and got SQL errors when using single quotes so you've still got some fixing up to do. Just drop the clientside parsing, and escape on the serverside.

Other than that, it's pretty nifty.
__________________
Quote:
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.