Monday, 22 April 2019

simple pagination using php code

simple pagination using php code



pagination.php

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" id="font-awesome-style-css" href="http://phpflow.com/code/css/bootstrap3.min.css" type="text/css" media="all">
<!-- jQuery -->
<script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" charset="utf8" src="select2.js"></script>
<link rel="stylesheet" type="text/css" href="select2.css"> 
<title>phpflow.com : Source code of simaple pagination</title>
</head>

<body>
<div><h3>Source code : PHP simaple pagination</h1></div>
<div>
<link href="bootstrap.css" rel="stylesheet">  
<?php  
$dbhost = 'localhost';  
$dbuser = 'root';  
$dbpass = "";  
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');  
$dbname = 'test';  
$connection = mysql_select_db($dbname); 
  
$limit = 2;  
if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; };  
$start_from = ($page-1) * $limit;  
  
$sql = "SELECT * FROM posts ORDER BY title ASC LIMIT $start_from, $limit";  
$rs_result = mysql_query ($sql);  
?>  
<table class="table table-bordered table-striped">  
<thead>  
<tr>  
<th>title</th>  
<th>body</th>  
</tr>  
</thead>  
<tbody>  
<?php  
while ($row = mysql_fetch_assoc($rs_result)) {  
?>  
            <tr>  
            <td><? echo $row["title"]; ?></td>  
            <td><? echo $row["body"]; ?></td>  
            </tr>  
<?php  
};  
?>  
</tbody>  
</table>  
<?php  
$sql = "SELECT COUNT(id) FROM posts";  
$rs_result = mysql_query($sql);  
$row = mysql_fetch_row($rs_result);  
$total_records = $row[0];  
$total_pages = ceil($total_records / $limit);  
$pagLink = "<ul class='pagination'>";  
for ($i=1; $i<=$total_pages; $i++) {  
             $pagLink .= "<li><a href='pagination.php?page=".$i."'>".$i."</a></li>";  
};  
echo $pagLink . "</ul>";  
?>  
</div>
</body>
<script>
jQuery(document).ready(function() {
jQuery("#extId").select2({
                width: 'element',
                matcher: function(term, text) {
                    return text === 'Add New Number' || $.fn.select2.defaults.matcher.apply(this, arguments);
                },
                sortResults: function(results) {
                    if (results.length > 1) results.pop();
                    return results;
                }
});
    });
</script>


posts.sql for database




--
-- Database: `test`
--

-- --------------------------------------------------------

--
-- Table structure for table `posts`
--

