Jump to content

XXS ME


Danny620

Recommended Posts

hi i have just started to use XXS ME as a firefox add on the thing is when i scan diffrent types of my website i get diffrent results and i dont think i fully understand them so here is a result form my page with the code i used

 

test.png

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>testing</title>
</head>

<body>
<form id="form2" name="form2" method="post" action="">
  <label>test:
  <input type="text" name="attack" id="texboxtest" />
  </label>
  <label>
  <input type="submit" name="test" id="test" value="test" />
  </label>
</form>

</body>
</html>
<?php 

if($_POST[test]){

$first = strip_tags($_POST[attack]);

$second = addslashes($first);

//addslashes($attack);

echo $second;

} 

?>

i just want some help with trying to prevent mysqli attacks and XSS attack maybe somebody could show me some code

Link to comment
https://forums.phpfreaks.com/topic/173415-xxs-me/
Share on other sites

The only 2 things i would suggest is.

 

If user inputtable data is going into a mysql db then use mysql_real_escape_string();

ie:

$data = mysql_real_escape_string($data);

This makes data safe to sql input.

 

Also i personally use a thing called:

Sql inject me ( from the same people as your FF plugin, )  This plugin is good at checking if they can inject to your DB ( it will fill your DB of crap if it isnt locked down mind.. )

 

A PASS will mean it passed, IE: OK

Link to comment
https://forums.phpfreaks.com/topic/173415-xxs-me/#findComment-914179
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.