Secure a Lava Script (Wapdesire)

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

32 replies · 5,631 views · started 17 years ago · 1 min read

TL;DR · summary of 32 replies
  • - The fix for removing sessions in Lava Script involves changing the session handling code on every page.
  • - The approach taken was to remove &sid=$sid from URLs and secure $_GET/$_POST data using a custom function.
  • - There were differing opinions about whether hiding sessions makes it more secure, with some suggesting full re-coding is necessary for proper security.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

12 participants
djdevil89 Senior · 287 posts #1

In this Tutorial i will explain the basics of how to secure a lava script:

  1. Lets Remove the Sessions The easiest way of removing the session in lava is to use
session_start();

lets put that at the beginning of every page right after the <?php ok that still dont removes the sessions right? Thats what we do next Wapdesire right from the start checks if a session is already existing in a database we need to delete that and start a new session :

  if (isset($_SESSION['sid']))
  {
  mysql_query("DELETE FROM ibwf_ses WHERE id='$_SESSION[sid]'");
  unset($_SESSION['sid']);
  
  }
  else
  {
  $_SESSION['sid'] = $sid;
  }

ok now we go to every page again you will note the

$sid = $_GET['sid'];

there we are going to change it to

$sid = $_SESSION['sid'];

after we have done that you can securly remove the &sid=$sid from the links We have just removed the sessions from the url congrats 2. Secure posted data like you might have noted there are a lot of $_GET or $_POST statements lets secure them here is a simple function that will do the job simply put it in core.php

function getget($name, $def = '') {
  if (isset($_REQUEST[$name]))
    return $_REQUEST[$name];
  else 
    return $def;
}

and instead of $_GET or post we use

$pass = getget('pass', $pass);
$user = getget('user', $user);

for example

  1. Lets secure the gallery

use phpthumb for gallery simply look in google for phpthumb then in user profiles or in gallery use it the way how to use it is discribed in the phpthumb file

hope this helps you guys

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
riderz Lead · 975 posts #4

u can use this basicly for any script ive done that to lava methos also


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

djdevil89 Senior · 287 posts #5

yeah riderz its fun working with you 🙂

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
riderz Lead · 975 posts #6

lol yea m8 i hope our edit gona be good


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

something else Fellow · 2,296 posts #7

The above doesnt secure a lava script it just makes it harder for noobs to hack

Mysterio Lead · 630 posts #8

well, thank you! So, djmatrix and riderz are working together? Can't wait to see your work!

mysterio.al - programming is a functional art

djdevil89 Senior · 287 posts #9

if it makes it harder for noobs to hack then it is more secure aint it? and mysterio3 yes we work together

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
kei_ki7 Senior · 431 posts #10

i agree with DjMatrix 🙂 its more secure than to do nothing 🙂

Did I help you? You can help me too Your donations will help me finance my studies.

icedroplet1987 Senior · 258 posts #11

actually, a gr8 tutorial.. to help amost everybody coz, many using lavalair here..// thnx allot sir:)

something else Fellow · 2,296 posts #13

DjMatrix wrote: if it makes it harder for noobs to hack then it is more secure aint it? and mysterio3 yes we work together

kk just saying isnt 100 percent secure 🙂

changing a session is as easy as changing a url to a lot of people including via phone 🙂

Mysterio Lead · 630 posts #14

what you making, guys? In what you working?

mysterio.al - programming is a functional art

WhiteWarrior Principal · 1,419 posts #16

DjMatrix wrote: if it makes it harder for noobs to hack then it is more secure aint it?

Incorrect, just hiding a session don't make it more secure as the sessions still show on images etc and it will make more holes and alot more easy to hack.

i found that out about a day ago. and tested what i was told and it worked.. so really hiding the session is unleasing a whole new hole.

riderz Lead · 975 posts #17

is there other way to secure site up then whitewarrior


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

WhiteWarrior Principal · 1,419 posts #18

What an original lavalair or wapdesire?.. nope, it only way it can be done is to FULLY recode it and find all the holes and fix them..

thats why its pointless in creating topic saying "secure lavalair".. the script is very out dated now and there are LOADS of good/bad edits but ALL have holes.. and simple to get into if you know how.

The script has to run globals ON what in itself is unsecure. and apche IS will disable it when they update.. so its pointless in working on an lava script. make a new script.. if you can edit then you can code.. editing is harder then coding.

something else Fellow · 2,296 posts #19

WhiteWarrior wrote: What an original lavalair or wapdesire?.. nope, it only way it can be done is to FULLY recode it and find all the holes and fix them..

thats why its pointless in creating topic saying "secure lavalair".. the script is very out dated now and there are LOADS of good/bad edits but ALL have holes.. and simple to get into if you know how.

The script has to run globals ON what in itself is unsecure. and apche IS will disable it when they update.. so its pointless in working on an lava script. make a new script.. if you can edit then you can code.. editing is harder then coding.

It Doesnt need fully re-coding but does need a lot of work. (every page needs working on) But then again it is a good idea to learn on lava and find the holes yourself So then when your ready to code your own site your not going to make the same mistakes

WhiteWarrior Principal · 1,419 posts #20

something else wrote: It Doesnt need fully re-coding but does need a lot of work. (every page needs working on) But then again it is a good idea to learn on lava and find the holes yourself So then when your ready to code your own site your not going to make the same mistakes

To get RID of the holes it will need fully recoding.. like you just said. EVERY page will need working on.. why not just FULLY re-code it? it will save time.. Finding holes/bugs will take you longer then coding your own script.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close