CREATE TABLE IF NOT EXISTS `posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `body` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `posts`
--


INSERT INTO `posts` (`id`, `title`, `body`) VALUES

(1, 'title1', 'body1'),
(2, 'title2', 'body'),
(3, 'title3', 'body3'),
(4, 'title4', 'body4');

responsive html email template code


responsive html email template code



<!DOCTYPE html>

<html>
    <head>
   
        <title>Responsive html email</title>
       
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
       
        <style type="text/css">
            /* Defaults */
            h1 { font-size: 28px;}
            h2 { font-size: 24px; }
            .text-center { text-align: center;}

            /* Apple specific fix */
            @media screen and (min-width: 601px) {
                .container {width: 600px!important;}
            }
        </style>

    </head>


    <body bgcolor="#f4f4f4" style="font-family: sans-serif; color: #333333; line-height: 150%; font-size: 16px;">
        <!--[if (gte mso 9)|(IE)]>
        <table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
        <![endif]-->

                    <!-- START : EMAIL CONTENT -->
                    <table bgcolor="#ffffff" class="container" width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px; margin:auto;">

                        <!-- START : 1 COLUMN -->
                        <tr>
                            <td class="text-center">
                                <h1>Email header</h1>
                            </td>
                        </tr>
                        <!-- END : 1 COLUMN -->

                        <tr>
                            <td bgcolor="#f8f8f8" style="padding: 20px;">
                                Lorem ipsum dolor sit amet, usu ut legimus voluptatum. Mel ei corrumpit liberavisse, ex vix tollit causae. Ea est debitis recusabo, at latine detracto dissentiet nec, id ius quidam molestie. Sit in aeterno offendit reformidans. Hinc vituperatoribus ne qui, eam ne iusto alterum. Eos qualisque conceptam instructior ut, cu habeo voluptaria vis. Nec at sanctus indoctum sapientem, vim agam minim an.
                            </td>
                        </tr>

                        <tr>
                            <td style="font-style: italic; text-align: center;">
                                <h2>"Lorem ipsum dolor sit amet, usu ut legimus voluptatum"</h2>
                            </td>
                        </tr>

                        <tr>
                            <td style="padding: 0 20px;">
                                Lorem ipsum dolor sit amet, usu ut legimus voluptatum. Mel ei corrumpit liberavisse, ex vix tollit causae. Ea est debitis recusabo, at latine detracto dissentiet nec, id ius quidam molestie.
                            </td>
                        </tr>

                        <!-- START : 2 COLUMNS -->
                        <tr>

                            <td style="text-align: center; vertical-align: top; font-size: 0; padding: 10px;">
                                <!--[if (gte mso 9)|(IE)]>
                                <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td>

                                <![endif]-->
                                            <div style="width: 280px; display: inline-block; vertical-align: top;">
                                                <table width="100%">
                                                    <tr>
                                                        <td style="font-size: 16px;">Column 1<br /><img src="http://placehold.it/260x260"></td>
                                                    </tr>
                                                </table>
                                            </div>
                                <!--[if (gte mso 9)|(IE)]>
                                        </td>
                                        <td>
                                <![endif]-->
                                            <div style="width: 280px; display: inline-block; vertical-align: top;">
                                                <table width="100%">
                                                    <tr>
                                                        <td style="font-size: 16px;">Column 2<br /><img src="http://placehold.it/260x260"></td>
                                                    </tr>
                                                </table>
                                            </div>
                                <!--[if (gte mso 9)|(IE)]>
                                        </td>
                                    </tr>
                                </table>
                                <![endif]-->
                            </td>
                        </tr>
                        <!-- END : 2 COLUMNS -->

                        <!-- START : 1 column bottom content -->
                        <tr>
                            <td style="padding: 0 20px 20px;">
                                Lorem ipsum dolor sit amet, usu ut legimus voluptatum. Mel ei corrumpit liberavisse, ex vix tollit causae. Ea est debitis recusabo, at latine detracto dissentiet nec, id ius quidam molestie.
                            </td>
                        </tr>
                        <!-- END : 1 column bottom content -->


                    </table>

                    <!-- START : Footer -->
                    <table width="100%" style="margin: auto; max-width: 600px;">
                        <tr>
                            <td style="text-align: center;">
                                <p><a href="#">Unsubscribe</a><p>
                            </td>
                        </tr>
                    </table>
                    <!-- END : Footer -->

        <!--[if (gte mso 9)|(IE)]>
                </td>
            </tr>

        </table>
        <![endif]-->

    </body>
</html>

dynamic textbox in php codeing




index.php




<?php

if(!empty($_POST["save"])) {
$conn = mysql_connect("localhost","root","");
mysql_select_db("examples",$conn);
$itemCount = count($_POST["item_name"]);
$itemValues=0;
$query = "INSERT INTO item (item_name,item_price) VALUES ";
$queryValue = "";
for($i=0;$i<$itemCount;$i++) {
if(!empty($_POST["item_name"][$i]) || !empty($_POST["item_price"][$i])) {
$itemValues++;
if($queryValue!="") {
$queryValue .= ",";
}
$queryValue .= "('" . $_POST["item_name"][$i] . "', '" . $_POST["item_price"][$i] . "')";
}
}
$sql = $query.$queryValue;
if($itemValues!=0) {
$result = mysql_query($sql);
if(!empty($result)) $message = "Added Successfully.";
}
}
?>

<HTML>
<HEAD>
<TITLE>Dynamic Textbox</TITLE>
<LINK href="style.css" rel="stylesheet" type="text/css" />
<SCRIPT src="http://code.jquery.com/jquery-2.1.1.js"></SCRIPT>
<SCRIPT>
function addMore() {
$("<DIV>").load("input.php", function() {
$("#product").append($(this).html());
});
}
function deleteRow() {
$('DIV.product-item').each(function(index, item){
jQuery(':checkbox', this).each(function () {
            if ($(this).is(':checked')) {
$(item).remove();
            }
        });
});
}
</SCRIPT>
</HEAD>
<BODY>
<FORM name="frmProduct" method="post" action="">
<DIV id="outer">
<DIV id="header">
<DIV class="float-left">&nbsp;</DIV>
<DIV class="float-left col-heading">Item Name</DIV>
<DIV class="float-left col-heading">Item Price</DIV>
</DIV>
<DIV id="product">
<?php require_once("input.php") ?>
</DIV>
<DIV class="btn-action float-clear">
<input type="button" name="add_item" value="Add More" onClick="addMore();" />
<input type="button" name="del_item" value="Delete" onClick="deleteRow();" />
<span class="success"><?php if(isset($message)) { echo $message; }?></span>
</DIV>
<DIV class="footer">
<input type="submit" name="save" value="Save" />
</DIV>
</DIV>
</form>
</BODY>
</HTML>



input.php



<DIV class="product-item float-clear" style="clear:both;">
<DIV class="float-left"><input type="checkbox" name="item_index[]" /></DIV>
<DIV class="float-left"><input type="text" name="item_name[]" /></DIV>
<DIV class="float-left"><input type="text" name="item_price[]" /></DIV>
</DIV>




style.css



body{font-family: "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #CCCCCC;}
.float-clear{clear:both;}
.float-left{float:left;}
#outer {margin: 0 auto;width: 50%;border-top: #333 2px solid;background-color: #FFFFFF;}
.product-item input[type="text"] {padding: 5px;border:#ccc 1px solid;border-radius:4px;margin: 0px 10px;}
.product-item input[type="checkbox"] {margin: 10px;}
#header div{padding: 20px 5px 15px;margin: 0px 10px;}
.col-heading{width:150px;font-size:16px;font-weight:bold;}
.footer{padding:10px; background:#333;margin-top:20px;}
.btn-action{padding:10px;}
.btn-action input[type="button"]{padding:5px; border:#CCCCCC 1px solid; border-radius: 4px;}
input[type="submit"]{padding:5px 20px; border:#000000 1px solid; border-radius: 4px; background-color:#09f;color:#fff;}
.success{color:#66CC00;padding: 5px; font-weight:bold;}


advanced-search-using php coding

<?php
$conn = mysqli_connect("localhost", "root", "", "blog_samples");
$with_any_one_of = "";
$with_the_exact_of = "";
$without = "";
$starts_with = "";
$search_in = "";
$advance_search_submit = "";

$queryCondition = "";
if(!empty($_POST["search"])) {
$advance_search_submit = $_POST["advance_search_submit"];
foreach($_POST["search"] as $k=>$v){
if(!empty($v)) {


$queryCases = array("with_any_one_of","with_the_exact_of","without","starts_with");
if(in_array($k,$queryCases)) {
if(!empty($queryCondition)) {
$queryCondition .= " AND ";
} else {
$queryCondition .= " WHERE ";
}
}
switch($k) {
case "with_any_one_of":
$with_any_one_of = $v;
$wordsAry = explode(" ", $v);
$wordsCount = count($wordsAry);
for($i=0;$i<$wordsCount;$i++) {
if(!empty($_POST["search"]["search_in"])) {
$queryCondition .= $_POST["search"]["search_in"] . " LIKE '%" . $wordsAry[$i] . "%'";
} else {
$queryCondition .= "title LIKE '" . $wordsAry[$i] . "%' OR description LIKE '" . $wordsAry[$i] . "%'";
}
if($i!=$wordsCount-1) {
$queryCondition .= " OR ";
}
}
break;
case "with_the_exact_of":
$with_the_exact_of = $v;
if(!empty($_POST["search"]["search_in"])) {
$queryCondition .= $_POST["search"]["search_in"] . " LIKE '%" . $v . "%'";
} else {
$queryCondition .= "title LIKE '%" . $v . "%' OR description LIKE '%" . $v . "%'";
}
break;
case "without":
$without = $v;
if(!empty($_POST["search"]["search_in"])) {
$queryCondition .= $_POST["search"]["search_in"] . " NOT LIKE '%" . $v . "%'";
} else {
$queryCondition .= "title NOT LIKE '%" . $v . "%' AND description NOT LIKE '%" . $v . "%'";
}
break;
case "starts_with":
$starts_with = $v;
if(!empty($_POST["search"]["search_in"])) {
$queryCondition .= $_POST["search"]["search_in"] . " LIKE '" . $v . "%'";
} else {
$queryCondition .= "title LIKE '" . $v . "%' OR description LIKE '" . $v . "%'";
}
break;
case "search_in":
$search_in = $_POST["search"]["search_in"];
break;
}
}
}
}
$orderby = " ORDER BY id desc";
$sql = "SELECT * FROM links " . $queryCondition;
$result = mysqli_query($conn,$sql);

?>
<html>
<head>
<title>Advanced Search using PHP</title>
<style>
body{
width: 600px;
font-family: "Segoe UI",Optima,Helvetica,Arial,sans-serif;
line-height: 25px;
}
.search-box {
padding: 30px;
background-color:#C8EEFD;
}
.search-label{
margin:2px;
}
.demoInputBox {   
padding: 10px;
border: 0;
border-radius: 4px;
margin: 0px 5px 15px;
width: 250px;
}
.btnSearch{   
padding: 10px;
background: #84D2A7;
border: 0;
border-radius: 4px;

margin: 0px 5px;
color: #FFF;
width: 150px;
}
#advance_search_link {
color: #001FFF;
cursor: pointer;
}
.result-description{
margin: 5px 0px 15px;
}
</style>
<script>
function showHideAdvanceSearch() {
if(document.getElementById("advanced-search-box").style.display=="none") {
document.getElementById("advanced-search-box").style.display = "block";
document.getElementById("advance_search_submit").value= "1";
} else {
document.getElementById("advanced-search-box").style.display = "none";
document.getElementById("with_the_exact_of").value= "";
document.getElementById("without").value= "";
document.getElementById("starts_with").value= "";
document.getElementById("search_in").value= "";
document.getElementById("advance_search_submit").value= "";
}
}
</script>
</head>
<body>
<h2>Advanced Search using PHP</h2>
    <div>     
<form name="frmSearch" method="post" action="index.php">
<input type="hidden" id="advance_search_submit" name="advance_search_submit" value="<?php echo $advance_search_submit; ?>">
<div class="search-box">
<label class="search-label">With Any One of the Words:</label>
<div>
<input type="text" name="search[with_any_one_of]" class="demoInputBox" value="<?php echo $with_any_one_of; ?>" />
<span id="advance_search_link" onClick="showHideAdvanceSearch()">Advance Search</span>
</div>
<div id="advanced-search-box" <?php if(empty($advance_search_submit)) { ?>style="display:none;"<?php } ?>>
<label class="search-label">With the Exact String:</label>
<div>
<input type="text" name="search[with_the_exact_of]" id="with_the_exact_of" class="demoInputBox" value="<?php echo $with_the_exact_of; ?>" />
</div>
<label class="search-label">Without:</label>
<div>
<input type="text" name="search[without]" id="without" class="demoInputBox" value="<?php echo $without; ?>" />
</div>
<label class="search-label">Starts With:</label>
<div>
<input type="text" name="search[starts_with]" id="starts_with" class="demoInputBox" value="<?php echo $starts_with; ?>" />
</div>
<label class="search-label">Search Keywords in:</label>
<div>
<select name="search[search_in]" id="search_in" class="demoInputBox">
<option value="">Select Column</option>
<option value="title" <?php if($search_in=="title") { echo "selected"; } ?>>Title</option>
<option value="description" <?php if($search_in=="description") { echo "selected"; } ?>>Description</option>
</select>
</div>
</div>

<div>
<input type="submit" name="go" class="btnSearch" value="Search">
</div>
</div>
</form>
<?php while($row = mysqli_fetch_assoc($result)) { ?>
<div>
<div><strong><?php echo $row["title"]; ?></strong></div>
<div class="result-description"><?php echo $row["description"]; ?></div>
</div>
<?php } ?>
</div>
</body>
</html>

Sunday, 21 April 2019

Mobile Secret Codes





Nokia 31xx
____________

Firmware version
*#0000# or *#3110#
IMEI Code
*# 06 #
Restores Factory Settings
*#7780#
Warranty Codes

*#92702689# (= *#war0anty#)

Just scroll down through the information. If entering the above code requires a
further warranty code try entering the following:

6232 (OK) : Month and year of manufacture
7332 (OK) : Last repair date
7832 (OK) : Purchase date (if previously set)
9268 (OK) : Serial number
37832 (OK) : Set purchase date (this can only be done once)
87267 (OK) : Confirm transfer

Nokia 5110
_____________


IMEI Number *#06#
For checking the IMEI (International Mobile Equipment Identity).
---------------------------------------------------------
Security Code 12345
Default security code is 12345. If you forgot your security code, there s so many program on the net which allowed you to know the security code likes Security ID Generator, Nokia IMEI Changer, etc.

update:
Security ID Generator (SID.EXE) and IMEI Generator (NOKIAIMEI.EXE) doesn t works with Nokia 5110
Resetting Security Code

If you accidentally lock the phone or forgot the security code, the best thing to do is check it with your local Nokia dealer. For advanced user, you can use WinTesla, PCLocals or LogoManager program to read the security code or resetting the code (You will need an FBUS/MBUS (or compatible) cable to do this.
---------------------------------------------------------
Software Version *#0000#
For checking the phones software (SW) - called firmware revision information.
e.q : Version V. 4.51 (26-03-98) will display
V 04.51
26-03-98

NSE-1

first line:
The Software Version (my guess is that this software has been used in previously Nokia-phones, what do you say?!).

second line:
The Date of the SW release.

third line:
NHE-8 has something to do with the type of phone you are dealing with. Is it GSM 900 (standard), GSM 1800 (DCS1800) or GSM 1900 (PCS1900)?
Nokia 2110, 3110, 8110(i) are all NHE types. The only thing that vary is the code after NHE- ("8").
NHE = GSM 900, NHK =GSM 1800 - The number in the end = the model (2110i = 4 etc.)
The 5110 and 6110 is called NSE-1 and NSE-3...this may be because it supports EFR (?)

update:
Newest Software Version was V5.22 (xx-xx-99)
V 05.22
01-07-99
NSE-1

If your software version is V4.00, upgrade your software version to latest version. V4.00 contains bugs that sometimes will show message,
"SIM Card Not Ready" even the card is already inside the phone.
---------------------------------------------------------

Software Update
The only thing to do (for you and me) is for us to go to the nearest Nokia dealer and make him do it for you. Just remember that it is supposed to be free (a receipt is required) so don t let him tell you anything else!
---------------------------------------------------------

SIM clock *#746025625# [*#sim0clock#]
to check if the Sim-Clock can be Stopped. This option is depen on your service provider network. (Sim-clock-stop is a kind of standby mode which will save battery time)

update:
This code doesn t work on phone with software version 4.59.
---------------------------------------------------------

Waranty Code *#92702689# [*#war0anty#]
Menu:
Displays Serial Number.
Displays the Month and Year of Manufacture (0698)
Displays (if there) the date where the phone was purchased (MMYY) you can here set the Purchasing Date
(Warning: You can only do this once - so be careful what you write)
Displays the date of the last repairment - if found (0000)
The next screen has Transfer User Data? (the same option as the 8110)
To exit turn the phone off and then back on.
---------------------------------------------------------

SP Lock The Service provider (SP) lock
Is used to lock the cell phone to the SP s SIM card. Once the cell phone is locked to a specific operator, if one inserts a SIM card from a different operator the phone will refuse to accept it!
The cell phone will however accept another SIM card from the same operator.

All Nokia phones (2110 and newer) have four different SIM locks which can be used to lock the phone for up to 4 different providers. But most phones with restriction only have one lock activated. ( lock 1)
The main code used in Nokia phones is:

#pw+(master code)+Y#

This code is able to check, activate or remove Sim card restriction (SP-lock).
Use the * key to get the p, + and w chars.
Y has to be 1,2,3 or 4 - depending of what lock you what to deal with.

#pw+1234567890+1# for Provider-Lock status
#pw+1234567890+2# for Network-Lock status
#pw+1234567890+3# for Provider(???)-Lock status
#pw+1234567890+4# for SimCard-Lock status

(master code) is a 10 digit code, based on the phones IMEI number.
(I can NOT give you the master code SO DON T ASK ME FOR IT! )

Please click here to learn more about how to obtain mastercode and find out the lock status of your phone
eq. To remove restriction on lock 1 type following code:

#pw+(master code)+1#

If you just want to check your phone use 10 random numbers Eg. 1234567890 as the (master code)
eq. To check if phone if restricted on lock 1 type the following code:

#pw+1234567890+1#

Please NOTE that these codes could be used with care!
A user told me that it s only possible to type in about 3 different codes on each lock! Then something bad will happen ..therefore be careful!
---------------------------------------------------------

How can I check what locks have my phone closed?

There is 2 methods:
Use winlock to see the state of the locks, pressing Read Info.The Counter is the number of times that you have tried unlock your phone using an incorrect master code.
You can check it entering an imaginary mastercode on your phone but, it s not recommended because if you try enter a code 5 times your phone will not work anymore. By example, if you press at your phone #pw+1234567890+2# (note that # , p , w and + characters must be selected from * key) and your phone give you Code Error then your phone have lock 2 closed, if you get the message SIM Restriction Off your phone have lock 2 opened.
Look the table above to see how can check all locks:

Lock number Description Sequence to Check
1 Provider Lock #pw+1234567890+1#
2 Network-Lock #pw+1234567890+2#
3 Another Provider Lock #pw+1234567890+3#
4 SIM Card Lock #pw+1234567890+4#

---------------------------------------------------------
Unlock SP-Lock
Here is a way to Unlock your phone which is Service Provider locked, without to know SPLock code. With a Nokia 16xx/21xx/31xx/51xx/81xx that are SIMlocked to one privider you can bypass the SP lock like this:

First of all, PIN CODE MUST BE ON, then press:

C

C and hold until it clears display
* and hold until start to blink
* and hold until start to blink
04***your pin>#

Each time you turn your phone OFF it resets the lock, so this need to be done each time you ll turn your phone ON

The phone now says: PIN CODE CHANGED (or ACCEPTED)
and the SIM card is accepted until you restart the phone again.

NOTE: On vesion 5.04 Nokia has removed this option !


update:
There s another Nokia service provider lock generator for DOS (somehere on the net) called 5161un.zip (for Nokia 51xx-61xx models) This program uses the #pw+(master code)+1# code to unlock the phone. With this software you need to have a access to the eeprom.. Sad
---------------------------------------------------------

Bypass the SP-lock

With a Nokia 16xx/21xx/31xx/51xx/81xx that are SIM locked to one privider you can bypass the SP lock like this:

Insert sim card of diferent provider.

Turn on the phone and press the UP VOLUME key for 3 sec. then release it and the phone says PIN CODE ?

Press the "C" key.

Then Press * and wait until it desapear and apear again, then press * one more time and 04*PIN*PIN*PIN#

The phone now says: PIN CODE CHANGED (or ACCEPTED)
and the SIM card is accepted until you restart the phone again.

update:
On version 5.04 Nokia has removed this option !
---------------------------------------------------------

How to open lock 1 and 4?
You will need Winlock software and MBUS cable to do this. Winlock is a Nokia service program that you can use to open lock 1 and 4, really you are closing locks when you do that, but when you write ????? at MCC+MNC and MSIN text box, the phone don t understand it and consider that it s open.

That trick only works for lock 1 and 4, but not for lock 2 and 3. If you did not know your lock type, please read our miscellaneous tips page first. or read at above section in this page.

Install winlock 1.10
Connect your MBUS nokia data cable
Run Winlock
Push Read Phone, if you have Lock 2 or Lock 3 closed you can not open your phone, but you can try change Lock 2.
Select State Close in Lock 1 and Lock 4, fill out MCC+MNC and MSIN text boxes with ??????? and Push Close Locks.
Now you can use any operator card in your phone. If you get any error when you do that do the following steps:
Select State Automatic in Lock 1 and Lock 4 and change type to User in Lock 1 and Lock 4, fill out MCC+MNC and MSIN text boxes with ?????????? and Push Close Locks.
Select State Automatic in Lock 1 and Lock 4 and change type to Factory in Lock 1 and Lock 4, fill out MCC+MNC and MSIN text boxes with ?????????? and Push Close Locks.
If you continue getting errors you must turn off your phone and reset computer and try again.

---------------------------------------------------------

How to open lock 2?

When operators companies close lock2 you can only use the contract or prepaid card for this operator, but you can use another operator company prepaid card if you know what GID1 must write.

Install Winlock
Run Winlock
Configure Winlock. Select menu Winlock->Defaults and change GID byte count to 2.
Push Read Phone, and write down GID1 info that appear in lock 2.
Insert the prepaid card from a different operator company.
We must find out a the GID1 info adecuate for our new prepaid or contract card, take a look at our GID1 list and check if your operator and SIM card type is included, if not try to get a phone that have lock 2 closed and have the SIM card type that you want to use in your phone, and read GID1 info with winlock. You can try to write the most used GID1 codes like 0000,10FF,01FF, or FFFF, etc.
Change Lock 2 Type from User To Factory or from Factory to User.
Push Close Locks
Your phone will be reset every time you push Close Locks, if your card is not acepted the GID1 is not correct, repeat from step 4 until you find the correct GID1.
If you get error you must turn off your phone and reset computer and try again.
If you want your phone accept your original prepaid card write in GID1 the code you read at step 2 and close locks.
Exist a GID1 list?

In addition to the official way to open locks that Nokia service centers use with TDB4 or TDF-4(for WinTesla) security boxes, there is two secrets methods:

Opening the phone and adding a chip inside phone motherboard. But you will loose any warranty of your phone.
Using a special software with a MBUS Nokia cable. I don t have this software. Please don t bother me asking me about that. The only thing i know about that is that a friend is removing lock 2 using a special software. He don t make this for money, only for fun.
--------------------------------------------------------

Main Code #pw+(master code)+Y#
This code is able to check, activate or remove Sim card restriction (SP-lock).

Use the * key to get the p, + and w chars.
Y has to be 1,2,3 or 4 - depending of what lock you what to deal with.

#pw+1234567890+1# for Provider-Lock status
#pw+1234567890+2# for Network-Lock status
#pw+1234567890+3# for Provider(???)-Lock status
#pw+1234567890+4# for SimCard-Lock status

(master code) is a 10 digit code, based on the phones IMEI number.

update:

I get report that told me the code didn t works for Optimus Card
---------------------------------------------------------
Enhanced Full Rate Codec (EFR)
Enhanced Full Rate will give you much better sound quality when you enable it. The new Enhanced Full Rate CODEC adopted by GSM uses the ASELP (AlgebraicCode Excitation Linear Prediction) compression technology. This technology allows for much great voice quality in the same number of bits as the older Full Rate CODEC. The older technology was called LPC-RPE (Linear Prediction Coding with Regular Pulse Excitation). Both operate at 13 kilobits.(but you take up more space on the network, so they can charge you more)

*3370# and EFR will be activated after a reboot of the phone ( consumes more power )

#3370#
and EFR will be switched off after a reboot of the phone.
---------------------------------------------------------

Half Rate Codec (HR)
Half Rate will give you bad sound quality, which gives the service provider the opportunity to have more calls on the network; and you might get a lower charge from them. (Will give you 30% longer talk-time)
*4720# Half Rate coded will be activated after a reboot of the phone ( better standby time )

#4720# Half Rate coded will be de-activated after a reboot of the phone
---------------------------------------------------------

Unblocking Code
Unblock PIN1 : **05*PUK*newPIN1*newPIN1#@
UnBlock PIN2 : **052*PUK2*newPIN2*newPIN2#@
---------------------------------------------------------

Hiding your phone number
Dial 141 then the number you want to call eg. 141#######
This should stop your number been sent to the caller. (*)
(*) This only works on UK phones, if anybody has tried this and works, please let me know.
---------------------------------------------------------

Unlocking PIN2 for software version
V 05.07
20.11.98
NSE-1

If your SimCard is locked by your SP, you can check it and if it is, you will get the "wrong code" message on the display (for use 1234567890)
If your SimCard is locked by your SP, you can t unlock PIN2 !
---------------------------------------------------------

Blocking phone number at Cantel AT&T

If you have one of those cantel at&t phones if you press #0000# you can block your number
at no extra charge.
---------------------------------------------------------

New Menu on Emergency Calls *3001#12345#

Brings a new menu that gives you access to the emergency calls ( 911 Etc. ). It will give you FREE calls! (only the ones you put in the emergency!! )

This option will depend on your GSM operator
---------------------------------------------------------

Your number in your display
Goto menu 3-7 Call cost settings.
Turn ON the Call costs limit 3-7-1. PIN2 code Required.
Put in the limit with the phone number.
eg. my phone # is 019 2184697
Enter the limit as 2184697
Goto menu 3-7-2 Show costs in. PIN2 code Required.
Select Currency.
Enter Unit price : 1
Enter Currency name as 019 (per my phone # eg. above)
Now the phone number 019 2184697 will remains on the 4th row of the display.
Secondly, if you press the # key, it prompt which line to be used; Line 1 or 2.
---------------------------------------------------------
Free Call Tip

The tips needs Net Monitor enabled. Be aware that the trick will remove Netmonitor in some sw versions like v4.73 and v5.04.
Launch the Net Monitor in your Nokia 51xx / 61xx
Execute the test number 497
Free calling for about 90 sec should now have been activated.
---------------------------------------------------------

Nokia 5110 PIN-Out

Pin-Outs: Bottom view, keyboard up, counting from the left

V V 1 2 3 4 5 6 V
(o) | | [= = = = = =] | |
7 8 9 10 11 12

1 - VIN CHARGER INPUT VOLTAGE 8.4V 0.8A
2 - CHRG CTRL CHARGER CONTROL PWM 32Khz
3 - XMIC MIC INPUT 60mV - 1V
4 - SGND SIGNAL GROUND
5 - XEAR EAR OUTPUT 80mV - 1V
6 - MBUS 9600 B/S
7 - FBUS_RX 9.6 - 230.4 KB/S
8 - FBUS_TX 9.6 - 230.4 KB/S
9 - L_GND CHARGER / LOGIC GND

Nokia 61xx
__________

Firmware version
*#0000# or *#61x0#
IMEI Code
* # 06 #
Warranty Codes
*#92702689# (= *#war0anty#)

Just scroll down through the information. If entering the above code requires a
further warranty code try entering the following:

6232 (OK) : Month and year of manufacture
7332 (OK) : Last repair date
7832 (OK) : Purchase date (if previously set)
9268 (OK) : Serial number
37832 (OK) : Set purchase date (this can only be done once)
87267 (OK) : Confirm transfer

Enhanced Full Rate (EFR) and Half Rate Mode (HFR)

*3370# to activate Enhanced Full Rate - Makes calls sound better, but
decreases the battery life by about 5%.(I recommend this one)
#3370# to deactivate Enhanced Full Rate
*4720# to activate Half Rate Mode - Drops call quality, but increases battery
life by about 30%.
#4720# to deactivate Half Rate Mode

Nokia 81xx
_____________

Show IMEI code
* # 06 #
Software Version
* # 8110 #
This code shows you software version, date of manufacture and hardware number of your phone.

Warranty Codes
*#92702689# (= *#war0anty#)

Just scroll down through the information. If entering the above code requires a
further warranty code try entering the following:

6232 (OK) : Month and year of manufacture
7332 (OK) : Last repair date
7832 (OK) : Purchase date (if previously set)
9268 (OK) : Serial number
37832 (OK) : Set purchase date (this can only be done once)
87267 (OK) : Confirm transfer

Sim Clock information

To check if the Sim-Clock can be stopped type: *#746025625# (= *#sim0clock#)

Nokia 8810
____________
Firmware version
*#0000# or *#8810#
IMEI Code
* # 06 #
Warranty Codes
*#92702689# (= *#war0anty#)

Just scroll down through the information. If entering the above code requires a
further warranty code try entering the following:

6232 (OK) : Month and year of manufacture
7332 (OK) : Last repair date
7832 (OK) : Purchase date (if previously set)
9268 (OK) : Serial number
37832 (OK) : Set purchase date (this can only be done once)
87267 (OK) : Confirm transfer

Enhanced Full Rate (EFR) and Half Rate Mode (HFR)

*3370# to activate Enhanced Full Rate - Makes calls sound better, but
decreases the battery life by about 5%.(I recommend this one)
#3370# to deactivate Enhanced Full Rate
*4720# to activate Half Rate Mode - Drops call quality, but increases battery
life by about 30%.
#4720# to deactivate Half Rate Mode



security code FOR ALL MOBILE

NOKIA CODE :
    * To Restore Battery Setting *#7780

    * To Know Manufacture Date *#3283#   &  *#0000#

    * To Stop Sim clock *#746025625#

    * To Stop Operator Logo *#67705646#

    * To Reset Phone Timer *#73#

    * To Warranty *#92702689#

   


 SAMSUNG CODE :

    * To know software version *#9999#

    * To ReBoot Phone #*3849# & #*2562#

    * To On/OFF Phone Time #*2558#

    * To Unlock Phone #*7337#

    * To On/Off GSM facility #*4760#

    * To know about Memory & Data *#9998*246#

    * To know Phone’s Lock status *#7465625#

    * To Serial No. *#0001#

    * To Unlock Code No. *2767*637#

    * To See Free space *#8999*636#

    * Software Version  *#1111#


    * Firmware Version  *#1234#

    * Hardware Version  *#2222#

    * For Call List *#2255#


  LG CODE :

    * Go to Phone’s Test Mode 2945#-*#

    * For Secret Menu  2945*-#01*#

    * To know software version *8375#

    * IMEI No. *#06#

    * To Manage Sim card Lock (For LG7010&LG7020) dial     2945#*70001#

    * To Manage Sim Lock (For LG B1200) dial 1945#*5101#

    * To Manage Sim Lock (For LG B5200 & 510w) dial 2945#*5101#

    * To Manage Sim Lock (For LG 500 & 600) dial 2947#*

    * IMEI and SW (LG 510): *#07#
    * Software version (LG B1200): *8375#
    * Recount cheksum (LG B1200): *6861#
    * Factory test (B1200): #PWR 668
    * Simlock menu (LG 7020, 7010): 2945#*70001#

             

Top Tricks n Cheats



Set Processes Priority


Follow this tip to increase the priority of active processes, this will result in prioritisation of processes using the CPU.

CTRL-SHIFT-ESC


1.Go to the second tab called Processes, right click on one of the active processes, you will see the Set Priority option

2.For example, your Run your CDwriter program , set the priority higher, and guess what, no crashed CD’s

Shutdown Trick !


Imidiate rapid shut down window
while shutting down window. open task manager(Ctr+Alt+Del),
Select shut down tab. and press ' Ctrl ' key while select Turn Off from dis tab.

Count 5 4 3 2 1 Voila!!! U r window will rapidly shut down.


Speed Up Ur Shut down !!


Start Regedit.
Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control.
Click on the "Control" Folder.
Select "WaitToKillServiceTimeout"
Right click on it and select Modify.
Set it a value lower than 2000 (Mine is set to 200)
.

and !


Like previous versions of windows, it takes long time to restart or shutdown windows xp when the "Exit Windows" sound is enabled. to solve this problem you
must disable this useless sound. click start button then go to settings -> control panel -> Sound,Speech and Audio devices -> Sounds and Audio Devices -> Sounds, then under program events and windows menu click on "Exit Windows" sub-menu and highlight it.now from sounds you can select,choose "none" and then click apply and ok. now you can see some improvements when shutting down your system.



**new **

Crazy !!

Hide ur folders.. never known trick !!!!!!!!!! Disguise them to "Recycle Bin"



Rename any folder with extension {645FF040-5081-101B-9F08-00AA002F954E}
eg,
if u've a folder games
press F2,
then type, "games.{645FF040-5081-101B-9F08-00AA002F954E}"
c the magic....
then 2 get to original form,
remove the extension using
"ren games.{645FF040-5081-101B-9F08-00AA002F954E} games" in dos or as a bat file


n u are done..

~cheers~

System information


system up time only for xp professional edition
It boasts how long it can stay up. Whereas previous
versions of Windows were coy about how long they went
between boots, XP is positively proud of its stamina.
Go to the Command Prompt in the Accessories menu from
the All Programs start button option, and then type
'systeminfo'. The computer will produce a lot of
useful info, including the uptime. If you want to keep
these, type 'systeminfo > info.txt'. This creates a
file called info.txt you can look at later with
Notepad. (Professional Edition only).

lock pc just by double clicking mouse


You can lock your XP workstation with two clicks of
the mouse. Create a new shortcut on your desktop using
a right mouse click, and enter 'rundll32.exe
user32.dll,LockWorkStation' in the location field.
Give the shortcut a name you like. That's it -- just
double click on it and your computer will be locked.
And if that's not easy enough, Windows key + L will do
the same.


SPEED UP UR ACROBAT READER (ALMOST LIKE NOTEPAD)



Do u get irritated when acrobat reader takes 5/10 seconds to load when you want to open a pdf document. There is a way to speed up the loading.

1. Go to the installation folder of acrobat reader
(C:\program files\adobe\acrobat\reader\.. whatever)

2. Move all the files and folders from the "plugins" directory to the "Optional" directory. (I repeat.. cut and paste the files NOT copy & paste).

Also make sure that acrobat reader is not open else it will lock the files and not allow you to move the files).

Now your acrobat reader will load very fast
and almost as good as notepad..

Remove Stored username and Passwords !


To remove the Stored User Names and Passwords from your system, try this:
Click Start, Run and type Control keymgr.dll
Remove the entries from the list.

The other ways to access this dialog are:
Type Control Userpasswords2 in RUN box, click Advanced, Manage Passwords
-or-
From Control Panel, select your User Account, click Manage your network passwords

It Works

~ Cheers ~


*


Remove the Username and picture from Windows XP New Start Menu


The User account picture can be removed by turning off the Welcome Screen. Or, by switching to Windows Classic theme. Follow the method described in this article if you want to remove the username and picture from the Start Menu, without disabling the Welcome Screen and Windows XP Theme.

For those who want to remove the user name and user account picture from Start Menu, in order to have a blank blue panel at the top, try this:
Start Windows Explorer and go to this folder:


C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures

From that folder, rename the BMP file which corresponds to your user account.

( For example, if your username is Robert, rename Robert.bmp to old_Robert.bmp )
Next, rename the following folder:

C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\Default Pictures

to something else, say...

C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\No_Default Pictures
To remove the user name, follow these steps

Start regedit.exe and navigate to the this key:

HKEY_CURRENT_USER \ Software \ Microsoft\ Windows \ CurrentVersion \ Policies \ Explorer
In the right-pane, set NoUserNameInStartMenu value-data to 1

Close Regedit.exe and restart Windows.

You'll end up with a blue space at the top of the Start Menu.


To get back the username and the picture, reverse the above procedure.




For the New Start Menu, Windows XP looks for the <username>.bmp file in the folder

C:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures

If the file is not found, it takes a picture from the "Default Pictures" sub-folder. By renaming the <username>.bmp and the "Default Pictures" folder, you're giving no chance for Windows to fetch an image for the Start Menu

~ Cheers ~.

Notepad Trick ! for complete list move to NOTEPAD TRICKS page !!


Well quite old but here is d complete collection

Step 1: Open Notepad
Step 2: Write following line in the notepad.

this app can break
Step 3: Save this file as xxx.txt
Step 4: Close the notepad.
Step 5: Open the file again.

Voilla!!

or

1> Open Notepad
2> Enter four words separated by spaces, wherein the first word has 4 letters, the next two have three letters, and the last word has five letters
3> DON'T hit enter at the end of the line.
4> Save the file.
5> Close Notepad.
6> Reopen Notepad.
7> Open the file you just saved.


or

Open a note pad
type Bush hid the facts
save that file,
close it
again open and see...


NOTEPAD "world trade centre trick".. :Rahul



Did you know that the flight number of the plane that had hit WTC ...on
9/11 was Q33N ....Open your Notepad in ur computer and type the flight
number i.e Q33N... Increase the Font Size to 72, Change the Font to
Wingdings. U will be amazed by the findings
.

log trick !! make ur Notepad a diary !!


Sometimes we want to insert current data and time, whenever we open the file in the notepad. If you are a lazy person like me, who don’t like to press F5 whenever you open a notepad. Then here is a trick to avoid this. Just add a .LOG in the first line of your text file and close it.
Whenever you open the file with that text in the first line in the notepad, it will insert the current date and time at the end of the file. You can start entering your text after that.

WHY?


The reason this happens:

In notepad, any other 4-3-3-5 letter word combo will have the same results.
It is all to do with a limitation in Windows. Text files containing Unicode UTF-16-encoded Unicode are supposed to start with a "Byte-Order Mark" (BOM), which is a two-byte flag that tells a reader how the following UTF-16 data is encoded.

1) You are saving to 8-bit Extended ASCII (Look at the Save As / Encoding format)
2) You are reading from 16-bit UNICODE (You guessed it, look at the Save As / Encoding format)
This is why the 18 8-bit characters are being displayed as 9 (obviously not supported by your codepage) 16-bit UNICODE characters

~ cheers ~

SPEED UP MENU DISPLAY.!!



When using the start menu the you will notice a delay between different tiers of the menu hierarchy. For the fastest computer experience possible I recommend changing this value to zero. This will allow the different tiers to appear instantly.

Start Regedit. If you are unfamiliar with regedit please refer to our FAQ on how to get started.

Navigate to HKEY_CURRENT_USER\Control Panel\Desktop
Select MenuShowDelay from the list on the right.

Right on it and select Modify.
Change the value to 0.
Reboot your computer.



CLICKING * .AVI FILES ON EXPLORER CAUSING 100% CPU USAGE.!!



Well windows seem to have a REALLY big problem when it comes to reading AVI files. It seems that when you click on an AVI file in explorer, it'll try to read the entire AVI file to determine the width,height, etc. of the AVI file (this is displayed in the Properties window). Now the problem with Windows is that if you have a broken/not fully downloaded AVI file that doesnt contain this info, Windows will scan the entire AVI file trying to figure out all these properties which in the process will probably cause 100% CPU usage and heavy memory usage. To solve this problem all you have to do is the following:
1. Open up regedit
2. Goto HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler
3. Delete the "Default" value which should be "{87D62D94-71B3-4b9a-9489-5FE6850DC73E}"
Voila! Please not that this will no longer provide you with the windows properties displaying the AVI file information such as width, height, bitrate etc. But its a small price to pay for saving you resources.
NOTE: Please use caution when using regedit. Improper usage may cause windows to behave imcorrectly. Also, I cannot be held resposible. Backup your registry first.

CD ROM STOPS AUTOPLAYING/AUTORUN.!!



And the AutoPlay Tab has disappeared in My Computer, Devices With Removable Storage, Right Click on CDROM, Properties.
Solution: The service: "Shell Hardware Detection" has been set to Manual or Disabled. Go to Control Panel, Administrative Tools, Services. Return this service to "Automatic
".

How to make your Desktop Icons Transparent


Go to Control Panel > System, > Advanced > Performance area > Settings button Visual Effects tab "Use drop shadows for icon labels on the Desktop"

DISPLAY MESSAGE ON STARTUP.



Start regedit, if you are unfamiliar with regedit please see our FAQ.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Modify the key legalnoticecaption with what you want to name the window.
Modify the key legalnoticetext with what you want the window to say. Restart

AUTO DELETE TEMPORARY FOLDER.!!


ll what i prefer is %temp% " without quotes.. at Start -> Run..
this opens ur temp folder n den u cal erase it neatly// still try dis one too..



First go into gpedit.msc
Next select -> Computer Configuration/Administrative Templates/Windows Components/Terminal Services/Temporary Folder
Then right click "Do Not Delete Temp Folder Upon Exit"
Go to properties and hit disable. Now next time Windows puts a temp file in that folder it will automatically delete it when its done! Note from Forum Admin: Remember, GPEDIT (Group Policy Editor) is only available in XP Pro.

make ur pdf files to speak


make ur pdf files to speak
here r the shortcuts for hearing pdf files in abobe reader 6.0 or higher

ctrl+shift+b ---->to hear the whole topic
ctrl+shift+v ---->to hear the page


Password-Cracking Techniques


Password-Cracking Techniques

Understanding Password-Cracking

Techniques



We get daily tons of requests regarding password cracking,
hereby we present a well researched comprehensive article adressing the same
It may bounce many of ur heads but we are sure a must mug up for Geeks nour regular visitors!!
so Gear Up! Dont give up before having a look on the entire article!






Many hacking attempts start with attempting to crack passwords. Passwords are the key piece of information needed to access a system. Users, when creating passwords, often select passwords
that are prone to being cracked. Many reuse passwords or choose one that’s simple—such
as a pet’s name—to help them remember it. Because of this human factor, most password cracking
is successful; it can be the launching point for escalating privileges, executing applications,
hiding files, and covering tracks. Passwords may be cracked manually or with automated tools
such as a dictionary or brute-force method, each of which are covered later in this chapter.
Manual password cracking involves attempting to log on with different passwords. The
hacker follows these steps:
1.
Find a valid user account (such as Administrator or Guest).
2.
Create a list of possible passwords.
3.
Rank the passwords from high to low probability.
4.
Key in each password.
5.
Try again until a successful password is found.
A hacker can also create a script file that tries each password in a list. This is still considered
manual cracking, but it’s time consuming and not usually effective.

Boring!! isnt it!! A more efficient way of cracking a password is to gain access to the password file on a system.
Most systems



hash
(one-way encrypt) a password for storage on a system. During the
logon process, the password entered by the user is hashed using the same algorithm and then
compared to the hashed passwords stored in the file. A hacker can attempt to gain access to
the hashing algorithm stored on the server instead of trying to guess or otherwise identify the
password. If the hacker is successful, they can decrypt the passwords stored on the server.
Passwords are stored in the Security Accounts Manager (SAM) file on a
Windows system and in a password shadow file on a Linux system.



Understanding the LanManager Hash
Windows 2000 uses NT Lan Manager (NTLM) hashing to secure passwords in transit on the
network. Depending on the password, NTLM hashing can be weak and easy to break. For
example, let’s say that the password is
123456abcdef
. When this password is encrypted with
the NTLM algorithm, it’s first converted to all uppercase:
123456ABCDEF
. The password is
padded with null (blank) characters to make it 14 characters long:
123456ABCDEF__
. Before
the password is encrypted, the 14-character string is split in half:
123456A and BCDEF__.
Each string is individually encrypted, and the results are concatenated:
123456A = 6BF11E04AFAB197F
BCDEF__ = F1E9FFDCC75575B15
The hash is
6BF11E04AFAB197FF1E9FFDCC75575B15


Hacking Tools
Legion automates the password guessing in NetBIOS sessions. Legion scans multiple
IP address ranges for Windows shares and also offers a manual dictionary attack tool.
NTInfoScan is a security scanner for NT 4.0. This vulnerability scanner produces an HTMLbased
report of security issues found on the target system and other information.
L0phtCrack is a password auditing and recovery package distributed by @stake software,
which is now owned by Symantec. It performs Server Message Block (SMB) packet captures
on the local network segment and captures individual login sessions. L0phtCrack contains
dictionary, brute-force, and hybrid attack capabilities.
John the Ripper is a command-line tool designed to crack both Unix and NT passwords. The
cracked passwords are case insensitive and may not represent the real mixed-case password.
KerbCrack consists of two programs: kerbsniff and kerbcrack. The sniffer listens on the network
and captures Windows 2000/XP Kerberos logins. The cracker can be used to find the
passwords from the capture file using a brute force attack or a dictionary attack.

Cracking Windows 2000 Passwords
The SAM file in Windows contains the usernames and hashed passwords. It’s located in the
Windows\system32\config

directory. The file is locked when the operating system is running
so a hacker can’t attempt to copy the file while the machine is booted to Windows.
One option for copying the SAM file is to boot to an alternate operating system such as
DOS or Linux with a boot CD. Alternately, the file can be copied from the
repair
directory.
If a systems administrator uses the RDISK feature of Windows to back up the system, then a
compressed copy of the SAM file called
SAM._
is created in
C:\windows\repair
. To expand
this file, use the following command at the command prompt:
C:\>expand sam._ sam
After the file is uncompressed, a dictionary, hybrid, or brute-force attack can be run against
the SAM file using a tool like L0phtCrack.


Redirecting the SMB Logon to the Attacker
Another way to discover passwords on a network is to redirect the Server Message Block
(SMB) logon to an attacker’s computer so that the passwords are sent to the hacker. In order
to do this, the hacker must sniff the NTLM responses from the authentication server and trick
the victim into attempting Windows authentication with the attacker’s computer. A common
technique is to send the victim an e-mail message with an embedded hyperlink to a fraudulent
Hacking Tools
Win32CreateLocalAdminUser is a program that creates a new user with the username and
password
X
and adds the user to the local administrator’s group. This action is part of the
Metasploit Project and can be launched with the Metasploit framework on Windows.
Offline NT Password Resetter is a method of resetting the password to the administrator’s
account when the system isn’t booted to Windows. The most common method is to boot to
a Linux boot CD and then access the NTFS partition, which is no longer protected, and change
the password.
SMB server. When the hyperlink is clicked, the user unwittingly sends their credentials over
the network.


SMB Redirection
Several automated hacking tools can implement SMB redirection:


SMB Relay MITM Attacks and Countermeasures
An SMB relay MITM attack is when the attacker sets up a fraudulent server with a relay
address. When a victim client connects to the fraudulent server, the MITM server intercepts
the call, hashes the password, and passes the connection to the victim server.
Figure 4.1 illustrates an example of such an attack.


Hacking Tools
SMBRelay is an SMB server that captures usernames and password hashes from incoming
SMB traffic. SMBRelay can also perform man-in-the-middle attacks.
SMBRelay2 is similar to SMBRelay but uses NetBIOS names instead of IP addresses to
capture usernames and passwords.
pwdump2 is a program that extracts the password hashes from a SAM file on a Windows system.
The extracted password hashes can then be run through L0phtCrack to break the passwords.
Samdump is another program to extract NTLM hashed passwords from a SAM file.
C2MYAZZ is a spyware program that makes Windows clients send their passwords as clear
text. It displays usernames and their passwords as users attach to server resources.

SMB relay countermeasures include configuring Windows 2000 to use SMB signing, which
causes it to cryptographically sign each block of SMB communications. These settings are
found under Security Policies/Security Options.



NetBIOS DoS Attacks
A NetBIOS Denial of Service (DoS) attack sends a NetBIOS Name Release message to the NetBIOS
Name Service on a target Windows systems and forces the system to place its name in conflict
so that the name can no longer be used. This essentially blocks the client from participating in the
NetBIOS network and creates a network DoS for that system.


Password-Cracking Countermeasures
The strongest passwords possible should be implemented to protect against password cracking.
Systems should enforce 8–12 character alphanumeric passwords. The length of time the same
password should be used is discussed in the next section.
To protect against cracking of the hashing algorithm for passwords stored on the server,
you must take care to physically isolate and protect the server. The systems administrator can
use the SYSKEY utility in Windows to further protect hashes stored on the server hard disk.
The server logs should also be monitored for brute-force attacks on user accounts.
A systems administrator can implement the following security precautions to decrease the
effectiveness of a brute-force password-cracking attempt:

1.
Never leave a default password.
2.
Never use a password that can be found in a dictionary.


Hacking Tools
SMBGrind increases the speed of L0phtCrack sessions on sniffer dumps by removing duplication
and providing a way to target specific users without having to edit the dump files manually.
The SMBDie tool crashes computers running Windows 2000/XP/NT by sending specially
crafted SMB requests.
NBTdeputy can register a NetBIOS computer name on a network and respond to NetBIOS
over TCP/IP (NetBT) name-query requests. It simplifies the use of SMBRelay. The relay can be
referred to by computer name instead of IP address.


Hacking Tools

NBName can disable entire LANs and prevent machines from rejoining them. Nodes on a Net-
BIOS network infected by the tool think that their names are already in use by other machines.
3.
Never use a password related to the host name, domain name, or anything else that can
be found with whois.
4.
Never use a password related to your hobbies, pets, relatives, or date of birth.
5.
Use a word that has more than 21 characters from a dictionary as a password.
This subject is discussed further in the section “Monitoring Event Viewer Logs.”
In the following sections, we’ll look at two measures you can take to strengthen passwords
and prevent password-cracking.



Password Change Interval
Passwords should expire after a certain amount of time so that users are forced to change
their passwords. If the password interval is set too low, then users will forget their current
passwords; as a result, a systems administrator will have to reset users’ passwords frequently.
On the other hand, if passwords are allowed to be used for too long, then security
may be compromised. The recommended password-change interval is every 30 days. In
addition, it’s recommended that users not be allowed to reuse the last three passwords.
You cannot completely block brute-force password attacks if the hacker
switches the proxy server where the source packet is generated. A systems
administrator can only add security features to decrease the likelihood that
brute-force password attacks will be useful.


Monitoring Event Viewer Logs
Administrators should monitor Event Viewer logs to recognize any intrusion attempts either
before they take place or while they’re occurring. Generally, several failed attempts are logged
in the system logs before a successful intrusion or password attack. The security logs are only
as good as the systems administrators who monitor them.
Tools such as VisualLast aid a network administrator in deciphering and analyzing the
security log files. VisualLast provides greater insight into the NT event logs so the administrator
can assess the activity of the network more accurately and efficiently. The program is
designed to allow network administrators to view and report individual users’ logon and
logoff times; these events may be searched according to time frame, which is invaluable to
security analysts who are looking for intrusion details.
The event log located at
c:\\windows\system32\config\Sec.Event.Evt
contains the
trace of an attacker's brute-force attempts