Firefox history harvesting!

Standard

%APPDATA%\Mozilla\Firefox\Profiles
=======

select *
FROM moz_places
WHERE
last_visit_date BETWEEN strftime(‘%s’,’2000-04-01′)*1000000
AND strftime(‘%s’,’2014-07-10′)*1000000
AND visit_count < (2) AND frecency < 21

—-
delete
FROM moz_places
WHERE
last_visit_date BETWEEN strftime(‘%s’,’2000-04-01′)*1000000
AND strftime(‘%s’,’2014-07-10′)*1000000
AND visit_count < (2) AND frecency < 21

=============
select * from moz_historyvisits as hv
LEFT OUTER JOIN moz_places as p
on hv.place_id = p.id where p.visit_count IS NULL
—-
delete from moz_historyvisits where id in(
select hv.id from moz_historyvisits as hv
LEFT OUTER JOIN moz_places as p
on hv.place_id = p.id where p.visit_count IS NULL)
========

VACUUM

=====

 

 

php error handling

Standard

To display all errors you need to:

1. Have these lines in the PHP script you’re calling from the browser (typically index.php):

error_reporting(E_ALL);
ini_set('display_errors',1);

2.(a) Make sure that this script has no syntax errors

—or—

2.(b) Set display_errors = On in your php.ini

Otherwise, it can’t even run those 2 lines!

You can check for syntax errors in your script by running (at the command line):

php -l index.php

If you include the script from another PHP script then it will display syntax errors in the included script. For example:

index.php

error_reporting(E_ALL);
ini_set('display_errors',1);// Any syntax errors here will result in a blank screen in the browser

include 'my_script.php';

my_script.php

adjfkj // This syntax error will be displayed in the browser

PHP type comparison tables Digest

Standard
Comparisons of $x with PHP functions
Expression gettype() empty() is_null() isset() boolean : if($x)
$x = “”; string TRUE FALSE TRUE FALSE
$x = null; NULL TRUE TRUE FALSE FALSE
var $x; NULL TRUE TRUE FALSE FALSE
$x is undefined NULL TRUE TRUE FALSE FALSE
$x = array(); array TRUE FALSE TRUE FALSE
$x = false; boolean TRUE FALSE TRUE FALSE
$x = true; boolean FALSE FALSE TRUE TRUE
$x = 1; integer FALSE FALSE TRUE TRUE
$x = 42; integer FALSE FALSE TRUE TRUE
$x = 0; integer TRUE FALSE TRUE FALSE
$x = -1; integer FALSE FALSE TRUE TRUE
$x = “1″; string FALSE FALSE TRUE TRUE
$x = “0″; string TRUE FALSE TRUE FALSE
$x = “-1″; string FALSE FALSE TRUE TRUE
$x = “php”; string FALSE FALSE TRUE TRUE
$x = “true”; string FALSE FALSE TRUE TRUE
$x = “false”; string FALSE FALSE TRUE TRUE

Continue reading