Monday, December 17, 2007

Schedule Defragment in Windows XP

I found a way to schedule a defragment in Windows

1. Go to Start -> Control Panel -> Scheduled Tasks -> Add Scheduled Task

2. Click "Next" in the Scheduled Task Wizard

3. Browse in C:/Windows/system32 and find defrag.exe, select it and click "Open"

4. Rename the task to your liking, example: Defragment C drive, then select how often you want to defrag, then click "Next"

5. Select the time and days (if you select weekly) then click "Next".

6. Enter a password for the username that is going to run the defrag then click "Next".

7. Click "Open advanced properties for this task when I click Finish" then click "Finish"

8. In the next window under "Run:" add a space then the drive letter to be defragmented then a colon, like this: "C:\WINDOWS\system32\defrag.exe C:"

9. Deselect "Run only if logged in" if you want it to run no matter who is logged in, then click OK.

10. It will ask for the user password again to confirm the changes.

11. To test it out, right-click on your scheduled defragment and click run. A command prompt window should come up with the drive fragment information while the defragment is running. After it is done it will go away, and you're done!

Friday, November 30, 2007

Kill a process while socket programming

netstat -a -b

look for the pid

then use

taskkill /F /PID pid

thats all folks !!!

Monday, November 19, 2007

Forgot Your Password On XP?

If you forgot your password on you windows XP here is a simple solution (Guide #1).

1. Restart you computer

2.When booting, press F8 and select "Safe Mode"

3.After getting to the user menu. Click on a user and this time it will not ask you for a password

4.Go to Start>Run and type CMD .

5.At command prompt type in cd C:WindowsSystem32, (Where C put your system's HD letter,I am assuming C is your System/Windows Drive)

6.For safety purposes first make a backup of your Logon.Scr file.. You can do this by typing in Copy Logon.scr Logon.bak

7.Then type copy CMD.EXE Logon.scr

8.Then type this command, I will assume that you want to set Administrator's password to NewPass

9.Now, type this in net user administrator NewPass

10. You will get a message saying that it was successful, this means Administrator's new password is NewPass

11. Restart the PC and you will login as Administrator (or whatever you chose to reset) with your chosen password

Tuesday, October 23, 2007

hair care

Care For Dry Hair:
Dry hair tends to be thin and rough.It is susceptible to tangles, damage, breakage and split ends.The primary aim is to replenish the oil and the moisture in the hair.

Home-made Cosmetic Care For Dry Hair:
Below are given few natural recipes that are time-tested.

The Gentle Cleanser:
Beat an egg in a cup of the skimmed milk.When the foam becomes consistent, rub it into the scalp.Leave it on for 5 minutes.Rinse the hair thoroughly with water.Carry out this routine twice a week.

The Protein Conditioner:
Beat one tbsp of castor oil, one tbsp of glycerine, one tbsp of cider vinegar and a tsp of mild herbal shampoo.Apply it on scalp and leave it on for 20 minutes.Rinse with clear water.

A Special Massage Oil Toner
Buy a bottle of castor oil or coconut oil.Add a tsp of lavender essential oil in it.Heat a little and massage it gently on your scalp at night.Rinse or shampoo it out in the morning.Follow this routine at least twice a week.

Thursday, October 18, 2007

Vanilla Ice Cream that puzzled General Motors

Vanilla Ice Cream that puzzled General Motors

Many of you, unlike me, might have come across this long ago, as it is in circulation for years now. But I just received it today and was spellbound by the incident. For those who are not aware of it, it goes like this -
Never underestimate your Clients’ Complaint, no matter how funny it might seem!

This is a real story that happened between the customer of General Motors and its Customer-Care Executive. Please read on…..

A complaint was received by the Pontiac Division of General Motors:

‘This is the second time I have written to you, and I don’t blame you for not answering me, because I sounded crazy, but it is a fact that we have a tradition in our family of Ice-Cream for dessert after dinner each night, but the kind of ice cream varies so, every night, after we’ve eaten, the whole family votes on which kind of ice cream we should have and I drive down to the store to get it. It’s also a fact that I recently purchased a new Pontiac and since then my trips to the store have created a problem….

You see, every time I buy a vanilla ice-cream, when I start back from the store my car won’t start. If I get any other kind of ice cream, the car starts just fine. I want you to know I’m serious about this question, no matter how silly it sounds “What is there about a Pontiac that makes it not start when I get vanilla ice cream, and easy to start whenever I get any other kind?” The Pontiac President was understandably skeptical about the letter, but sent an Engineer to check it out anyway.

The latter was surprised to be greeted by a successful, obviously well educated man in a fine neighborhood. He had arranged to meet the man just after dinner time, so the two hopped into the car and drove to the ice cream store. It was vanilla ice cream that night and, sure enough, after they came back to the car, it wouldn’t start.

The Engineer returned for three more nights. The first night, they got chocolate. The car started. The second night, he got strawberry. The car started. The third night he ordered vanilla. The car failed to start.

Now the engineer, being a logical man, refused to believe that this man’s car was allergic to vanilla ice cream. He arranged, therefore, to continue his visits for as long as it took to solve the problem. And toward this end he began to take notes: He jotted down all sorts of data: time of day, type of gas uses, time to drive back and forth etc.

In a short time, he had a clue: the man took less time to buy vanilla than any other flavor. Why? The answer was in the layout of the store. Vanilla, being the most popular flavor, was in a separate case at the front of the store for quick pickup. All the other flavors were kept in the back of the store at a different counter where it took considerably longer to check out the flavor.

Now, the question for the Engineer was why the car wouldn’t start when it took less time. Eureka - Time was now the problem - not the vanilla ice cream!!!! The engineer quickly came up with the answer: “vapor lock”.

It was happening every night; but the extra time taken to get the other flavors allowed the engine to cool down sufficiently to start. When the man got vanilla, the engine was still too hot for the vapor lock to dissipate.

Even crazy looking problems are sometimes real and all problems seem to be simple only when we find the solution, with cool thinking.

Tuesday, October 16, 2007

Weird Illinois Laws

Weird Illinois Laws

  • You may be arrested for vagrancy if you do not have at least one dollar bill on your person.

  • You must contact the police before entering the city in an automobile.

  • The English language is not to be spoken.

  • In Carbondale - No one may stand on the sidewalk on the 500 block of Illinois Ave.

  • In Champaign - One may not pee in his neighbor's mouth.

  • In Chicago - All businesses entering into contracts with the city must sift through their records and report any business they had dealing with slaves during the era of slavery.

  • In Chicago - Law forbids eating in a place that is on fire.

  • In Chicago - It is illegal to give a dog whiskey.

  • In Chicago - It is forbidden to fish while sitting on a giraffe's neck.

  • In Chicago - Kites may not be flown within the city limits.

  • In Chicago - In the Pullman area, it is illegal to drink beer out of a bucket while sitting on the curb.

  • In Chicago - It is legal to protest naked in front of city hall as long as you are under seventeen years of age and have legal permits.

  • In Chicago, people who are diseased, maimed, mutilated, or deformed to the point of being an unsightly or disguting object are banned from going out in public.

  • In Chicago, it is illegal to fish in pajamas.

  • In Chicago, it is illegal to take a French poodle to the opera.

  • In Cicero - Humming on public streets is prohibited on Sundays.

  • In Crete - It is considered an offense to attempt to have sex with one's dog.

  • In Crete - Cars may not be driven through the town.

  • In Crystal Lake - If one wishes to plant new sod in his or her yard in the summer months, that person may not use the city's water to water it.

  • In Des Plaines - Wheelbarrows with For-Sale signs may not be chained to trees.

  • In Evanston - Bowling is forbidden.

  • In Evanston - It is unlawful to change clothes in an automobile with the curtains drawn, except in case of fire.

  • In Galesburg - No person may keep a smelly dog.

  • In Galesburg - It is illegal to burn bird feathers.

  • In Galesburg - Jostling others is illegal.

  • In Galesburg - No bicyclist may practice "fancy riding" on any city street.

  • In Galesburg - There is a $1,000 dollar fine for beating rats with baseball bats.

  • In Guernee, it is illegal for women weighing more than 200 pounds to ride horses in shorts.

  • In Horner - It is against the law to use a slingshot unless your are a law enforcement officer.

  • In Joliet - Town fathers, reflecting the pet peeve of hearing their town's name mispronounced 'Jolly-ETTE' when all local folk know it's pronounced 'Joe-lee-ETTE', made pronouncing it Jolly-ette a misdemeanor, punishable by a $5 fine.

  • In Kenilworth - A rooster must step back three hundred feet from any residence if he wishes to crow.

  • In Kirkland - Bees are not allowed to fly over the village or through any of Kriland's streets.

  • In Moline - Ice skating at the Riverside pond during the months of June and August is prohibited.

  • In Moline - There is a ban on unnecessary repetitive driving on 23rd Avenue.

  • In Morton Grove - You may not own a handgun.

  • In Normal - It is against the law to make faces at dogs.

  • In Orland Park - No pool tables are allowed in a public establishment, because it supports gambling.

  • In Ottowa - Spitting on the sidewalk is a criminal offense.

  • In Park Ridge - Trucks may only park inside closed garages.

  • In Peoria - Basketball hoops may not be instaled on a driveway.

  • In Zion - It is illegal for anyone to give lighted cigars to dogs, cats, or any other domesticated animals.

Confusing co workers...Pulling pranks...

Are you the only guy in your office with some computer skills? Do you have a co worker who spends their whole day on Myspace, Youtube or hello kitty fan club sites? If you can follow these simple steps they wont be getting any where near those sites for some time.

If you are using windows pc there is a thing called a host file. If you are a web developer or designer, chances are you are very familiar with this file. I typically use it to test new websites by giving my computer an address to associate with the website I am working on. Now that might sound difficult and confusing to people who have never used one but it is really easy.

So here is what you do. For this example we will make it so every time I go to yahoo.com what will actually pop is google.com. If you are doing this to a friend or co-worker I’m sure you can think of something far more funny.

Step one: Find your host file

Go to the start button on the bottom right click and then select Run

run.jpg

After click run depending on what version of windows you are using you will enter one of the following (will will assume you are using Xp professional)

Windows 95/98/Me c:\windows\hosts

Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts

Windows XP Home c:\windows\system32\drivers\etc\hosts

hostrun.jpg

Now hit ok.

Step 2: Editing your host file

A new window should now be open with some files inside. Select the host file by right clicking and hitting edit. I use edit plus for this but note pad will do just fine.

edit.jpg

Now this file might look a little confusing but really its very simple. On the very top it reads something like this

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.

what this is saying is that for every website you list you must list the IP address with it. In order for me to make yahoo become Google I first need to find out Google’s Ip.

So go back to the run menu, by clicking start the run.

This time just type cmd and click ok

cmd.jpg

Once you see a black and white screen you are going to go ahead and type the word ping with one space and the name of the website you want.

ping.jpg

What this does is gives you the ip associated with google.com. The IP I received was 64.233.187.99

Now write down the IP and head back to your host file. (you are almost done)

At the bottom of the host file you will typing in the following.

64.233.187.99 Yahoo.com

What this did was associate Google’s IP with yahoo’s name. To turn this off simply add a pound (#) before the IP.

Click save and you will be done. Close out all web browsers and re-open.

Now type in Yahoo.com, Google should pop up like this.

googleyahoo.jpg

Tadaaaaaa ! You can now confuse the crap out of you co-workers. The key to this hack is gaining access to their PC. I recommend having all the info ready before you start the prank, unless you have a lot of time.

Lastly you can do this for multiple sites at once. It can be very frustrating to whom ever you do it too.

Wednesday, October 3, 2007

Creating subheader in gridview


<asp:gridview id="GridView1" class="attr"> runat="server" autogeneratecolumns= class="attrv">"false" datasourceid="SqlDataSource1"
onrowdatabound="GridView1_RowDataBound">
<columns>
<asp:boundfield datafield= class="attrv">"ProductID" headertext="ProductID" />
<asp:boundfield datafield= class="attrv">"Name" headertext="Name" />
<asp:boundfield datafield= class="attrv">"Subcategory" headertext="Subcategory" />
</columns>
</asp:gridview>
<asp:sqldatasource id= class="attrv">"SqlDataSource1" runat="server" class="attr"> connectionstring="<%$
ConnectionStrings:AdventureWorksConnectionString %>"

selectcommand="SELECT P.*, PS.[Name]
AS [Subcategory] FROM [Production].[Product] AS P INNER JOIN [Production].[ProductSubcategory]
AS PS ON PS.[ProductSubcategoryID] = P.[ProductSubcategoryID] ORDER BY P.[ReorderPoint],
P.[Name]"
>
</asp:sqldatasource>


CODE-BEHIND 



private string m_subcategory = String.Empty;

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow gvr = e.Row;

switch (gvr.RowType)
{
case DataControlRowType.DataRow:
{
DataRowView drv = gvr.DataItem as DataRowView;

string subcategory = drv["subcategory"].ToString();

if (!subcategory.Equals(m_subcategory))
{
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Normal);
TableCell cell = new TableCell();
cell.BackColor = Color.Red;
cell.ForeColor = Color.White;
cell.ColumnSpan = GridView1.Columns.Count;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = subcategory;
row.Cells.Add(cell);

GridView1.Controls[0].Controls.AddAt(GridView1.Controls[0].Controls.Count - 1, row);

m_subcategory = subcategory;
}


break;
}
}
}

Filterkeys must die

It constantly amazes me the crap that gets turned on by default in Windows XP. Have you ever held down the Right Shift key for more than 8 seconds while thinking about something? That’s the default keyboard shortcut for FilterKeys. FilterKeys is an accessibility option that ignores keyboard input unless it the key is held down for a long time.

filterkeys

It isn’t annoying enough that a dialog box pops up and interrupts you if you hold shift down for too long. It has a bug. If you hit Cancel, FilterKeys *still* runs.

Pressing both shift keys is supposed to exit from it, but I prefer a more permanent approach. Death to FilterKeys.

Control Panel >> Accessibility Options >> Remove all check-marks

filterkeys

filterkeys
But wait, there’s more! That isn’t enough to get rid of FilterKeys, you also have to go to the Settings sub-menu and remove the check-marks there.

filterkeys
Hit OK twice and you’re finally rid of the damned thing.


Wednesday, September 26, 2007

nadi boli samandar sey

Nadi boli samandar sey
mai tere paas aayi hoon
mujhey bhi gaa mere shayar
mai teri hi rubaii hoon

pahan kar chand ki nathni
sitaaron sey bhara aanchal
naye jal ki nayi boondey
nayi choodi nai paayal
pahan aayi mai har gahna
hai tere sang hi rahna
lahar ki chudiya pahna
mai paani kia kalayi hoon
nadi boli samandar sey

Mujhey kartavya ney roka
mujhey adhikaar ney roka
mujhey har shaks ney roka
mujhey har pyar ney roka
magar mai ruk nahi paayi
mai tere sang chali aayi
mujhey tu aankh mai bhar ley
mai aansoo ki vidai hoon
nadi boli samandar sey

Friday, September 21, 2007

Deploying JSP on IIS

Configuring JSP for IIS

Many people love the ease and security of using Internet Information Services 6 server on Windows 2003. Adding PHP and ASP support is a cinch, and in no time at all, IIS 6 can serve anything you throw at it – except JSP files of course. By no stretch of imagination is getting JSP running invisibly with IIS 6 an easy job, and here’s the best way to do it.

In this guide, we’ll be using IIS 6 on Windows Server 2003 with SP1 installed, together with the Tomcat servlet engine (version 5.5.17 stable) to parse the JSP files that IIS may encounter. It covers all the prerequisites and how to get them up and running.

This guide assumes you already have II6 6.0 configured and running 100% with everything all right and trouble-free, and assumes Tomcat (and it’s prerequisites) isn’t already installed. Here goes..

Install JVM

Tomcat is a Java servlet, and requires the presence of Sun’s JDK to run. You can grab the Java EE 5 JDK off of Sun’s servers. Start the installer, make sure the J2EE Development Kit is selected if you’re doing a custom install, and let it finish.

If you installed it using the default settings, it should have installed the JDK files to “C:\Program Files\Java\jdk1.5.0_06” or something close to it, depending on the version you installed. Make sure you also let it install the JRE, you’re going to need it later. Write down or otherwise memorize the JDK location you used, it’s important.

Download and Install Tomcat

Grab Tomcat 5.5.x from the Apache Software Foundation’s website here. Download the latest entry under Binary Distributions -> Core. For quickest deployment, make sure to download the .exe file rather than the zip package. Run the exe, select “Full Install” and let it save to the default location (C:\Program Files\Apache Software Foundation\Tomcat 5.5), herein referred to as $CATALINA_HOME. It will ask for the JRE/JDK location, you will need to input the value you copied down earlier and continue.

When the setup finishes, start the service and continue. To test if it installed OK, direct your browser to http://localhost:8080/, assuming everything has gone well (no reason it shouldn’t), you should get the stock Tomcat welcome page – now that Tomcat is up and running all what’s left is to make it play nice with IIS..

IIS Configuration

The Jakarta/Tomcat project has lent itself to the creation of an excellent set of plugins and dlls: the Tomcat Connectors. The one we’re looking for hooks straight into IIS and is called ‘isapi_redirect*.dll’ where the ‘*’ is the version number. Head over to the Tomcat distribution site and grab the latest version of isapi_redirect.dll.

Once you have isapi_redirect*.dll, copy it to $CATALINA_HOME/bin/isapi_redirect.dll. Download isapi_redirect.properties to that same directory. You may need to tweak this file (in WordPad) if you installed Tomcat to a non-standard directory.

Download workers.properties and uriworkermap.properties and copy them to the $CATALINA_HOME/conf directory.

Open the IIS management MMC, and right-click the default website -> Properties -> ISAPI Filters. From there proceed to add a filter called ‘isapi_redirect’ that points to $CATALINA_HOME/bin/isapi_redirect.dll. Apply changes and close the dialog.

Right-click the default website again, and this time add a “Virtual Directory” called ‘jakarta’ (without the quotes!) that points to $CATALINA_HOME/bin/ (the same place as isapi_redirect.dll). Give it ‘execute’ privileges when prompted. You need to set permissions on the the files we’ve just modified/created in order for the filter to work.

Next you need to tell IIS that these files are a-OK, and that it’s safe to run them. In the IIS management center again, click “Web Service Extensions” -> “Add a new Web service extension..” For ‘extension name’ enter “JSP” and for the executable file, locate $CATALINA_HOME/bin/isapi_redirect.dll, check “set this extension to allowed”, and then press OK.

Time to restart IIS. Stop it and start it again or just use the quick restart manager. To test Tomcat’s integration with IIS, point your browser to http://localhost/jsp-examples/ and if everything went all right… you’re done!

Configuring the Redirects

Remember the file you downloaded? “uriworkermap.properties?” That’s where you have to define the subdirectories in $CATALINA_HOME/webapps directory. For example, the file you downloaded had the “jsp-examples” context already defined./jsp-examples/*=neosmart tells it to transfer any calls to localhost/jsp-examples to a Tomcat configuration that you downloaded earlier called ‘neosmart.’

Adding more contexts is easy — once you’ve successfully configured Tomcat to run whatever webapp/jar file you want it to, (and that application is now successfully running on port 8080), simply add an entry /mycontext/*=neosmart where ‘mycontext’ is obviously the name of the webapp (the subfolder) you’re trying to configure.

But in order to get it to completely act as a natural directory within IIS, you have to add another virtual directory. You can point it wherever you like, but you must have a virtual directory named the same thing as the context (for instance, if you have http://localhost:8080/jspBB/ you would create a virtual directory called jspBB in IIS). That’s to ensure that calls to http://localhost/jspBB work just as well as http://localhost/jspBB/ (note the end-backslash).

That’s it, you’re done! You know have a port-free address that redirects all calls invisibly and silently to Tomcat, the power, advanced features, and security of IIS with the added flexibility of Java Server Pages!

It’s Still not Working?

If it seems it’s still not working, i.e. you can view the pages via TomCat (by entering the port in the URL) but not by using IIS, try this:

The files you download are text files (obviously) with certain configuration bits in them. Open each one and check some of the values. Many contain paths to TomCat and the JDK: make sure the same paths that are in the file are the same as your configuration. Ensure that all of the paths work, there are no typos, and that all the files are present and in the right directory. If it still doesn’t work, http://neosmart.net/forums/ is the place to go. No support requests in the blog please!

Thursday, September 13, 2007

kuchh bhi nahi

dosti key naam par aisa bhi yahan khel hua
zamane ko kahi meri daastan, mujhsey kaha kuch bhi nahi

dekha mujhey, socha mujhey, tOka mujhey, roka mujhey
meri khataa hai har meri adaa, teri khaata kuch bhi nahi

khud ki jalan sey hi khud ka chaman jala liya
jab aag par kaaGaz rakhaa baaki bachaa kuchh bhi nahi

har shaam tak har subah tak hame hi woh samjhaate rahe
hame diye itne vachan, khud ney kiya kuch bhi nahi


dosaron ki kabra khodne ka shauk raha hai tumhe bohot
ab khud hi jo jaa gire, kya hal raha kuchh bhi nahi

do chaar din ki baat nahi jo chahera dekh kat jaayengey
dil ki baazi jab lagi, tumko mila kuchh bhi nahi

Chunnu chuha

चुन्नू चूहा और चुन्नी चुहिया
जब चले साथ और साथ
इसकी बातें उसकी बातें
हर उत्तर था उनके पास

सोचते के सब है जानते
इसे उसे सबको समझाते
बिन कारन बिन सोचे जाने
बात की बात बनाते

रास्ता था लंबा
नही चला देर तक खेल
हुई ज़रा सी जो बारिश
टूट गया दोनों का मेल

Mainey kaha tha na

मैने कहा था ना

जब चलोगे साथ ऐसे लोगों के
तुम गिरोगे, मैने कहा था ना
आगे चाहे अभी कितना चले जाओ
पल में तुम रुकोगे मैने कहा था ना

जानते थे शायद तुम मुझसे ज्यादा
मुझसे ज़्यादा समझते भी थे कभी
तुमने कही थी मुझसे लाख बातें
पर एक दिन तुम मेरी सुनोगे मैने कहा था ना

ना शिकवा ना गिला ना शिकायत ना ताना
बस था मुझे आज तुम्हे यह बताना
रहोगे जिसके साथ तुम हर वक्त
तुम भी वैसे ही लगोगे मैने कहा था ना

Thursday, August 9, 2007

meri kavita

raat karwat na ley toh kya karegi chandani
koi aahe bhare toh kya karegi chandani

chand toh taaron key saath mashroof hoga
koi dekh kar na dekhe toh kya karegi chandani

jitni khawaahishey thi zindagi sey dab gayi
dil gar ab shikwa kare toh kya karegi chandani

Thursday, August 2, 2007

Thursday, July 26, 2007

Hai Sharmaon

Ah what the hell..another cool commercial

Best Firefox ad ever

IIS 5.1 XP cannot load asp pages

I have Windows XP Pro, SP2 installed and I cannot view my asp pages. I read all the posts in this forum, done every possible way that I could to solve this problem, but nothing seems to work.

I always get the same message:

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------------------------------------------------------------
Please try the following:
Open the localhost home page, and then look for links to the information you want.
Click the Refresh button, or try again later.
Click Search to look for information on the Internet.
You can also see a list of related sites.


HTTP 500 - Internal server error
Internet Explorer


I had a problem at hand and lost 15 – 20 hours solving it!

The problem might be in 2 places:



1 – It is possible that IIs was not installed correctly. I uninstalled and reinstalled, but I still got the same problem. (Others with a similar problem solved it that way).



2 – Check if the Distributed Transaction Coordinator is configured to use remote host to coordinate transactions, if it is the case, it is likely that remote host cannot be contacted.

2b – Change that stupid setting to LOCAL, not remote host.



3 - Restart



You can configure MSDTC to use local coordinator by clicking MSDTC toolbar button in Component Services MMC snap-in (in administrative tools). Since further execution is impossible at this time, server process has been terminated.



It is possible that when you try to expand the My computer node it pops up with An Error occurred while processing the last operation Error code 8004E00F - COM+ was unable to talk to the Microsoft Distributed Transaction Coordinator



This worked for me:

cd %systemroot%\system32
msdtc -uninstall
msdtc -install



If this does not work try performing the steps in "Microsoft Knowledge Base Article - 315296" to clean 'Clean Up a Damaged COM+ Catalog' (http://support.microsoft.com/default.aspx?scid=kb;en-us;315296) and then do the step above again. I don't think 315296 actually helped fix the problem; but I can't say for sure since I did do 315296 before doing the steps above. Therefore, try just the steps above first. If you do perform 315296, the following may apply: If "IIS In-Process Applications" and "IIS Out-Of-Process Pooled Applications" do not appear in the "COM+ Applications" folder of the Component Manager:


cd %systemroot%\system32\inetsrv
rundll32 wamreg.dll, CreateIISPackage


Finally, go to your browser and try:
http://localhost

you should get the IIs start-up page.

Do not forget to configure MSDTC to use local coordinator!

Good luck!

Tuesday, July 24, 2007

404 page not found/

HTTP/1.0 Room 404 Object Not Found

The history of 404

Before the beginning of time, when the Internet was still very much
under the spell of bare Unix shells and Gopher, before SLIP or PPP
became widely used, an ambitious group of young scientists at CERN
(Switzerland) started working on what was to become the media
revolution of the nineties: the World Wide Web, later to be known as
WWW, or simply 'the Web'. Their aim: to create a database
infrastructure that offered open access to data in various formats:
multi-media. The ultimate goal was clearly to create a protocol that
would combine text and pictures and present it as one document, and
allow linking to other such documents: hypertext.

Because these bright young minds were reluctant to reveal their
progress (and setbacks) to the world, they started developing their
protocol in a closed environment: CERN's internal network. Many hours
were spend on what later became the world-wide standard for multimedia
documents. Using the physical lay-out of CERN's network and buildings
as a metaphor for the 'real world' they situated different functions of
the protocol in different offices within CERN.

In an office on the fourth floor (room 404), they placed the World Wide
Web's central database: any request for a file was routed to that
office, where two or three people would manually locate the requested
files and transfer them, over the network, to the person who made that
request.

When the database started to grow, and the people at CERN realised that
they were able to retrieve documents other than their own
research-papers, not only the number of requests grew, but also the
number of requests that could not be fulfilled, usually because the
person who requested a file typed in the wrong name for that file. Soon
these faulty requests were answered with a standard message: 'Room 404:
file not found'.

Later, when these processes were automated and people could directly
query the database, the messageID's for error messages remained linked
to the physical location the process took place: '404: file not
found'.

The room numbers remained in the error codes in the official release of
HTTP (Hyper Text Transfer Protocol) when the Web left CERN to conquer
the world, and are still displayed when a browser makes a faulty
request to a Web server. In memory of the heroic boys and girls that
worked deep into the night for all those months, in those small and hot
offices at CERN, Room 404 is preserved as a 'place on the Web'. None of
the other rooms are still used for the Web. Room 404 is the only and
true monument to the beginning of the Web, a tribute to a place in the
past, where the future was shaped.

Friday, July 20, 2007

10 mins of day

We take our internet usage for granted for the most part. I read a post on security monkey about a guy getting only 10 mins a day for internet usage...

What if YOU only had ten minutes of slow internet usage a day? What would you do and/or not do?

Here's my list:
  1. Use only 1 email account. Check only the emails which clearly state their purpose in the subject box
  2. Stop buying crap from ebay
  3. Stop using the IM
  4. Stop reading the news...Atleast use RSS feeds which filter out images
  5. Compose my blogs beforehand
  6. Compose my emails beforehand
  7. Stop stumbling every hour
  8. Start saving the offline copies of my references
  9. Install local copy of MSDN
  10. Get local copies of a lot of drivers
What would you do if you have only 10 mins of net every day ?

What's your list? Post 'em.

Chief

numly esn

Some more possible harry potter endings !!!

Harry Potter leaked and available on P2P services - 10 spoilers we'd like to be true

Well, there's discontent on the Internet, because the final installment of Harry Potter has been leaked. Although lawyers have quickly ensured the page has been taken down, it hasn't stopped some quick witted people copying it down and making it available on P2P services. Now, we haven't read the document, but here's the spoilers we'd *like* to see:

1. Harry wakes up in the shower, only to find that it was all a dream, and he's just a teenager living in Kingston.

2. Hermione realises Harry is a bit of a loser, and she's actually much keener on girls. She starts a meaningful relationship with Luna Lovegood.

3. Harry pushes Ron Weasley into the fiery pit of Mordor, before swordfighting Captain Jack Sparrow and turning Spiderman into a frog. All on the island from Lost.

4. Snape discovers shampoo, and decides that being evil isn't totally for him. Clean hair gives him a new perspective and he reverts to good.

5. Ron tries out life as a brunette. The universe collapses.

6. Harry decides to take up life as an actor, giving up all this saving the world. First part? Getting naked and pretending to be in love with horses.

7. Lord Voldemort engages in a to-the-death battle with Harry, only to find out that the battery has run out in his wand. Game over.

8. Harry wins against evil, and goes on to become a world class Quidditch player. He marries a Spice Girl and moves to LA.

9. Harry decides to run for London Mayor. He's got that terribly British awkward bumbling down to a fine art.

10. The last page reading "To be continued...

Tuesday, July 17, 2007

Funny Colbert report

117 RUn commands in Windows

117 Run Commands In Windows Xp

Run command is very useful, but sometimes it is forgotten. Use it sometimes and you will find how powerful is run command.




Accessibility Controls - access.cpl

Accessibility Wizard - accwiz

Add Hardware Wizard - hdwwiz.cpl

Add/Remove Programs - appwiz.cpl

Administrative Tools - control admintools

Automatic Updates - wuaucpl.cpl

Bluetooth Transfer Wizard - fsquirt

Calculator - calc

Certificate Manager - certmgr.msc

Character Map - charmap

Check Disk Utility - chkdsk

Clipboard Viewer - clipbrd

Command Prompt - cmd

Component Services - dcomcnfg

Computer Management - compmgmt.msc

Control Panel - control

Date and Time Properties - timedate.cpl

DDE Shares - ddeshare

Device Manager - devmgmt.msc

Direct X Troubleshooter - dxdiag

Disk Cleanup Utility - cleanmgr

Disk Defragment - dfrg.msc

Disk Management - diskmgmt.msc

Disk Partition Manager - diskpart

Display Properties - control desktop

Display Properties - desk.cpl

Dr. Watson System Troubleshooting Utility - drwtsn32

Driver Verifier Utility - verifier

Event Viewer - eventvwr.msc

Files and Settings Transfer Tool - migwiz

File Signature Verification Tool - sigverif

Findfast - findfast.cpl

Firefox - firefox

Folders Properties - control folders

Fonts - control fonts

Fonts Folder - fonts

Free Cell Card Game - freecell

Game Controllers - joy.cpl

Group Policy Editor (for xp professional) - gpedit.msc

Hearts Card Game - mshearts

Help and Support - helpctr

HyperTerminal - hypertrm

Iexpress Wizard - iexpress

Indexing Service - ciadv.msc

Internet Connection Wizard - icwconn1

Internet Explorer - iexplore

Internet Properties - inetcpl.cpl

Keyboard Properties - control keyboard

Local Security Settings - secpol.msc

Local Users and Groups - lusrmgr.msc

Logs You Out Of Windows - logoff

Malicious Software Removal Tool - mrt

Microsoft Chat - winchat

Microsoft Movie Maker - moviemk

Microsoft Paint - mspaint

Microsoft Syncronization Tool - mobsync

Minesweeper Game - winmine

Mouse Properties - control mouse

Mouse Properties - main.cpl

Netmeeting - conf

Network Connections - control netconnections

Network Connections - ncpa.cpl

Network Setup Wizard - netsetup.cpl

Notepad notepad

Object Packager - packager

ODBC Data Source Administrator - odbccp32.cpl

On Screen Keyboard - osk

Outlook Express - msimn

Paint - pbrush

Password Properties - password.cpl

Performance Monitor - perfmon.msc

Performance Monitor - perfmon

Phone and Modem Options - telephon.cpl

Phone Dialer - dialer

Pinball Game - pinball

Power Configuration - powercfg.cpl

Printers and Faxes - control printers

Printers Folder - printers

Regional Settings - intl.cpl

Registry Editor - regedit

Registry Editor - regedit32

Remote Access Phonebook - rasphone

Remote Desktop - mstsc

Removable Storage - ntmsmgr.msc

Removable Storage Operator Requests - ntmsoprq.msc

Resultant Set of Policy (for xp professional) - rsop.msc

Scanners and Cameras - sticpl.cpl

Scheduled Tasks - control schedtasks

Security Center - wscui.cpl

Services - services.msc

Shared Folders - fsmgmt.msc

Shuts Down Windows - shutdown

Sounds and Audio - mmsys.cpl

Spider Solitare Card Game - spider

SQL Client Configuration - cliconfg

System Configuration Editor - sysedit

System Configuration Utility - msconfig

System Information - msinfo32

System Properties - sysdm.cpl

Task Manager - taskmgr

TCP Tester - tcptest

Telnet Client - telnet

User Account Management - nusrmgr.cpl

Utility Manager - utilman

Windows Address Book - wab

Windows Address Book Import Utility - wabmig

Windows Explorer - explorer

Windows Firewall - firewall.cpl

Windows Magnifier - magnify

Windows Management Infrastructure - wmimgmt.msc

Windows Media Player - wmplayer

Windows Messenger - msmsgs

Windows System Security Tool - syskey

Windows Update Launches - wupdmgr

Windows Version - winver

Windows XP Tour Wizard - tourstart

Wordpad - write

Harry potter ...the unlikely endings

Everyone is impatiently waiting for the harry potter books and so, i thought may be we should discuss some unlikely endings for the book...

There is no spoils here...and all these are just figments of imaginations

7. Voldemort finally reveals the truth to Harry, "Dumbledore told you I killed your father. He lied! I, Voldemort, am your father!" Hermione later turns out to be Harry's long lost twin sister. (so star wars like)

6. Harry retrieves the final five Hoarcruxes, only to enter into an amicable agreement with Voldemort aided by lalu prasad yaadav jee mediating the discussions whereby they postpone their showdown for seven more books. (hehahahahahahaha, long live lalujee)

5. Dumbledore returns, cloaked in robes of white with white shoes on, at which point Jitendra sues dumbledore and intervenes and the rest of the book is withheld by a court ordered injunction.

4. After learning the truth of the prophecy as told to Harry by Dumbledore, Neville Longbottom decides to take matters into his own hands. He neatly finishes off Voldemort in one book, then seriously fucks up Harry for stealing the seven book franchise that should have been his to begin with.

3. After waiting a decade for conclusion of the saga of the Boy Who Lived, millions of fans around world wait in line the night before the release of Harry Potter and the Deathly Hallows only to receive a notice that the final book will not be made available to the public until J.K. Rowlings is made the new reigning monarch of England. The British parliament has a good laugh ... until the fighting breaks out.

2. Harry Potter does indeed die, and, as in all hindi movies, the evil woman did it. That's right. Mrs. Weasley finally shows her true colors, exactly lalita pawar style...key mere bete sey tera beta smart kaisey!!!!

1. In a satellite-broadcast world event, J.K. Rowlings appears before her millions of fans on the night before the announced release of "Harry Potter and the Deathly Hallows", holds her hand-written manuscript aloft, and in one supreme demonstration of the disdain she holds for all of her readers, casts the manuscript into a great cauldron of fire, declaring, "Now, you'll NEVER know how it ends, you little bastards!"

Hindu Chaplin, US Senate and hacklers



For the first time ever, the US senate opened with a non-Christian prayer and the effect was tremendous....

Though there were a few disruptors, all from the visitors galleries, all in all, this step was a big step.

Rajan Zed is reportedly the first Hindu to deliver opening prayers in an American state legislature, having done so in both the Nevada State Assembly and Nevada State Senate earlier this year. He has stated that Thursday's prayer will be "universal in approach," despite being drawn from Hindu religious texts.


Quoting the news report -
"Barry Lynn, executive director of religious watchdog group Americans United for Separation of Church and State, said the protest showed the intolerance of the "religious right."

"I don't think the Senate should open with prayers, but if it's going to happen, the invocations ought to reflect the diversity of the American people," Lynn said in a statement.

Senate Majority Leader Harry Reid had invited Zed.

"I think it speaks well of our country that someone representing the faith of about a billion people comes here and can speak in communication with our heavenly father regarding peace," he said after the disruption."

Thursday, July 12, 2007

5 htaccess Tricks Every Webmaster Should Know

5 htaccess Tricks Every Webmaster Should Know

If you’re new to htaccess, here’s a quick introduction. Otherwise, here are 5 sets of htaccess directives every webmaster should know:

1 - Redirect Visitors While You Update Your Site

Update and test your site while visitors are redirected to the page of your choice:

order deny,allow
deny from all
allow from 123.123.123.123

ErrorDocument 403 /page.html


allow from all


Replace 123.123.123.123 with your IP address. Also replace page.html with the name of the page you want visitors to see.

2 - Display a Custom 404 Error Page

Your server displays a “404 File Not Found” error page whenever a visitor tries to access a page on your site that doesn’t exist.

You can replace the server’s default error page with one of your own that explains the error in plain language and links visitors to your home page. Here’s how to use your own page:

ErrorDocument 404 /404.html

Replace 404.html with the name of the page you want visitors to see.

3 - Handle Moved or Renamed Pages

You’ve moved or renamed a page on your site and you want visitors automatically sent to the new page when they try to access the old one. Use a 301 redirect:

Redirect 301 /old.html http://yoursite.com/new.html

Using a 301 redirect also ensures the page doesn’t lose its search engine ranking.

4 - Prevent Directory Browsing

When there’s no index page in a directory, visitors can look and see what’s inside. Some servers are configured to prevent directory browsing like this. If yours isn’t, here’s how to set it up:

Options All -Indexes

5 - Create User Friendly URLs

Which of the two URLs below looks friendlier?

http://yoursite.com/about
http://yoursite.com/pages/about.html

When it comes to URLs, as long as the meaning is clear, shorter is always better.

With htaccess and an Apache module called mod_rewrite, you can set up URLs however you want. Your server can show the contents of “/pages/about.html” whenever anyone visits “http://yoursite.com/about”. Here are a few examples:

RewriteEngine on
RewriteRule ^about/$ /pages/about.html [L]
RewriteRule ^features/$ /features.php [L]
RewriteRule ^buy/$ /buy.html [L]
RewriteRule ^contact/$ /pages/contact.htm [L]

Wednesday, July 11, 2007

25 years of smiley

What started as a joke on the Carnegie-Mellon University message boards became a fixture in email and instant messages.

Yahoo Messenger's Terrell Karlsten wrote up an interview he conducted with a special guest. Scott Fahlman of Carnegie-Mellon has long been credited with inventing the smiley.

That originated in a conversation posted to a CMU message thread dated September 16, 1982. Fahlman suggested the sequence :-) as a way to designate a post as one with humorous intent, presumably for the humor-impaired.

Fahlman's Yahoo interview noted how the concept quickly spread to other message board users. People began to create new smileys, like ones indicating surprise, or even renditions of people like the Pope or Abraham Lincoln.

"It was gratifying that my colleagues found the idea so amusing, but I figured that it would stop there and would gradually fade away as the novelty wore off," Fahlman said.

It didn't, instead becoming a feature on messaging clients like Yahoo's, AOL's, and others after the Internet began reaching a broader commercial audience in the 1990s.

Fahlman isn't really a fan of the heavily-animated smileys seen on rich messaging clients today. He would like to have one that truly captures emotion, like Munch's "The Scream," he said in the interview.

"When deadlines are looming and things are going wrong, I’d use that symbol about six times a day. The :-( symbol just doesn’t capture the full horror of discovering that your Internet connection just went down, an hour before the deadline for submitting a major funding proposal," he said.

Geez O Peez

A woman was shopping at her local supermarket where she had selected the following items:

* A half-gallon of 2% milk
* A half carton of eggs
* A quart of orange juice
* A small head of romaine lettuce
* A 2-pound can of coffee
* And a 1-pound package of bacon

As she was unloading her items on the conveyor belt to check out, a drunk standing behind her watched as she placed the items in front of the cashier.

While the cashier was ringing up her purchases, the drunk calmly stated, "You must be single."

The woman was a bit startled by this proclamation, but she was intrigued by the derelict's intuition, since she was indeed single. She looked at her six items on the belt and saw nothing particularly unusual about her selections that could have tipped off the drunk to her marital status.

Curiosity getting the better of her, she said "Well, you know what, you're absolutely correct. But how on earth did you know that?"

The drunk replied, "'Cause you're ugly."

Monday, July 9, 2007

convert Numbers / Currency to words.

Courtesy - Vinnie881

Here is a very useful script I found to convert Numbers / Currency to words.

For example if you were to do

select dbo.Currency_ToWords(1235.34)
the output would be

ONE THOUSAND THIRTY FIVE DOLLARS AND 34/100 CENTS

I figured I'd post this, because I spent 2 hours trying to get it, and could not find a function like this for sql anywhere. enjoy!




Create FUNCTION [dbo].[Currency_ToWords] (
@Input Numeric (38, 3) -- Input number with as many as 18 digits

) RETURNS VARCHAR(8000)

/*
* Converts a integer number as large as 34 digits into the
* equivalent words. The first letter is capitalized.
*
* Attribution: Based on NumberToWords by Srinivas Sampath
* as revised by Nick Barclay
*
* Example:
select dbo.udf_Num_ToWords (1234567890) + CHAR(10)
+ dbo.udf_Num_ToWords (0) + CHAR(10)
+ dbo.udf_Num_ToWords (123) + CHAR(10)
select dbo.udf_Num_ToWords(76543210987654321098765432109876543210)

DECLARE @i numeric (38,0)
SET @i = 0
WHILE @I <= 1000 BEGIN
PRINT convert (char(5), @i)
+ convert(varchar(255), dbo.udf_Num_ToWords(@i))
SET @I = @i + 1
END
*
* Published as the T-SQL UDF of the Week Vol 2 #9 2/17/03
****************************************************************/
AS BEGIN
Declare @Number Numeric(38,0)
set @Number = @Input
Declare @Cents as int
set @Cents = 100*Convert(money,(@Input - convert(Numeric(38,3),@Number)))
DECLARE @inputNumber VARCHAR(38)
DECLARE @NumbersTable TABLE (number CHAR(2), word VARCHAR(10))
DECLARE @outputString VARCHAR(8000)
DECLARE @length INT
DECLARE @counter INT
DECLARE @loops INT
DECLARE @position INT
DECLARE @chunk CHAR(3) -- for chunks of 3 numbers
DECLARE @tensones CHAR(2)
DECLARE @hundreds CHAR(1)
DECLARE @tens CHAR(1)
DECLARE @ones CHAR(1)

IF @Number = 0 Return 'Zero'

-- initialize the variables
SELECT @inputNumber = CONVERT(varchar(38), @Number)
, @outputString = ''
, @counter = 1
SELECT @length = LEN(@inputNumber)
, @position = LEN(@inputNumber) - 2
, @loops = LEN(@inputNumber)/3

-- make sure there is an extra loop added for the remaining numbers
IF LEN(@inputNumber) % 3 <> 0 SET @loops = @loops + 1

-- insert data for the numbers and words
INSERT INTO @NumbersTable SELECT '00', ''
UNION ALL SELECT '01', 'one' UNION ALL SELECT '02', 'two'
UNION ALL SELECT '03', 'three' UNION ALL SELECT '04', 'four'
UNION ALL SELECT '05', 'five' UNION ALL SELECT '06', 'six'
UNION ALL SELECT '07', 'seven' UNION ALL SELECT '08', 'eight'
UNION ALL SELECT '09', 'nine' UNION ALL SELECT '10', 'ten'
UNION ALL SELECT '11', 'eleven' UNION ALL SELECT '12', 'twelve'
UNION ALL SELECT '13', 'thirteen' UNION ALL SELECT '14', 'fourteen'
UNION ALL SELECT '15', 'fifteen' UNION ALL SELECT '16', 'sixteen'
UNION ALL SELECT '17', 'seventeen' UNION ALL SELECT '18', 'eighteen'
UNION ALL SELECT '19', 'nineteen' UNION ALL SELECT '20', 'twenty'
UNION ALL SELECT '30', 'thirty' UNION ALL SELECT '40', 'forty'
UNION ALL SELECT '50', 'fifty' UNION ALL SELECT '60', 'sixty'
UNION ALL SELECT '70', 'seventy' UNION ALL SELECT '80', 'eighty'
UNION ALL SELECT '90', 'ninety'

WHILE @counter <= @loops BEGIN

-- get chunks of 3 numbers at a time, padded with leading zeros
SET @chunk = RIGHT('000' + SUBSTRING(@inputNumber, @position, 3), 3)

IF @chunk <> '000' BEGIN
SELECT @tensones = SUBSTRING(@chunk, 2, 2)
, @hundreds = SUBSTRING(@chunk, 1, 1)
, @tens = SUBSTRING(@chunk, 2, 1)
, @ones = SUBSTRING(@chunk, 3, 1)

-- If twenty or less, use the word directly from @NumbersTable
IF CONVERT(INT, @tensones) <= 20 OR @Ones='0' BEGIN
SET @outputString = (SELECT word
FROM @NumbersTable
WHERE @tensones = number)
+ CASE @counter WHEN 1 THEN '' -- No name
WHEN 2 THEN ' thousand ' WHEN 3 THEN ' million '
WHEN 4 THEN ' billion ' WHEN 5 THEN ' trillion '
WHEN 6 THEN ' quadrillion ' WHEN 7 THEN ' quintillion '
WHEN 8 THEN ' sextillion ' WHEN 9 THEN ' septillion '
WHEN 10 THEN ' octillion ' WHEN 11 THEN ' nonillion '
WHEN 12 THEN ' decillion ' WHEN 13 THEN ' undecillion '
ELSE '' END
+ @outputString
END
ELSE BEGIN -- break down the ones and the tens separately

SET @outputString = ' '
+ (SELECT word
FROM @NumbersTable
WHERE @tens + '0' = number)
+ '-'
+ (SELECT word
FROM @NumbersTable
WHERE '0'+ @ones = number)
+ CASE @counter WHEN 1 THEN '' -- No name
WHEN 2 THEN ' thousand ' WHEN 3 THEN ' million '
WHEN 4 THEN ' billion ' WHEN 5 THEN ' trillion '
WHEN 6 THEN ' quadrillion ' WHEN 7 THEN ' quintillion '
WHEN 8 THEN ' sextillion ' WHEN 9 THEN ' septillion '
WHEN 10 THEN ' octillion ' WHEN 11 THEN ' nonillion '
WHEN 12 THEN ' decillion ' WHEN 13 THEN ' undecillion '
ELSE '' END
+ @outputString
END

-- now get the hundreds
IF @hundreds <> '0' BEGIN
SET @outputString = (SELECT word
FROM @NumbersTable
WHERE '0' + @hundreds = number)
+ ' hundred '
+ @outputString
END
END

SELECT @counter = @counter + 1
, @position = @position - 3

END

-- Remove any double spaces
SET @outputString = LTRIM(RTRIM(REPLACE(@outputString, ' ', ' ')))
SET @outputstring = UPPER(LEFT(@outputstring, 1)) + SUBSTRING(@outputstring, 2, 8000)


RETURN UPPER(@outputString) + ' DOLLARS & ' +convert(Varchar(20),@Cents) + '/100 CENTS'-- return the result
END

Tuesday, July 3, 2007

Had to repost it

Read this somewhere and had to repost...just for the sheer surrealness of the post..


What Would Happen if You Bought 25 Bottles of Nyquil?

May 28th, 2007

Ever since I was a little girl, I have periodically played a game I like to call ‘What would happen if…’

The very first time I played this game I was 5 years old and riding in the car with my Mother. She had allowed me to sit in the front seat, but the novelty of that wore off rather quickly and I got bored. Almost immediately after we merged onto the expressway, I spied the car door handle. I thought to myself, I wonder what would happen if I opened the car door right now?

Would the door fly open? Or would it stay closed since the car was in motion? If it flew open, would the wind rip the door completely off of the car? My seatbelt was secure, so I was pretty sure I wouldn’t fly out of the car, but would anything else fly out? What would my Mother do?

I looked over at my Mother who was paying careful attention to the road and vaguely singing along with the radio. Then I looked over at the gleaming car handle. I knew that opening the door while we were driving was a very stupid and potentially dangerous thing to do, but it was almost as if the handle was calling my name. It wanted me to open it. I tried to resist, but my curiosity overwhelmed me. Slowly, I reached over…and opened the door.

Turns out the only thing that happens when you open the car door on the expressway is your Mother screams, “OH MY GOD! HOW DID THAT HAPPEN?” pulls over, closes your door, and then goes homes and bitches to your Father about her vehicle being unsafe and demands he buy her a new one.

It wasn’t the most exciting outcome in the world, but at least I knew.

This past Friday evening, I found myself inadvertently playing another game of ‘What would happen if…’

My husband has been dealing with a particularly nasty summer cold and it’s making it difficult for him to fall asleep. Shortly after midnight one evening, he asked me to run to the store and pick him up some medicine. I agreed because I’m nice like that.

After selecting a bottle of Nyquil and my Husband’s favorite brand of ice cream, it was time to check-out. I elected to go through the self check-out lane because the group of kids who normally jockeyed the registers looked thoroughly engrossed in a conversation about their parents sucking or their jobs sucking or who de-friended them on myspace recently or whatever and I didn’t want to interrupt them. Besides, I have two fully functioning arms. I am capable of scanning and bagging my own ice cream.

However, after I scanned my items, the computer started beeping.

“You have selected an age restricted item. Please wait for a cashier,” it said.

“What the Hell?” I mused, “Ice cream and Nyquil is age restricted now?”

A teenager with a lip piercing and bad dye job came rushing over. “Can I see your ID?” she chirped.

“What did I order that needs ID?” I asked.

She looked over my purchases and shrugged. “I guess it’s the Nyquil.”

I sighed deeply and handed her my driver’s license. She glanced at it quickly, typed my birthday into the computer, handed it back, and scurried away. Even though I didn’t show it, I was all kinds of annoyed.

I mean, what kind of nanny state am I living in right now? I can’t even buy cold medicine anymore without the government all up in my shit? Why is my right to privacy being invaded in favor of incompetent police officers who lack the ability to catch drug dealers without spying on the average law abiding citizen?

Then, out of nowhere, I thought, I wonder what would happen if I tried to buy all the Nyquil on the shelf?

Would they laugh? Would they get angry? Would they sell it to me? Would they call the cops? Would they interrogate me until I told them what it was for?

No matter how many years pass, I remain easily seduced by my curiosity. The harder I try to shake the wondering thoughts from my head, the more they burrow into my brain and demand recognition. By the time I got home from the grocery store, I simply had to know what would happen if I tried to buy an entire shelf full of Nyquil.

The next morning, I woke up bright and early with the intent of carrying out my plan. Now I’m not really sure how the typical Meth Head dresses, so I took a guess. I clad myself in an old T-shirt and a ripped pair of pants that were covered in paint. I pulled my hair back in a ratty ponytail and slipped on a pair of dirty sandals. My goal was to look as shady as possible without overdoing it.

Upon entering the store, I grabbed one of those hand-held shopping baskets and walked with single minded purpose over to the drug isle. I then proceeded to fill my basket with every bottle of Nyquil sitting on the shelf. There weren’t that many and I really wanted to be obvious, so I decided to buy all the generic versions as well. Then I marched my ass right over to the cashier and emptied my basket onto the conveyor belt. At first she wasn’t really paying attention as she grabbed bottle after bottle and flipped them through the scanner. Then a little light must have gone off in her head because she suddenly paused.

“Are these on sale or something?” she asked.

“Nope.” I replied noncommittally.

“I’m going to need to see your ID,” she responded.

“Sure.” I said as I handed it over.

“I’ll be right back,” she told me as she scampered over to the customer service desk to show my ID to who I assumed was the manager.

The guy in line behind me asked, “Someone sick?”

“I’m having a yard sale,” I replied. Yeah, my answer didn’t make much sense. But it was none of his business, so fuck him.

After about 10 minutes, the cashier came back and gave me my ID. Then she finished ringing me up and handed over two bags of Nyquil. “Um, have a nice day,” she said.

I thanked her politely and headed out to my car thinking to myself that the whole scenario ended up being fairly anticlimactic. This time, bending to the will of my curiosity earned me nothing more than 10 minutes of inconvenience and 25 bottles of unneeded Nyquil. Fucking fantastic.

I went home, unloaded my spoils onto my kitchen table and decided to take a nap on my couch. Right before I fell asleep, I thought to myself, I really need to stop playing that game.

A couple of hours later, my brother and his girlfriend woke me up.

“What the hell is with all the Nyquil?” he asked.

I told him about my game and how nothing really exciting happened. Then, he said, “Probably because you bought the wrong shit.”

I said, “Huh?”

With a smirk on his face, my brother explained, “The ingredient in Nyquil that is used to make crystal meth is called pseudoephedrine. But these don’t have it in them. Look! It even says right here on the front, ‘Now Made without pseudoephedrine.’

“Then why did they card me for them?”

“How the hell am I supposed to know? All I know is that you can’t make meth out of these.”

“Son of a bitch!” I exclaimed.

“You are the worst fake drug dealer ever,” my brother admonished.

His girlfriend cut in, “You know what you should get? Sudafed. They sell it behind the counter at the pharmacy and they probably won’t give you more than one or two. But it might be funny if you asked to exchange your Nyquil for 25 boxes of Sudafed.”

For me, failure tends to make me more determined, so I decided that was exactly what I was going to do. But, this time, I wanted to start my adventure with a bit more planning. I decided to call the grocery store and ask if it was even possible to return Nyquil since it was technically a medicine. The manager I spoke to assured me that as long as I had the receipt and the seal wasn’t broken, they would take it back.

So the next day, I packed up my bags of Nyquil and headed back to the grocery store. I plopped the bags on the counter of the customer service desk and amicably said, “I’d like to return these, please.”

The cashier looked shocked. “All of these?”

“Yes please,” I answered mildly, “Here is the receipt.”

“How many bottles are in here?”

“25.”

“25? You bought 25 bottles of Nyquil? Why would you do that?” she asked.

“I wasn’t feeling well.” I answered.

“So why are you returning them now?” She countered.

I slightly hardened my voice. “I’m feeling better.”

“Normal people don’t buy 25 bottles of Nyquil!” she exclaimed.

“So?” I snapped.

She started stammering. “Well….its just that I don’t….I don’t know…if we can take this many back. We’d have to throw them away and….I….uh….”

“I called and spoke to a manager yesterday,” I informed her, “And he told me that as long as the seal wasn’t broken and I had the receipt, you would take them back.”

“Well I’m sure he didn’t know how many you bought!”

“Does it matter?” I questioned, “Is there some sort of store policy that states you can only return so many things at a time?”

“I’m going to get my manger,” she replied.

“Fine.”

The manger came over, obviously perturbed, and we argued back and forth for a few minutes. Finally she said, “I’ll take them back this time. But next time, I won’t.”

“That’s fine by me,” I agreed.

I filled out a form with my name, address, and phone number, got my cash back and walked directly over to the pharmacy.

An older lady walked over to wait on me. “Can I please buy some Sudafed?” I requested.

“Sure!” she said as she held out her hand, “I’m going to need some proof that you’re over 18, though.”

“That’s fine,” I told her, “But I’m going to need more than one.”

“How many do you need?”

“25.”

“25 tablets?”

“No, 25 boxes.”

I’m not sure if my answer extremely shocked her or extremely angered her, but her response was to shriek, “NO!”

Calmly, I asked, “Why not?”

“NO!” she bellowed again.

“But why not?” I repeated.

“BECAUSE OF THE METH!” she hollered.

I smiled a little and said, “I promise I won’t use it to make meth.”

Again: “NO!”

A concerned Pharmacist walked around the counter. “What seems to be the problem here?” he questioned.

“I’m just trying to by some Sudafed.” I answered.

The cashier squawked again, “NO! YOU CAN’T HAVE ANY!”

And I was supposed to be the crazy one!

The Pharmacist gave her a confused look and she said to him, “She wants 25 boxes!”

“Whoa, wait a minute, ma’am!” he said to me.

Just then, out of the corner of my eye, I realized that the manager who did my return and a couple of stock boys were walking up behind me. They were closing in on me!

I thought to myself what better time to walk away, all shifty, like I was a real drug dealer than now. So I abruptly did an about-face and briskly started striding towards the door.

The Pharmacist tried to stop me. “Ma’am!” he called after me, “Ma’am! I’m going to need you to come back here! Ma’am!”

Seriously, I couldn’t believe he actually thought I would fall for that. I mean, what am I? 12 years old? Did he actually think I would be naïve enough to believe that a goddamn Pharmacist had the legal right to forcibly detain me in a grocery store?

But the ridiculousness of the situation was only a fleeting thought in my mind. At that precise moment, I had more pressing matters to concern myself with. Namely, how I was going to shake the manager and the stock boy goons who were in the process of following me out of the store.

I increased my walking speed a little and made it outside. I paused for a second, thinking the chase was over, but I was wrong. The manager had tailed me into the parking lot. Frantically, she started waving the cart boys over to her and pointing in my direction. Before I knew it, I had a small army of grocery store employees following me around the parking lot. It was fucking surreal. I felt like I was starring in the deleted scenes of one of those Terminator movies.

My theory was that they were waiting until I got into my car so they could write down my license plate number. To me, this was odd, considering the fact that they had my name, address, and phone number written on a slip of paper behind the customer service desk.

Anyway, I finally thwarted them for good by electing to simply walk home. Because I live a couple of miles from the grocery store, I decided to call my brother.

“Hey, if the cops show up at my door, do not let them in without a warrant,” I told him, “That’s a violation of my 4th amendment rights!”

“No problem.” He said. He’s learned to quit asking questions.

The end result of my little escapade, however, produced no angry police officers ruthlessly pounding on my door. In fact, outside of a couple of grocery store employees who briefly pretended to be Rambo, nothing really exciting happened at all.

All in all, I ended up fairly disappointed with my most recent game of ‘What would happen if….’ You see, that’s the problem with letting yourself become randomly consumed by curiosity. Things rarely live up to your expectations.

Monday, July 2, 2007

Forgot the Administrator password - Alternate Method - The LOGON.SCR trick

Forgot the Administrator password - Alternate Method - The LOGON.SCR trick

Windows Server 2003 Domain Admin password

This tip will NOT work for Windows Server 2003. This is because of changes in the service account with which the process runs. In Windows 2000 it was run in the Local SYSTEM account (LSA) privileges, while in Windows Server 2003 it is run with the LOCAL SERVICE account, thus resulting in far less privileges than it used to have in W2K and NT 4.0. The reason 2 new account have been introduced in 2003 is that SYSTEM Account has way too many power over the system and the system could be compromised by exploiting almost any system service. The Microsoft's solution was to introduce 2 less powerful accounts (LOCAL SERVICE and NETWORK SERVICE) and make some services run in the context of those accounts instead of LSA.

To successfully reset the Domain Admin password on Windows Server 2003 Active Directory please read the Forgot the Administrator's Password? - Reset Domain Admin Password in Windows Server 2003 AD page.

Windows 2000 Domain Admin password

To successfully reset the Domain Admin password on Windows 2000 Active Directory please read the Forgot the Administrator's Password? - Reset Domain Admin Password in Windows 2000 AD page.

The LOGON.SCR trick

To successfully reset the local administrator's password on Windows NT and some versions of Windows 2000 follow these steps:

1.

Install an alternate copy of Windows NT or Windows 2000.

You must install this instance of NT/2000 on a different folder than WINNT, otherwise you'll end up with the same bad situation. Use ALTWINNT for example.

It is best that you install the alternate instance of the OS into a different partition than the one you have your original installation. You'll delete this folder anyway, and it's best that you just format that partition after you're done. Formatting the partition will be much easier than deleting individual files and folders.

Also, if you lost your password on NT - install a new instance of NT, not Windows 2000, as doing so will ruin your old NT installation (because of the difference between the NTFS versions). Same goes for W2K, XP and Windows Server 2003. Always install the same OS.

Note: On Windows NT 4.0 machines that were installed out-of-the-box you do not have to install a fresh copy if you still have access as a regular user to the system. E.g. if you can log-on as a regular, non-administrator user, you can still manipulate the file's permissions. This is simply because NT's default permissions are set for Everyone - Full Control. This is not true on W2K/XP/2003 machines.

Another note: In the article you mention installing the OS on top of the existing OS to do the logon screensaver manipulation.

I wanted to mention that this can also be accomplished by removing the hard drive, placing it as a slave on another computer (XP and W2K play nicely) and then accessing the file system. Of course you need a second computer, but for some folks it may be an easier solution.

That's correct, and it will work for you unless you converted the disk to a dynamic disk, on the original OS. In that case you will no longer be able to boot the old OS, even if you do manage to access the files from the other computer.

2.

Boot the alternate install.
3.

Use Control Panel/System/Startup (for NT) or Control Panel/System/Advanced/Startup and Recovery for W2K to change the default boot instance back to your original install.

Lamer note: If you don't do that you'll end up booting into the alternate installation next time you turn on your computer. You don't want that, do you?

4.

Open Explorer. Browse to your original Windows NT/2000 folder, navigate to the %systemroot%\System32 sub-folder.

Lamer note: %systemroot% is a system variable used to point to the folder where NT/2000 is installed, usually \WINNT in NT/2000, or \WINDOWS in XP/2003.

5.

Save a copy of LOGON.SCR, the default logon screen saver, anywhere you like. Just remember where you've placed it. You can also just rename the file to something you'll remember later, I user LOGON.SC1.

Lamer note: To rename a file use the REN command in the Command Prompt window, or just select the file in Windows Explorer and press F2.

6.

Delete the original LOGON.SCR from the %systemroot%\System32 sub-folder. It is not necessary to delete the file if you renamed it, you can leave it there.

Note: You might not be able to delete the LOGON.SCR file because of permission settings. Regular users can only read and execute the file, not delete it. If that is the case (and it is in W2K, XP and Windows Server 2003) then you need to take ownership of the file and give the EVERYONE group FULL CONTROL permissions.

Lamer note: In order to take ownership of a file right-click it, select Properties, select the Security tab, click Advanced, and then click on the Owner tab. Select one of the users found in the list, click ok all the way out.

In order to change the LOGON.SCR permissions follow the previous instructions, in the Security tab click Add and browse to the Everyone group. Add it and make sure you give it Full Control. Click Ok all the way out.

7.

Make a copy CMD.EXE in the %systemroot%\System32 sub-folder. CMD.EXE is located in %systemroot%\system32.

Lamer note: In order to copy a file via GUI, select the file, right-click and chose Copy, then go to the destination folder, right click the folder name and select Paste. You can also use the keyboard by typing CTRL-C to Copy, CTRL-V to Paste.

8.

Rename the copy of CMD.EXE to LOGON.SCR.

Lamer note: See step #5.

9.

Shutdown and restart your computer. Boot into the original install.
10.

Wait for the logon screen saver to initiate - around 15 minutes. Oh, and no, do NOT move your mouse while you wait, duh...

After the screensaver is initiated, instead of running the normal LOGON.SRC actual screensaver, it will run the renamed CMD.EXE file (which is now called LOGON.SCR), and will actually open a CMD prompt in the context of the local system account.

In step #7 you could have used EXPLORER.EXE instead of CMD.EXE, and in that case a My Computer window will pop up.

Note: As noted earlier on this page, there is a way to make the wait time shorter, but you'll need to dig into the Registry for that.

11.

Open the CMD.EXE prompt (it should already be opened if you've used CMD.EXE in step #7) and type:

net user administrator 123456

This will reset the local administrator (or domain admin if you are doing this trick on a DC) password to 123456.

Lamer note: You can, of course, use ANY password you want...

12.

Delete the LOGON.SCR from %systemroot%\System32.
13.

Rename the saved default screen saver from step 5 back to LOGON.SCR.
14.

If you wish to remove the alternate install:

*

Delete its' folder.
*

ATTRIB -R -S -H c:\BOOT.INI
*

Edit c:\BOOT.INI and remove the alternate install's entries.

If you've used a different partition to install the alternate install then now you can simply delete or format that partition if you don't need it anymore, plus edit c:\BOOT.INI and remove the alternate installation entries.

This trick has been tested a zillion times. Don't bother to tell me it doesn't work, it does (for Windows NT and some versions of Windows 2000), and that's a fact

Tuesday, June 12, 2007

The worst company ever

Thanks for pointing out Alan...

here is to google, the worst company in the world...

http://www.motelmag.com/2006/10/worst-company-in-world-google-also.html

Woolmer the life and the death

Bob woolmer was murdered ...no he died of natural causes...

Wat a controversy....!!!!

I totally think the cricket community is trying to cover up the case...

here are a few of my thoughts on the case...

  1. Jamaican police was the firsts to do autopsy and they gave strangulation as a cause of death...
  2. Woolmer's body was cremeted immidiately after arriving in his home town so as to remove any chance of exhuming his body for further examination
  3. UK scotland yard announces its not a murder
  4. Jamaican police says its not a murder as well
Am i the only one proposing a controversy theory in this regard !!!!

Call me insane but the billion trillion dollar cricket industry just bought justice...to apparently save the name of the game..

the game which died long time back...with match fixing...with azaheruddin, with pakistanis and with bob woolmer...

the game shall never be the same again

Wednesday, June 6, 2007

Get this widget | Share | Track details

With Due credit to FlOrEsTaN

Newbies ONLY

"FlOrEsTaN has sent me this tutorial he wrote a few months back and imho its one of the best "how to get started" tutorials I've read, I'll certainly be adding this to my recommended newbies reading list. You should easily find the target programs and tools. I hope FlOrEsTaN will go forward to enhance his knowledge further". "Slightly edited and commented by CrackZ".

You notice the title. I am a beginner. I have been cracking for about a month or 2, with mixed success. It should be noted therefore, lots of what I say may be incomplete or inaccurate. It is the intention of this tutorial to teach *complete* newbies what I have learned so far. (BTW, you'd better read this with word wrap on, or you'll have hell trying to follow the text!!!).

The first thing I think you should do is get "W32Dasm". This is one of the tools you will use regularly when cracking. It is a "disassembler". It disassembles files, so you can see how the program is set out, how it works etc. Get this tool from :-

http://www.woodmann.com/crackz/Tools.htm

Just copy and paste that URL into your browser and you should start downloading. Go get this program now, and resume the tutorial when it's installed.

When you disassemble a file for the first time, you'll look at the contents of your screen and think, "Oh dear...". Don't be discouraged, what you'll be looking at is the program's "Assembly". You will have to get to know what lots of the stuff means. I'm still struggling, but I'm still learning. The assembly of a program is the listing of all the functions it carries out. Every program you disassemble will look similar. When you disassemble a program using W32Dasm you will notice it takes a long time to load some files, depending on the size of the exe you are disassembling. (Especially on my slow excuse for a PC!) Load "calc.exe" (The Windows Calculator) into the disassembler. The one I have is 92KB, but if yours is different, just apply what I say to your version. (P.S. If you skipped ahead without getting W32Dasm, get it now, you honestly will need it from this point on).

Disassembled the calculator? Good. Now, a few basics about the disassembled text. First of all, click on the button on the W32Dasm toolbar that says "Cd Loc". (When you put your mouse over this button it will say "Goto Code Location". Push the button. A window will pop up). Type in the window :-

"010026A6" (Without Quotes)

(Don't worry, it's only a random number I have chosen). Click on OK. All the way down the left side of the page you will see 8 numbers (or letters). These first 8 numbers or letters on each line are the "Addresses" or "Code Locations". Ignore the numbers and letters after the addresses for now. Addresses are used so that if a program says "Carry out the function at address (Whatever the address is)", the program will know where to go next. Things like that. Look at the right hand side of the assembly language. You will see something like the following: (Don't worry if yours isn't the same as what is written here - it's not important).

call 01007387

mov ecx, dword ptr [01013D90]

mov dword ptr [ecx+04], eax

mov eax, dword ptr [01013D64]

mov eax, dword ptr [4*eax+01013CE0]

jmp 01002745

These are the actual instructions. Don't ask me what it all means! I only know the basics right now. Look for an instruction that begins with a "Jmp". Any one you can find. If you're using the same file as me, there will be one just below where your blue bar should be :-

:010026AD E993000000 jmp 01002745

^ ^ ^

Address "Hex" Instruction

Don't worry yourself with hex just yet. See the "Jmp" is followed by an address. Here is a good place to explain that "Jmp" means "Jump". This means that the program will jump from the address specified on the left (e.g. in the above example the address is 010026AD) to the address specified in the Jump instruction (e.g. 01002745). Double-Click on the line with the "Jmp". The blue bar should go onto the line and turn green. Memorize the address after the "Jmp" (E.g. in the above example I mean memorize "01002745"). Look at the toolbar of W32Dasm. You will see a "Jump to" button. Put your mouse over it. It will say, "Execute Jump". Click on the button. Look at where it has taken you. Look on the left, the address is the one specified in the Jump instruction. Go to any random parts in the file and try this jumping procedure some more, so you get used to how jumping and addresses work.

Now I'll explain about different jumps. The "Jmp" was an "Unconditional Jump". This means that the program will jump when it reaches the "Jmp" instruction, no questions asked. There are many other types of jump. Here are some of the most important:

"Je" - Jump if Equal

This will regularly come after a "Cmp" (Compare) instruction. You will see the compare instruction as "Cmp" followed by two values. e.g. Scroll up to address "010025C2" if you are using the same version of calc as me, otherwise, just follow what I'm saying. You'll find loads of "Cmp" instructions in your file also.

:010025C2 3BC3 cmp eax, ebx

:010025C4 0F84DD020000 je 010028A7

This is a typical example of a "Cmp" instruction followed by a "Je". In this example, when the program gets to this point, it will compare the value contained in ebx with the value contained in eax. (EAX and EBX are "Registers". Don't worry about it quite yet!) If the values in these registers are equal, the program will jump when it reaches the next (Je) instruction. If EAX and EBX's value are not equal, the program will not jump, the instruction will be ignored.

"Jne" - Jump if NOT Equal

This is the same sort of thing as "Je", but it's the opposite. It jumps if the compared values are not equal. It would be common to find a "Jne" in a relevant part of code in a program you are cracking, where if the program compares the registration code you entered with the right code, and they don't match, it will jump to a set of instructions that send you the error message.

"Jz" - Jump if Zero

This is like "Je" but it is after the program calculates something. If the answer to the calculation is 0 (Zero), the jump will occur. "Jnz" means Jump if NOT Equal. (Use your common sense). I will explain more about these jumps when I try to explain "SoftICE" to you. There are other jumps, but they don't need explaining now. Without any further ado, let's do some practical work...

You will need two programs :-
"Hex Workshop" (Version 2.20) (Which we will be cracking) and "Hackers' View" (or "HIEW" for short. This is a tool you will need to start using). Get these programs.

http://ftp.bspu.unibel.by/fileecho/MFEDOS/HIEW616.ZIP
(Hackers' View - copy and paste the URL and you should start downloading).

http://www.bpsoft.com
(Hex Workshop)

Some of the links may be dead by the time you get to read this, if that's the case, just find a cracker, they should help you get the tools. (Or you could E-Mail me at "Florestan5@hotmail.com" and I'll send them by mail.

Got the programs? Good. All set up? Run Hex Workshop. (HWorks32.exe). Aha, look in the top right hand corner. "Unregistered Version". We don't like that... Go to "Help", and "About". Here you have the chance to enter the serial number. Enter anything and click on "Register". Unless you are the luckiest person on earth and guessed the correct code, you will be staring at an error message. Write the message down. ("You have entered an invalid registration number" will suffice). Get out of the program. Highlight the HWorks32.exe file and copy it. (Ctrl-C, as if you didn't know). Make 2 copies of the file. Rename one "HWorks32.ex_" for backup, if we totally screw the program up when we're cracking it. Rename the other one "HWorks32.w32". This helps you remember that this is the file you will disassemble using (.w32)Dasm. Load up "HWorks32.w32" into W32Dasm.

Click on find on the W32Dasm toolbar. Get the message you wrote down. Type in "You have entered an invalid". Click on find. It will put you in the section headed "Dialog Information", before you even come to any instructions or addresses. Look up 2 lines. You will see "DialogID_0075". Write this information down, as this is what the program will refer to when it needs the text for the error message. Click on find again. Enter "DialogID_0075" and click on find. You will land on a line that says "Possible reference to Dialog: DialogID_0075". Look up to where it says :-

Referenced by a (U)nconditional or (C)onditional jump at address:

|:0041BCCE(C)

This means that the address 0041BCCE had a conditional jump (I.E a "Je" or "Jne" etc.) that told the program to go to the part of the code that follows the "Referenced by a (U)nconditional or (C)onditional jump at address" text. Eg. When we go to the code location (address) 0041BCEE, we should see one of the following lines:

je 0041BD4D ;or

jne 0041BD4D ;or

jz 0041BD4D (you get the picture).

So lets scroll up to address 0041BCCE. It shouldn't be far away. Found the address? Look. Sure enough:

:0041BCCE 0F8479000000 je 0041BD4D

Write the address down. (Write down "0041BCCE") This instruction "je 0041BD4D" we are about to change, so that is "jne 0041BD4D". DON'T close W32Dasm yet. Minimize it. Run HIEW (Hackers' View). Find your original HWorks32.exe file and open it in HIEW. When this is done, press F4. From here you can select "Decode Mode" which is where we can change what the program does. Select Decode mode. Sure enough, you notice anything familiar? Yep. Good old assembly! Press F5. The top line will change colour and you will be able to put the address we wrote down in here.

Put the address you made a note of. IMPORTANT - Make sure you put a dot (.) before the numbers. So type in (Without quotes of course) ".0041BCCE" Press return. You'll be at the line of code we saw in W32Dasm and wanted to change. Press F3. This will allow you to change stuff. Be VERY careful you don't accidentally change things you're not meant to. Press the right arrow key twice so the underscore is under the 8. Type 85. You changed Je (84) to Jne (85). It should be noted Je is not always 84 and Jne 85. It varies depending on how many bytes are in the instruction. "Bytes" consist of two hex characters. So the line we are editing has 6 bytes. (12 Characters). Other times, for example when there is only 2 bytes in the jump instruction, the first byte is the one you will modify, not the second. and in that case, je will be 74, and jne would be 75. But let's not go into that right now.

You have changed the second byte in our instruction. That has changed je to jne. press F9 to update the file and get out of editing mode. Press F10 to get out of HIEW. Go and run "HWorks32.exe". This is the file you just changed. Go to Help, and About again. Type in any code. Click "Register". Presto! Registered! Choose a name and company and press OK. Get out of HWorks32.exe and then run it again to make sure it stays cracked. (You'll find a lot of programs you think you'll have cracked this way, but then when you run them after you exit, it'll say it's unregistered again). Yep. This is still regged. Congrats. You've just cracked your first program!!! Now you can close W32Dasm. (We just kept it open in case the byte we changed didn't do anything).

The next thing I'm going to do is show you "SoftICE". Go get this superb program. You'll need it if you want to do "proper" cracking, where you find registration codes, without even modifying the program. That's the best, cleanest type of cracking you can do. It's also the type of cracking you'll get to feel you've really achieved something. Get SoftICE. It can be found at:

http://soft.ivanovo.ru:8100/Win/SoftICE/si325w98.zip
(copy and paste the URL into the browser to start downloading)

You'll also need a program called "WinRAR". You can get it from www.download.com if you haven't got it already. Once you start installing it you'll be asked to enter your name and registration info. Register it. It's only £30...I used a code that I got passed on to me by another cracker by way of a tutorial. Usually you shouldn't use other peoples' reg info to reg programs. That's what lamers do who can't crack programs. However cracking SoftICE requires specialist tools, and is I expect, waaaaaaay beyond your (and mine!) capability. SoftICE is a tool you WILL need to crack programs efficiently. Use the following registration number: "1907-0000DD-99". Follow the instructions and install. Let it make changes to your autoexec.bat, as it needs to be loaded as a program before windows starts.

When SoftICE is installed, go to the SoftICE directory and open the "winice.dat" file with notepad. Find the line that says "INIT=Code On" or similar. Change that line to the following :-

INIT="lines 60;color f a 4f 1f e;wd 22;wc 22;code on;x;"

This just tells the program how many lines to allow to each "section" of SoftICE, and it gives it some more interesting colours than the boring ones the installation gives it. Now go down to where it says "Examples of Export symbols" and there will be a list of files starting with ";EXP=". Remove all of the ; symbols from the beginning of those lines. This makes sure that when we restart our computer and go into SoftICE we can set "Breakpoints" on the windows "API" (Which is vital to us!) Save the file and restart your computer.......................

Okay, your back. It might be a good idea to print out the next few paragraphs (Until I say "Stop Printing"), because when you're in SoftICE, you can't access any other programs until you leave, and we don't want to be going back and forth between SICE (SoftICE) and Notepad all the time, and when we start cracking, we won't be able to get out of SoftICE of it'll ruin our work, and we'll have to start again.

---------------------------------------START PRINTING HERE---------------------------------------

Press Ctrl+D and you'll see SoftICE in all it's glory. The top section with the first line of text starting with "EAX=" is the section of SoftICE for registers. Registers are places in memory. Memory is where all the information is kept, and registers save the addresses of the places in memory that are important to the program at that time. (That's not the only way they work, but it's all you need to know for now). The line of characters "o d i s z a p c" are all flags. ("o" is a flag, "d" is a flag etc.) The only important one to us right now is the "Zero" flag. That's the "z". You notice, some flags will be highlighted. These are the flags that are active. Remember when we were talking about jumps, and we talked about "jz" (Jump if Zero) and "jnz" (Jump if not Zero). This is what it looks at. These flags are either active or inactive, but they are always there.

For example if in SoftICE we came across a piece of code that had a "jz" in it, we could look at the zero flag just before that function was carried out, and we would know it the program would jump or not! Cool eh? While we are talking about code, let's look at the code section of SICE. (The yellow (Well, they should be yellow) lines separate the sections of SICE). This 3rd section is the "Code Window". (I'll talk about the 2nd section in a minute). The code window should look familiar. The difference between the code here, and the code in W32Dasm, is that the code here in SICE is actually being executed, and when you exit SICE, the highlighted (red) line of code will be executed straight away. This is one of the reasons SICE is so powerful. Look at the 2nd section. This is the "Data Window". This is the memory basically. Type in:

d edx

and press Enter. You should see the Data Window change. What you've just told SICE to do is "Display EDX". SoftICE showed you the memory at EDX. Look at the Registers Window where it says EDX=(whatever). You will notice that the number after EDX is the first number in the Data Window. This is because EDX is storing the address in memory that you have just told SoftICE to display. If you got a message saying "Invalid Address", don't worry, just use my example with EAX or ESI etc. I'm just trying to explain registers. That is how the Data Window works. The last section is just where you type in commands. Now lets do a real crack! Get "5 or More" version 2.0a from :-

http://www.midstream.com

Got the program, good! Then let's begin, set the program up and run it. You'll see "EVALUATION COPY" at the top of the window. Go to "Help" and click on "Register". We see two boxes to enter the information that is needed to register the program. Go into SICE (Ctrl+D remember). The next thing we do is "Break" into SoftICE when the program reads in what we enter. For the program to get the information we enter into the boxes, it will need to use the windows API functions. We will need to tell SoftICE to come to life when a program uses one of these functions. Most programs will use one of the following functions:

"GetWindowText" "GetWindowTextA"

"GetDlgItemText" "GetDlgItemTextA"

The ones without the A's are for 16 bit programs, and since programs are not much made in 16 bit any more, it's usually just safe to use the ones with the A's. The A at the end of functions means it's for use with a 32 bit program only. So you're in SICE. I checked and this program uses "GetDlgItemTextA". If you try to use "GetWindowTextA" you just get confused! So type in

"bpx getdlgitemtexta" [Return]

Bpx simply is the instruction to "BreakPoint on eXecute". i.e. the program breaks when it executes the api function or call. Anyway, type anything in the two boxes I used "Liszt" for my name, and "12345" for my code. Click OK. !BAM! You're in SoftICE! You're at the point in the program where the program is calling the api function "GetDlgItemTextA" to get the name you entered. Press Ctrl+D to get out of SoftICE and you should be immediately brought back to SoftICE where the function is called again, this time to get the code you entered. Remember for the future, you will have to let SoftICE break however many boxes you have to fill in. If in a program you had to enter a name, a code, AND a company, for example, you would set the BreakPoint, press OK, get out of SoftICE, and then get out of SoftICE again, because it would have 3 boxes to read from, so it would need to call the function 3 times.

Anyway, SoftICE has broken twice... We are now at the beginning of the "GetDlgItemTextA" function. The code in the code window below the highlighted line is the code for the function. Press F11. This lets the program carry out the function, but returns you to SoftICE IMMEDIATELY after the function has finished. Now you should be in the 5 or More program code. Press F10 until you get to the instruction:

call 00405EF0

When that instruction is highlighted, press F8. There is a good reason for this...

Pressing F10 steps over calls, while F8 steps INTO calls. Example time... Pressing F10 will carry out all of the instructions it comes across inside the call, until the program returns to the point where the call was. OK, I think I'd better explain about calls now.

Calls are similar to jumps. When there is a call, say for example, we was to come across the following:

:004018D9 E8520D0000 call 00402630

:004018DE 8D4C2414 lea ecx, dword ptr [esp+14]

:004018E2 C684246C02000002 mov byte ptr [esp+0000026C], 02

The program goes to the address 00402630. What we have here for example is:

:00402630 6AFF push FFFFFFFF

:00402632 6896CF4000 push 0040CF96

:00402637 64A100000000 mov eax, dword ptr fs:[00000000]

:0040263D 50 push eax

:0040263E 64892500000000 mov dword ptr fs:[00000000]

:00402645 51 push ecx

:00402646 C3 ret

This means the program would carry out all of the instructions in this part of code (from 00402630) and when it got to 00402646 (A "Return" instruction) it would go to 004018DE. (The instruction after the call to the above piece of code.) In SICE, pressing F10 at a call, would execute all of the instructions until the return instruction automatically, without you having a chance to see what is going on inside the call. When you press F8, you go inside the code, and the instructions are executed one by one, as you press F10 or F8. You should find that information valuable.

Anyway, back to our example, "5 or More". You should have just pressed F8 instead of F10. Don't press anything else yet. Look at the code. You should be looking at the following instructions on the right side of the Code Window:

MOV EAX,[ESP+04]

TEST EAX,EAX

JZ 00405F32

CMP BYTE PTR [EAX],31

JNZ 00405F32

CMP BYTE PTR [EAX+01],36

JNZ 00405F32

CMP BYTE PTR [EAX+02],31

JNZ 00405F32

CMP BYTE PTR [EAX+03],33

JNZ 00405F32

CMP BYTE PTR [EAX+04],35

JNZ 00405F32

CMP BYTE PTR [EAX+05],35

JNZ 00405F32

CMP BYTE PTR [EAX+06],31

JNZ 00405F32

CMP BYTE PTR [EAX+07],30

JNZ 00405F32

CMP BYTE PTR [EAX+08],00

MOV EAX,00000001

JZ 00405F34

XOR EAX,EAX

RET

Okay, I'll try to explain what's going on here. The first line of the above code puts the registration code you entered into EAX. The second line tests EAX with itself, and if the outcome of the test is 0 (Zero), that means that nothing was entered into the registration box, and if this happens, when the program reaches the next line of code, it will jump to 00405F32. So maybe the code at 00405F32 is the code to tell the program to get the error message. Looking at the next lines of code, there is a lot of things compared, and always, if the outcome here isn't zero, it will jump tp the same address (00405F32). So it's pretty good to assume that the code at 00405F32 is the error message process, which must mean that this is the process that checks the registration code you entered to the valid code.

Look in EAX by typing "d eax". Look at the writing in the DATA Window (The one above the Code Window). Look at the right side of this window. The code you entered should be at the first line. The fourth line of the above code CoMPares the byte at EAX with the number 31. We can see EAX in the Data window at the moment. We can see that the first number/letter in view is the first digit of the code you entered. This is the number/letter it compares to the number 31. When we see something like this, with lots of numbers around 30, it will usually be hex. You can find out what the "ASCII" (Normal) value of hex 31 is by typing in "? 31". It will show you different values, the one at the end in the quotation marks is the "Normal Value".

We see that Hex 31 = Normal 1. That tells us that the program compares the your first digit to 1. If the first digit of the code you entered isn't 1, the program will jump in the fifth line of the above code to the error message (00405F32). The next (Sixth) line of code compares EAX+01 to Hex 36. EAX+01 is as simple as that - EAX+01, If you type in "d eax+01" it will show you the second digit of the code you entered. Because it is EAX plus 01 place, which means the second digit of the code you entered. (I hope you understood that!) type "? 36". You see that is compares the second digit of the code you entered with 6. (Assuming, of course it hadn't already jumped after the 1st compare!). So we can see that the first two numbers of the valid registration code are 1 and 6. By looking at the rest of the code down to the 19th line of the above code, we can see that the correct registration code is:

16135510

An important thing to mention is that the valid registration code was already inside the program, and didn't have to be calculated. That tells us that the registration code will work for any name you enter. Other more difficult programs will take you're entered code, make the correct code for the name you entered, and compare your correct code with the one you entered. This means that codes will be different for each name that is entered in harder programs. (This program is easy to crack). Before you leave SoftICE, let's look at the rest of the code above. The 20th line compares EAX+08 to Hex 00. If type "? 00" you'll see that 00 is equal to nothing. That does NOT mean a space, (A space is Hex 20) it means Hex 00 is equal to nothing, so the program is just checking that there wasn't anything entered after the final digit.

The actual program won't let you enter more than 8 characters anyway, so this must be in case bad crackers try to modify the contents of the memory, and mess up. So the CMP BYTE PTR [EAX+07],30 is the last digit of the code. If for some reason, the memory contains more than 8 characters at EAX, it would jump to a different part of code that I haven't bothered to look at because it is irrelevant. The next line (XOR EAX,EAX) zero's EAX, because it doesn't need it anymore (Note from CrackZ - actually this code is never executed, see the MOV EAX, 1 = good guy and EAX=0 is bad, EAX's value is checked after the RET). The next line is RET (Return). When the program (If the code is correct) reaches this, it will go back to the line after the call we pressed F8 at.

See how calls work now? When we are sent to the first line of the above code by the call, there aren't any instructions that jump to a good registration message, only jumps to the bad message, so theoretically, it would be possible to crack the program using "Hackers' View" by finding the address of the call to the registration routine, and simply replacing the call instruction with NOP (No OPeration) instructions. In fact, yeah, we'll try that in a minute! You can leave SoftICE now, but make sure you clear all of the breakpoints before you leave, because we don't need them anymore. To do this type "bc *". Get out of SICE (Ctrl-D). Go to help in 5 or More, and go to register. Type in any name, and the code we found out. (16135510). WOW! It worked. Don't you feel good? You didn't even have to modify the program's code! It's a "Clean Crack"!

--------------------------------------STOP PRINTING HERE-----------------------------------------

Okay, now close the program. Go to the windows directory and find "5ormore.ini". Delete it. Now go back to the game directory and make a backup of the 5ormore.exe in case we screw up (You may want to rename it 5ormore.w32). Done? Good. Run HIEW (Hackers' View) and open 5ormore.exe. Press F4 and select Decode Mode. Press F5 and type ".0040609D" (This is the address that calls the registration check - The place we pressed F8). You are at the line:

.0040609D E84EFEFFFF call 00405EF0

This is the right line. We want to get rid of the call, so we are going to change the bytes that tell the program what to do. I'll explain something first. Look at the E84EFEFFFF. These are the letters and numbers that tell the program what to do. They are what we change. To tell the program to jump to the registration check, it needs 5 bytes (Remember, a byte is two characters). So we need to make sure we replace exactly 5 bytes, no more, no less. A NOP instruction (No OPeration) only requires 1 byte, so we will need to put in 5 NOP instructions, so it has just canceled the call without doing anything else. Press F3. Now, carefully change the bytes to NOPs by pressing "90" five times. Press F9. Press F10. Go back to 5ormore.exe and run the program.

Go to register and type in a name and any old number (not the correct one). It says regged! Great! Close the program, and then start it again to make sure... It says UNREGISTERED!!!! There is a simple reason for this. Each time the program begins, it gets the registration information you entered last time from the 5ormore.ini file in the windows directory, and then carries out the registration check again on the information to check the information is valid. So unless you want to go to register every single time you play the game, we have more work to do. Run W32Dasm. Open 5ormore.W32 (The backup copy). Look at the disassembly. Click on find. Type in:

call 00405EF0

Now click OK. Remember the call to 00405EF0 is the call to the registration check. When W32Dasm has found something, write the address down. You should find two occurences. The first address should be "00405EE2", and the second should be "0040609D". You can close W32Dasm if you want, because I know what we have to do, and we won't need it anymore. Run HIEW and open 5ormore.exe. Press F4 and go to Decode Mode. We are going to get rid of both of these calls that we wrote down. Press F5 and type ".00406EE2" (This is the first address you wrote down). Press F3. There is 5 bytes in this call instruction, so we will need to type in "90" five times. Done? Press F9 to update the file. Now the next address. Type ".0040609D" (The other address from W32Dasm). Huh? What's this, there's already five NOPs here! Yep. That's because, remember, you already changed this one, before we found out that it checked the "5ormore.ini" file when it starts. We saw it as a call in W32Dasm, because we loaded the backup file, and we hadn't changed that file whatsoever with HIEW. So close HIEW.

Run "5ormore.exe" Wow! It will stay registered this time! Exit 5 or More, run 5 or More, exit 5 or More, run 5 or More. Yeah, we made it so that the program didn't find an error with registration information when it starts. (That's because we stopped it from checking the code, so it couldn't jump to the unregistered code routine.) There we go! If you can find registration codes using SoftICE, do that, because it's so much better than modifying a program. I hope this information has been valuable! It should have! If you couldn't understand it, go through it all again. (I'm NOT kidding. If you want to learn, you have to understand these things). If you don't understand something in particular, E-Mail me at "Florestan5@hotmail.com"

If I get enough E-Mails requesting more tutorials, I'll certainly consider it. If I get enough requests, I'll talk more about finding codes in SoftICE, where the program has to calculate your own code (much harder most of the time). All comments, questions, suggestions welcome.

I hope you've enjoyed this tutorial as much as I did writing it. I hope you all learned something.

I'm outta here!

FlOrEsTaN