July 26, 2010

Linux Minimal installation

I have just done a minimal install on my laptop from the Fedora8 dvd. Really easy, uncheck everything, and I mean everything, even base in the graphical installer. If you then install you will get a working system (with about 135 packages installed) but it will not install yum.

If you install, uncheck everything but then go into the base section and check yum (so yum is the only package selected) you get a working system with yum in 150 packages.

One thing to bare in mind with this is that the network will not be properly configured and dhcp will not work (there are really very few packages to be install). If you need it you can mount the cdrom go to Packages and rpm install dhclient, then "dhclient eth0" "yum update" etc.

mkdir /mnt/cdrom

mount /dev/cdrom /mnt/cdrom

rpm -ivh dhclient-3.0.6-10.fc8.i386.rpm

dhclient eth0

yum -y update

Forgot to mention, even though I passed noselinux etc the install ignored me and installed and enabled selinux anyway however the system runs in init 3 straight after the install like this. I do not like selinux so I disabled it by modifying /etc/selinux/config

May 4, 2009

How to Prepare Images for Disk Duplication with Sysprep

Sysprep is a tool designed for corporate system administrators, OEMs, and others who need to deploy the Windows® XP operating system on multiple computers. After performing the initial setup steps on a single system, you can run Sysprep to prepare the sample computer for cloning.

To use Sysprep as part of the disk duplication process, the following requirements must be met:

  • The master installation and the destination computers must have compatible hardware abstraction layers (HALs). For more information on HAL compatiblity use the following knowledgebase article: Q309283 HAL options after Windows XP or Windows Server 2003 Setup.

  • The mass–storage controllers (IDE or SCSI) must be identical between the reference and destination computers.

  • Plug and Play devices such as modems, sound cards, network cards, video cards, and so on, do not have to be the same. However, any device drivers not included in Drivers.cab should be included in the master installation before you run Sysprep. Alternatively, make sure the uninstalled drivers are available on the destination computer at first run, so Plug and Play can detect and install the drivers.

  • Third–party software or disk–duplicating hardware devices are required. These products create binary images of a computer’s hard disk, and they either duplicate the image to another hard disk or store the image in a file on a separate disk.

  • The size of the destination computer’s hard disk must be at least the same size as the hard disk of the master installation. If the destination computer has a larger hard disk, the difference is not included in the primary partition. However, you can use the ExtendOemPartition entry in the Sysprep.inf file to extend the primary partition if it was formatted to use the NTFS file system.

    Note If the reference and destination computers have different BIOS versions, you should test the process first to ensure success. When using Sysprep for Disk Duplication, Sysprep modifies the local computer Security ID (SID) so that it is unique to each computer.

How to prepare a master installation for cloning

  1. Install Windows XP on a master computer. As a best practice, Microsoft recommends that Windows XP be installed from a distribution folder by using an answer file to help ensure consistency in configuring the master installation, so that iterative builds can be created and tested more readily. See Unattend.txt for information about automating Windows Setup using an answer file.

  2. Log on to the computer as an administrator.

  3. (Optional) Install and customize applications, such as Microsoft Office, Internet Explorer favorite items, and so on.

  4. (Optional) Install any device drivers not included in Drivers.cab and not installed by the answer file.

  5. (Optional) Run audit tests.

  6. (Optional) If you want, create a Sysprep.inf file manually or with the aid of Setup Manager. This file is used to further customize each computer for the user and helps to set the amount of information for which the user will be prompted during Mini–Setup.

  7. Run Sysprep.exe. Make sure that both the Sysprep.exe and Setupcl.exe files exist together in the %systemdrive%\Sysprep folder on the local hard disk. When used, the Sysprep.inf also needs to be in the same folder or on a floppy disk that is inserted when the Windows boot menu appears.

    Important If Setupcl.exe is not in the same directory as Sysprep.exe, Sysprep will not work.

  8. If the computer is ACPI–compliant, the computer will shut down by itself. If not, a dialog box appears stating that it is safe to shut down the computer.

  9. Take out the system drive and follow the steps for duplicating the system on other computers. You must have special equipment or software for duplicating hard disks.

After a duplicated hard disk is inserted into a computer, when the user turns the computer on, the following occurs:

  1. Plug and Play detection occurs – this takes approximately three minutes.

  2. Mini–Setup prompts users to:

    • Accept the EULA.

    • Specify their name and organization.

    • Join a domain or a workgroup.

    • Specify regional options information.

    • Specify TAPI information.

    • Specify the networking protocols and services to install.
      Note If a Sysprep.inf file was used when running Sysprep.exe, only the dialog boxes omitted in the .inf file are presented to the user. If display settings are omitted, the default settings are used instead.

  3. The local Sysprep folder containing Sysprep.exe and Sysprep.inf in %systemdrive% is deleted.

  4. The computer restarts and a logon prompt displays.


http://technet.microsoft.com/en-us/library/bb457067.aspx

February 24, 2009

Download WGA Validation Crack 1.9.9.1 (1.9.0009.1)

http://www.mydigitallife.info/2009/02/20/download-wga-validation-crack-1991-1900091/

Windows Genuine Advantage (WGA) Validation Tools and Notifications have been upgraded to version 1.9.9.1 (1.9.0009.1) which is used to validate genuineness of Windows OS when accessing Windows Update, Microsoft Download Center and Microsoft Update on February 6th, 2009, superseding WGA 1.9.9.0 that was released just a month ago.
All users on all Microsoft Windows operating system including Windows 7, Windows Vista, Windows XP, Windows Server 2008, Windows Server 2003 and etc, will be installed with WGA v1.9.9.1 ActiveX controls. Hacker Supremo Phantom managed to crack the latest version of WGA again. With the crack, users can continue to access, download and install all critical, important, recommended updates (hotfixes) from Windows Update or Microsoft Update, and other application programs from Microsoft Download Center. It will suppress any warning or notification about pirated or non-genuine Windows in used.
Download WGA_1991.rar
Extract WGA_1991.rar, and then run the WGA_v1.9.9.1_crack.exe self-installer inside the archive as administrator and LegitCheckControl.dll, WgaLogon.dll and WgaTray.exe will be automatically patched.
For user who prefer previous style of using a batch script to install the WGA crack so that all process is transparent and need not worry of virus or Trojan, download the following RAR archive.
Download Windows.Genuine.Advantage.Validation.v1.9.9.1.CRACKED.rar
Run the installer.bat to patch the system with WGA crack. Alternatively, run installer.bat /u to uninstall and remove the crack, or installer.bat /c to cleanup the crack after installation. All commands have to be issued in command prompt with administrative privileges.
Note: For anybody who wants to upgrade to latest WGA Validation v1.9.9.1, the LegitCheckControl.dll can be download from http://download.microsoft.com/download/C/0/C/C0CBBA88-A6F2-48D9-9B0E-1719D1177202/LegitCheckControl.cab.
If you’re using different versions of WGA validation program, check out more WGA cracks available.
Disclaimer: This article is for informational purpose only.




http://www.mydigitallife.info/2006/11/05/ways-to-crack-and-disable-wga-validation-tool-and-wga-notifications-plus-download-and-install-bypassing-genuine-windows-validate-requirement/

http://www.mydigitallife.info/2006/11/05/view-and-retrieve-or-change-windows-xp-vista-2003-2000-and-more-and-office-xp-2003-92-product-key-or-cd-key/

February 21, 2009

Using Classic ASP with Microsoft Access Databases on IIS 7.0 and IIS 7.5

http://learn.iis.net/page.aspx/563/using-classic-asp-with-microsoft-access-databases-on-iis-70-and-iis-75/

Note: Microsoft Access databases have been popular for many years with developers who use Active Server Pages (ASP) for small-scale applications, but Microsoft Access databases are not designed for scalability, therefore Access databases should only be used where performance is not a factor, and it is best not to host large-scale data-driven applications with Microsoft Access databases.
In IIS 7.0 and 7.5, several security changes were made that may affect how classic ASP applications will function. For example, if you were to copy a classic ASP application that uses an Access database that is within the Web site's content area to a server that uses IIS 7.0, you may receive the following error message:
Microsoft JET Database Engine error '80004005'Unspecified error./example.asp, line 100
This is a generic error triggered by the Access driver that may occur for a variety of reasons, but incorrect permissions is a common cause. More specifically, the ability to work with Microsoft Access databases is implemented through the Microsoft JET Database Engine, which creates various temporary and lock files when it connects to an Access database. The following sections will discuss some of the reasons why this may occur and how to resolve those situations.
Working with User Access Control
You need to make sure that you follow the steps in this document by using an account that has full administrative permissions. This is best accomplished by using one of two methods:
Log in to your computer by using the local administrator account.
If you are logged in using an account that administrative permissions but that is not the local administrator account, open all applications and all command prompt sessions by using the "Run as Administrator" option.
These above conditions are required because the User Account Control (UAC) security component in Windows Vista and Windows Server 2008 will prevent administrative access to IIS 7.0’s configuration settings. For more information about UAC, see the following documentation:
User Account Control
Initial Troubleshooting Investigation
If you have some form of tracing or debugging enabled, the trace or debug information may show the error occurring when the database connection is opened. For example, the following lines of ASP code :
strCN = "DRIVER={Microsoft Access Driver (*.mdb)};" & _ "DBQ=C:\Inetpub\wwwroot\App_Data\example.mdb"Set objCN = Server.CreateObject("ADODB.Connection")objCN.Open strCN ' <-- Note: ASP Error Occurs HerestrSQL = "SELECT * FROM TableName"Set objRS = objCN.Execute(strSQL)
Using Failed Request Tracing in IIS 7.0
If you have IIS 7.0's Failed Request Tracing configured to capture trace logs from HTTP 500 errors, you will see something that resembles the following illustration when you examine a trace log from the failure:

Although this error indicates that the failure occurred opening the database opened, it does not give any additional information to assist you with narrowing the problem to a specific area.
Using Process Monitor to gather more information
The Microsoft Windows Sysinternals Process Monitor utility is a great resource for tracking permissions-related problems. To use Process Monitor to trace the IIS issues in this topic, configure Process Monitor to filter tracing for only those events that are created by W3wp.exe processes, as shown in the following illustration:

Once you have configured the Process Monitor filter settings, configure Process Monitor to capture events and then reproduce your error. After you have reproduced your error, look through the Process Monitor capture log for any errors in the Result column of logs, as shown in the following illustration:

By analyzing the information in the Process Monitor logs, you can pinpoint any permissions-related issues. This will be illustrated in the following examples.
Permissions on the Temporary Folders
If you are using the Process Monitor utility on a computer that has a default installation of IIS 7.0 on Windows Server 2008 and Windows Vista SP1, you may receive an error that resembles the following when ASP connects to an Access database:
Process Name:
w3wp.exe
Operation:
CreateFile
Path:
C:\Windows\Temp\JET5150.tmp
Result:
ACCESS DENIED
Detail:
Desired Access:
Generic Read/Write, Delete
Disposition:
Create
Options:
Synchronous IO Non-Alert, Non-Directory File, Random Access, Delete On Close, Open No Recall
Attributes:
NT
ShareMode:
None
AllocationSize:
0
Impersonating:
NT AUTHORITY\IUSR
This error shows that the JET database engine cannot create a temporary file as the impersonated Application Pool identity in the default Windows temporary directory. This occurs when you use default settings for the release version of IIS 7.0 on Windows Server 2008 and Windows Vista SP1, where IIS does not load the user profile for the Application Pool identity's profile by default. To resolve this issue, you could change the permissions on the %SystemDrive%\Windows\Temp directory to allow read/write permission for the impersonated user.
If you are using the original release version of Windows Vista you may see an error that resembles the following when when ASP connects to an Access database:
Process Name:
w3wp.exe
Operation:
CreateFile
Path:
C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp
Result:
ACCESS DENIED
Detail:
Desired Access:
Read Attributes
Disposition:
Open
Options:
Open Reparse Point
Attributes:
n/a
ShareMode:
Read, Write, Delete
AllocationSize:
n/a
Impersonating:
NT AUTHORITY\IUSR
This error indicates that the JET database engine cannot access the temporary directory for the Network Service user profile that uses the impersonated Application Pool identity. In this particular example, the Application Pool identity is configured to use the Network Service account and IIS is configured to load the user profile for the impersonated Application Pool identity. The error occurs because the impersonated Application Pool identity cannot access the temporary folder for the Network Service account. To resolve this specific issue, you can change the permissions on the %SystemDrive%\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp directory to allow read/write permission for the impersonated user, or you can configure IIS to not load the user profile, which will change the temporary folder that the JET database engine will use.
The configuration setting that governs whether the user profile is loaded for the Application Pool identity is loadUserProfile, which is set to false, by default. You can configure this setting by changing the value of the Load User Profile attribute in the Advanced Settings dialog box for an application pool.

You can also configure this setting by using the command-line tool AppCmd.exe with the following syntax:
appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:"False" /commit:apphost
Permissions on Content Folders
When you are deploying a classic ASP application that uses an Access database you may see this error because the lock file for the Access database cannot be created. To further explain this scenario: Access databases are kept in files that use an .MDB file name extension. When you try to add to the database or update the data, the Microsoft JET database engine attempts to create a lock file with that uses an .LDB file name extension. If the Access database is stored within the content area of your Web site, by default the JET database engine will not have sufficient access permissions to update the database and you will see the following error message displayed in a Web browser:
Microsoft JET Database Engine error '80004005'Operation must use an updateable query./example.asp, line 100
If you were using the Process Monitor utility when you reproduced the error, the following information would be logged for the failure:
Process Name:
w3wp.exe
Operation:
CreateFile
Path:
C:\Inetpub\wwwroot\App_Data\example.ldb
Result:
ACCESS DENIED
Detail:
Desired Access:
Generic Read/Write
Disposition:
OpenIf
Options:
Synchronous IO Non-Alert, Non-Directory File, Random Access, Open No Recall
Attributes:
N
ShareMode:
Read, Write
AllocationSize:
0
Impersonating:
NT AUTHORITY\IUSR
This error clearly lists the lock file as the cause of the failure. To resolve the issue, you can grant the application pool's impersonated identity read/write permission to the folder where the Access database is located, but that poses a security risk for your Web site. A better solution would be to move the Access database out of your Web site's content area to a folder where the application pool's impersonated identity has read/write permission, then create a System Data Source Name (DSN) that points to the database location. Your ASP code would then reference the System DSN in the connection string instead of the physical path of the database, which is also better for security. If you must store the database in the content area, you should always store the database in a folder that is blocked by default by IIS 7.0's request-filtering features, such as the App_Data folder.
More Information
For additional information about the loadUserProfile and other application pool attributes, see the following pages on the Microsoft Support and IIS.net Web sites:
http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add/processModel
Error message when you request an ASP page that connects to an Access database in IIS 7.0: "Microsoft JET Database Engine error '80004005'"


http://learn.iis.net/page.aspx/565/using-failed-request-tracing-to-troubleshoot-classic-asp-errors/

Tips for Classic ASP developers on IIS7

http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

I was reminded the other day just how many classic ASP applications and developers there are out there! The original ASP rocks, I remember experiencing it for the first time back in 1996/97 when it first came out with IIS3, and being amazed at how programmable it was compared to ColdFusion. I built many an application using Classic ASP, and there will always be a soft spot in my heart for it. :)
There are a few changes in IIS7 which Classic ASP developers should be aware of.

ASP not installed by default
First things first! If you're moving from XP to Windows Vista / Longhorn Server, you may be getting this error:
--------------------------------------------------------------------------------------------------------------------
HTTP Error 404.3 - Not Found
Description: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.
--------------------------------------------------------------------------------------------------------------------
this is usually the case when you haven't installed the ASP component. Go to where you installed IIS and look under IIS/WWW Services/Application Development/ASP and install it. :)

Access and Classic ASP
A lot of people use Access as a database - because it is small, can be copied around, and is easy to manage. One of the changes we made in IIS7 in Vista broke using ASP and Access by default. I described this change in more detail in this post, but essentially it has to do with the fact that Application Pools now use the Application Pool identity's profile and temporary directory, rather than \windows\temp by default. And since the only one that can write to Network Service's temp directory is the Network Service, anonymous or authenticated ASP applications break, since ASP uses the impersonated identity to access the database. If you use ASP and Access on IIS7, you've probably seen this error, or a variation of it:
--------------------------------------------------------------------------------------------------------------------
Microsoft JET Database Engine error '80004005' Unspecified error
--------------------------------------------------------------------------------------------------------------------
The answer is pretty straight forward: turn off loadUserProfile, or ACL the temp directory to allow writes. As a result of this and other compatibility issues, we're considering reverting this change in Longhorn Server / Vista SP1. In the mean time, you can work around it by doing either of the following:
This appcmd command will turn off loadUserProfile for the Default Application Pool. if your application runs in a different AppPool, make the corresponding change:
%windir%\system32\inetsrv\appcmd set config /section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false
This command will ACL the Network Service temp directory to allow creator write / read privledges. If you run your Application Pool under a different identity, you'll need to ACL that owner's temp directory:
icacls %windir%\serviceprofiles\networkservice\AppData\Local\Temp /grant Users:(CI)(S,WD,AD,X)
icacls %windir%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

**Update 2/19/2009** if you are having issues with Access and ASP you might want to read this terrific guide recently posted on IIS.NET: http://learn.iis.net/page.aspx/563/using-classic-asp-with-microsoft-access-databases-on-iis-70-and-iis-75/

Script errors no longer shown in browser by default
As a result of our security paranoia, we turned off ASP's default behavior of sending script errors (including line number and code snippet to the browser. So instead of seeing the typical error you would see ASP throw, you will now see this:
--------------------------------------------------------------------------------------------------------------------
An error occurred on the server when processing the URL. Please contact the system administrator
--------------------------------------------------------------------------------------------------------------------
To revert back to IIS6- behavior, simply run the following command:
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true
Or you can find it in the UI here:

then you'll be back to seeing this style of error instead:
--------------------------------------------------------------------------------------------------------------------
Microsoft VBScript compilation error '800a03ea'
Syntax error
/test.asp, line 4Response.Write("I love classic ASP" && foo)
-------------------------------------^
--------------------------------------------------------------------------------------------------------------------

Parents paths disabled by default (redux)
We disabled parent paths by default with IIS6, but I've seen this hit people on Vista coming from XP, where it is still enabled by default in IIS5.1 The enableParentPaths setting determines where ASP "includes" should be allowed to escape the parent directory (eg. ../../../includeFile.inc). You'll see this error by default if you try to escape the current directory:
--------------------------------------------------------------------------------------------------------------------
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/test.asp, line 1
The Include file '../bad.inc' cannot contain '..' to indicate the parent directory.
--------------------------------------------------------------------------------------------------------------------
or you may see this error if you are using a path with ../ in it and your ADODB code
--------------------------------------------------------------------------------------------------------------------
Server.MapPath() error 'ASP 0175 : 80004005'
Disallowed Path Characters
/testdir/test.asp, line 9
The '..' characters are not allowed in the Path parameter for the MapPath method.
--------------------------------------------------------------------------------------------------------------------
To revert back to IIS 5.x behavior, simply run the following command:
%windir%\system32\inetsrv\appcmd set config -section:asp -enableParentPaths:true
or you can find the UI setting here:


APPL_PHYSICAL_PATH no longer returns "\" with path
If you use Request.ServerVariables("APPL_PHYSICAL_PATH") to get at the physical path for your application, you may notice that the physical path no longer returns with a trailing slash. In previous releases of IIS, we returned this value as stored in the metabase. In IIS7, we calculate this value based on the configuration store, and we never return a trailing slash. You'll need to account for this especially if you are the return value with some other part of the path in your application.


Session_OnEnd not firing
If you find that Session_onEnd event in your global.asa is not firing, check out this blog post from Lou on the issue and the fix.

Summary
I browsed through the IIS7 Classic ASP Forums, and these tips seemed to cover nearly all of the issues people were having. if you are having a problem with ASP on IIS7, check out the forums or leave a comment for me here. If I find the answer, I'll add it to this post! Thanks!

Running classic ASP on IIS 7

http://www.alexthissen.nl/blogs/main/archive/2008/02/18/running-classic-asp-on-iis-7.aspx



Running classic ASP on IIS 7
It's not really difficult to run classic ASP on Internet Information Server 7, but there are some bumps down the road. Here's a little help to get you started:
First of all, check whether you have the Windows feature for ASP installed. Go to Programs and Features in Control Panel and click Turn Windows features on and off. Navigate down the tree of features and make sure ASP is checked.

Next, go to Internet Information Server (IIS) Manager (run inetmgr from the Start Search box to get there fast) and create a new application pool for ASP.

This should be a "No managed code" and "Classic" app pool if you do not intend to mix and match the .NET Framework and ASP.NET in the same pool. The Integrated pipeline would not make sense, because it only applies to integrating HTTP modules that are either native or managed .NET implementations.
I had some difficulties setting the identity of the application pool to the new built-in IUSR account. This account replaces the former computer account called IUSR_machinename. Same goes for the IIS_WPG group for application pools that is replaced by the builtin group IIS_IUSRS. Read more about it here. Under the Advanced Settings of the "ASP" application pool you will find the Identity property under Process Model. The default value is NetworkService. I found no way to set this to the BUILTIN\IUSR by choosing SpecificUser and setting BUILTIN\USR under Identity SpecificUser Credentials. I guess that you shouldn't be running ASP sites under IUSR anymore. It is used for anonymous users automatically.

To easy the administration effort, there is a way to turn off the IUSR account without turning off anonymous identification:
appcmd set config -section:anonymousAuthentication -userName:"" --password
And lastly, create your new web application. For example, copy the ASP site folder under C:\inetpub\wwwroot, where the default installation location of "Default Web Site" of IIS. Convert the folder (or virtual directory) to an application and choose "ASP" as the application pool. Check whether the .asp extension is mapped to the correct handler and whether it is enabled. Also make sure that the identity of your application pool has sufficient rights (and no more than that) to access the files in the web site's folder.

One final note: whenever there is a error in the ASP website, and you get this error message: "An error occurred on the server when processing the URL. Please contact the system administrator",

it's probably because by default no error messages are sent to the client in IIS7. Change the setting "Send Errors To Browser" of your web application under the ASP icon to reveal such errors.

Side note: if you get the nice Internet Explorer 500 error message and no particular details at all, remember to uncheck the "Show friendly HTTP error messages" checkbox under Internet Options, Advanced of IE.

February 16, 2009

99 command run

Accessibility Controls
access.cpl

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

Date and Time Properties
timedate.cpl

DDE Shares
ddeshare

Device Manager
devmgmt.msc

Direct X Control Panel (If Installed)*
directx.cpl

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

Display Properties (w/Appearance Tab Preselected)
control color

Dr. Watson System Troubleshooting Utility
drwtsn32

Driver Verifier Utility
verifier

Event Viewer
eventvwr.msc

File Signature Verification Tool
sigverif

Findfast
findfast.cpl

Folders Properties
control folders

Fonts
control fonts

Fonts Folder
fonts

Free Cell Card Game
freecell

Game Controllers
joy.cpl

Group Policy Editor (XP Prof)
gpedit.msc

Hearts Card Game
mshearts

Iexpress Wizard
iexpress

Indexing Service
ciadv.msc

Internet Properties
inetcpl.cpl

IP Configuration (Display Connection Configuration)
ipconfig /all

IP Configuration (Display DNS Cache Contents)
ipconfig /displaydns

IP Configuration (Delete DNS Cache Contents)
ipconfig /flushdns

IP Configuration (Release All Connections)
ipconfig /release

IP Configuration (Renew All Connections)
ipconfig /renew

IP Configuration (Refreshes DHCP & Re-Registers DNS)
ipconfig /registerdns

IP Configuration (Display DHCP Class ID)
ipconfig /showclassid

IP Configuration (Modifies DHCP Class ID)
ipconfig /setclassid

ava Control Panel (If Installed)
jpicpl32.cpl

Java Control Panel (If Installed)
javaws

Keyboard Properties
control keyboard

Local Security Settings
secpol.msc

Local Users and Groups
lusrmgr.msc

Logs You Out Of Windows
logoff

Microsoft Chat
winchat

Minesweeper Game
winmine

Mouse Properties
control mouse

Mouse Properties
main.cpl

Network Connections
control netconnections

Network Connections
ncpa.cpl

Network Setup Wizard
netsetup.cpl

Notepad
notepad

Nview Desktop Manager (If Installed)
nvtuicpl.cpl

Object Packager
packager

ODBC Data Source Administrator
odbccp32.cpl

On Screen Keyboard
osk

Opens AC3 Filter (If Installed)
ac3filter.cpl

Password Properties
password.cpl

Performance Monitor
perfmon.msc

Performance Monitor
perfmon

Phone and Modem Options
telephon.cpl

Power Configuration
powercfg.cpl

Printers and Faxes
control printers

Printers Folder
printers

Private Character Editor
eudcedit

Quicktime (If Installed)
QuickTime.cpl

Regional Settings
intl.cpl

Registry Editor
regedit

Registry Editor
regedit32

Remote Desktop
mstsc

Removable Storage
ntmsmgr.msc

Removable Storage Operator Requests
ntmsoprq.msc

Resultant Set of Policy (XP Prof)
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 File Checker Utility (Scan Immediately)
sfc /scannow

System File Checker Utility (Scan Once At Next Boot)
sfc /scanonce

System File Checker Utility (Scan On Every Boot)
sfc /scanboot

System File Checker Utility (Return to Default Setting)
sfc /revert

System File Checker Utility (Purge File Cache)
sfc /purgecache

System File Checker Utility (Set Cache Size to size x)
sfc /cachesize=x

System Properties
sysdm.cpl

Task Manager
taskmgr

Telnet Client
telnet

User Account Management
nusrmgr.cpl

Utility Manager
utilman

Windows Firewall
firewall.cpl

Windows Magnifier
magnify

Windows Management Infrastructure
wmimgmt.msc

Windows System Security Tool
syskey

Windows Update Launches
wupdmgr

Windows XP Tour Wizard
tourstart

Wordpad
write

February 12, 2009

Bios Mods

http://forums.mydigitallife.info/showthread.php?t=3

http://forums.mydigitallife.info/showpost.php?p=8093&postcount=5


How to Retrieve and Extract SLIC Table from BIOS

http://www.mydigitallife.info/2007/03/03/slic-table-slicbin-or-acpislicbin-bios-file-for-oems-download/comment-page-1/


If you have a BIOS that contains authenticated SLIC table, normally with preinstalled Windows Vista, you can manually extract and save the SLIC table contents into a file for hacking, programming or BIOS manipulation use at compatible machine with the following steps:

Download Everest Ultimate Edition (UE) and HWDirect.
Run Everest, select “Motherboard”, then select “ACPI”. Everest will list out and display all available tables in ACPI module.
Click on the SLIC table, the bottom pane will display the information about the SLIC table. Record and note down the value of memory address, such as “3F7D1F90″, and the length or size of the table, such as 374. The length of SLIC table that fulfills the requirements of SLP 2.0 standard should be 374 bytes. Convert the value of 374 to 16-bit HEX format will become 176.
Run HWDirect, select “Memory Dump”. A window will pop up. Under the “Physical Address”, input the physical memory address of “3F7D1F90″ or whatever value that you get from step above. After that, in the “Size” field, input 176 as length of the table. Hit “Dump” button when done. Data of SLIC table will be displayed in the “Memory Dump” pane. Verify that the first four (4) letter is indeed “SLIC”. Lastly, click on the “Save” button, or select “Save” from File menu drop-down list, and save the file as ACPISLIC.BIN.
Same method can be used to retrieve data content of RSDT table too.


http://www.bios.net.cn/
http://www.oembios.net/


How do OEMs like Dell license their machines—all about asset tags
http://forums.mydigitallife.info/showthread.php?t=3486&highlight=oem+files+install

February 11, 2009

Collection of XP OEM SLP keys

http://forums.mydigitallife.info/showpost.php?p=32526&postcount=1

http://forums.mydigitallife.info/showthread.php?t=2602

http://defcon5.biz/phpBB3/viewtopic.php?f=5&t=430

XP Home Edition OEM SLP


CXCY9-TTHBT-36J2P-HT3T3-QPMFB --- XXXXX-OEM-0011903-00100 --- ACER
GYQD9-RC4HM-PPVXR-47QFD-X8C9J --- XXXXX-OEM-0011903-00119 --- ACTEBIS (*)
Q3JTD-2HBFD-PB7PG-VVPTM-YTKYJ --- XXXXX-OEM-0011903-00227 --- ALIENWARE
KTXGG-4FYTT-2KFXP-7BCJB-9W983 --- XXXXX-OEM-0011903-00305 --- AmericanFuture
WPBTV-FHT4G-7WJJW-388TD-XFHMQ --- XXXXX-OEM-0011903-00837 --- AMOI (-H-)
R8P77-FM8RH-BFDCC-3BMCY-QGWPD --- XXXXX-OEM-0011903-00109 --- ASuS (*)
--- XXXXX-OEM-0011903-00198 --- ATComputers
MYFFD-PJP7T-J8BM6-MXPH6-3R2BW --- XXXXX-OEM-0011903-00103 --- AVERATEC (*)
--- XXXXX-OEM-0011903-00301 --- BENq
BFKD2-JKW7W-72MQD-2RY7T-WT7V3 --- XXXXX-OEM-0011903-00133 --- CICERO-Seanix
XPGXX-7KWVQ-QR99R-2TDR7-M2CD8 --- XXXXX-OEM-0011903-00131 --- Colossus (*)
KG27H-JV9M6-2CXKV-GMP22-HF2BQ --- XXXXX-OEM-0011903-00101 --- COMPAQ
--- --- Cyberpower
RCBF6-6KDMK-GD6GR-K6DP3-4C8MT --- XXXXX-OEM-0011903-00102 --- DELL (*)
DMY26-78CX9-Q89DP-Q8QK8-VF2B8 --- XXXXX-OEM-0011903-00107 --- DIXONSXP (*)
B268Q-CPQV3-J39GV-22C7P-2BGT8 --- XXXXX-OEM-0011903-00347 --- ECS ELITEGROUP (*)
MYFFD-PJP7T-J8BM6-MXPH6-3R2BW --- XXXXX-OEM-0011903-00103 --- EMACHINES (*)
--- --- EMAXS
--- XXXXX-OEM-0011903-00113 --- EPSON
--- --- EQUUS
RM4BM-JFBG9-CT7T8-FXCJF-DGWRG --- XXXXX-OEM-0011903-00134 --- EVEREX
RT4F8-8XVQD-FBBYB-KY9JG-YD46Q --- XXXXX-OEM-0011903-00149 --- EVESHAMVALE
FK4VC-XP9C3-BD78M-68492-BP9BY --- XXXXX-OEM-0011903-00296 --- FOUNDER
--- XXXXX-OEM-0011903-00379 --- Frontier Kouziro
JY6V8-QV6YB-BD3GX-67DC9-JT7WD --- XXXXX-OEM-0011903-00137 --- FUJITSU
--- XXXXX-OEM-0011903-00104 --- FUJITSU LIMITED
VWK8M-J4DG8-8DR2H-RBCX6-9HR23 --- XXXXX-OEM-0011903-00117 --- FUJITSU SIEMENS
JX4XP-TTPF9-JQX8J-GYGK3-6X6WD --- XXXXX-OEM-0011903-00105 --- GATEWAY
--- XXXXX-OEM-0011903-00233 --- GBT___
MXYDP-3V2YR-VPQ7R-XKHW3-XFD9B --- XXXXX-OEM-0011903-00148 --- Gericom
GVJ4B-FXG6P-J7GHY-P939B-86B3Y --- XXXXX-OEM-0011903-00288 --- GMAX
*****-*****-9KVC2-3G43J-PG8J8 --- XXXXX-OEM-0011903-00339 --- GRANVILLE (P)
--- --- GREATWALL
--- --- HAIERCOMPUTER
--- --- HASEE
GJMY6-GMJHY-2VJ79-K67WT-KQHYT --- XXXXX-OEM-0011903-00166 --- HEDY
MK48G-CG8VJ-BRVBB-38MQ9-3PMFT --- XXXXX-OEM-0011903-00106 --- HEWLETT-PACKARD
--- --- HIGRADED
--- XXXXX-OEM-0011903-00114 --- HITACHI
DMY26-78CX9-Q89DP-Q8QK8-VF2B8 --- XXXXX-OEM-0011903-00107 --- IBM (*)
FWBGV-7FH9G-JT8XG-KW8DJ-XTXKJ --- XXXXX-OEM-0011903-00375 --- iQon (-H-)
J8J6D-YKK3T-XYPXB-HM6XY-R3VFW --- XXXXX-OEM-0011903-00267 --- ITWORKS
--- --- JVC
DYWP4-VDTPJ-R8292-7BPHC-4PCHQ --- XXXXX-OEM-0011903-00161 --- LAN PLUS
--- XXXXX-OEM-0011903-00130 --- Lanix Titan
--- XXXXX-OEM-0011903-00307 --- LBM Corporation
PWBPT-6PGKF-TP6MY-299P4-CPXQG --- XXXXX-OEM-0011903-00154 --- LEGEND
DMY26-78CX9-Q89DP-Q8QK8-VF2B8 --- XXXXX-OEM-0011903-00107 --- LENOVO (*)
V7D98-Q8F9G-J3CMG-GPM79-FPC73 --- XXXXX-OEM-0011903-00357 --- LG (-H-)
--- XXXXX-OEM-0011903-00116 --- Matsushita (*)
--- --- MAXDATA
RHVCR-99HD3-QYQR8-24PPB-W8PDT --- XXXXX-OEM-0011903-00126 --- MEDION
--- XXXXX-OEM-0011903-00162 --- METRON MMP
VPTW3-R83RH-KTC88-H6Y62-XQJBT --- XXXXX-OEM-0011903-00262 --- Micro-Star Int.
--- --- Mitsubishi
B268Q-CPQV3-J39GV-22C7P-2BGT8 --- XXXXX-OEM-0011903-00347 --- MOUSE Computer (*)
XVX72-2WCXQ-48VWH-T66HT-C7R2B --- XXXXX-OEM-0011903-00108 --- MPC CORP (*)
DG38C-RRJG2-WFM92-V2TVC-J2YBJ --- XXXXX-OEM-0011903-00323 --- MSI LAPTOP
R8P77-FM8RH-BFDCC-3BMCY-QGWPD --- XXXXX-OEM-0011903-00109 --- NEC & PACKARD (*)
--- XXXXX-OEM-0011903-00292 --- Olidata PC
KPYTK-8GQ24-BRQT7-J9TQQ-CY3C8 --- XXXXX-OEM-0011903-00151 --- Optima
--- --- OQO Inc
--- XXXXX-OEM-0011903-00116 --- PANASONIC (*)
QMTHB-JH96Y-TCPYX-BYK2J-FYGBW --- XXXXX-OEM-0011903-00199 --- PCTEK
M2C89-KJ928-B3F99-4RJX2-BP8QW --- XXXXX-OEM-0011903-00127 --- POWERSPEC
*****-*****-VPRFD-3Q8VF-78YXB --- XXXXX-OEM-0011903-00244 --- Quality Tech
JD7MG-HFR44-WTYKQ-7QFDD-Y2CQW --- XXXXX-OEM-0011903-00223 --- RoverBook
--- --- RTL&COEM
XVX72-2WCXQ-48VWH-T66HT-C7R2B --- XXXXX-OEM-0011903-00108 --- SAMSUNG (*)
--- XXXXX-OEM-0011903-00115 --- SHARP
RYTJ8-2T4TT-XW4JB-HRJ2D-2TBGB --- XXXXX-OEM-0011903-00112 --- SOTEC
G9KWG-CMC8K-KX9HW-YM6W9-XHR2G --- XXXXX-OEM-0011903-00110 --- SONY
BWHB6-Y8HQP-Y9HG8-7H3YG-WT79J --- XXXXX-OEM-0011903-00247 --- Soyo Computer
--- --- SYSFIC
QX2FC-F6K8H-9BCPG-3GKMR-Q7GYM --- XXXXX-OEM-0011903-00132 --- SYSTEMAX
GYQD9-RC4HM-PPVXR-47QFD-X8C9J --- XXXXX-OEM-0011903-00119 --- Targa (*)
--- --- TEKTRONIX
XPGYX-J7BF9-4YJVV-7MWK9-WQT3Y --- XXXXX-OEM-0011903-00160 --- TCL
XPGXX-7KWVQ-QR99R-2TDR7-M2CD8 --- XXXXX-OEM-0011903-00131 --- TIME COMPUTER (*)
PTQFW-DGY9V-CDVGC-9FVMV-B4P9Y --- XXXXX-OEM-0011903-00124 --- Tiny Computers
WDHPC-6WQPF-W3R3K-J2VF4-JFP8W --- XXXXX-OEM-0011903-00111 --- TOSHIBA
WV729-PTGQP-X3V7D-6876X-4GKRD --- XXXXX-OEM-0011903-00165 --- TOUR PC ?
DMY26-78CX9-Q89DP-Q8QK8-VF2B8 --- XXXXX-OEM-0011903-00107 --- TRIGEM (*)
KMHJF-9M82Y-YPFV7-YQHXH-F9JW8 --- XXXXX-OEM-0011903-00179 --- TSINGHUA TONGFANG
--- XXXXX-OEM-0011903-00237 --- Vobis
RHCPY-CCKQ9-CTK4J-JD3RT-8QVCG --- XXXXX-OEM-0011903-00238 --- VPR MATRIX



Missing Manufacture Names:

DFXP8-H8VT6-BFGK8-H6VWC-3WDBY --- XXXXX-OEM-0011903-00136 --- ?????
TQWYT-9XWBB-WM84R-4VKMP-MKVWT --- XXXXX-OEM-0011903-00142 --- ?????
TX7CQ-GBPRB-739DK-QRW8R-JFQ4M --- XXXXX-OEM-0011903-00360 --- ?????




XP PRO EDITION OEM SLP


BW2VG-XXDY6-VW3P7-YHQQ6-C7RYM --- XXXXX-OEM-0011903-00100 --- ACER
--- --- ACTEBIS
MXVK6-CVJR8-7XB27-J87Q4-4V4HY --- XXXXX-OEM-0011903-00228 --- ALIENWARE
--- --- AmericanFuture
--- --- AMOI
CXD6B-HTKB7-DVPWP-KTHH7-43TWQ --- XXXXX-OEM-0011903-00109 --- ASuS (*)
--- XXXXX-OEM-0011903-00221 --- ATComputers
TW8WB-MKT89-FRD3V-H6CGJ-6JW83 --- XXXXX-OEM-0011903-01809 --- BENq (-P-)
--- --- CICERO-Seanix
*****-*****-7YFDC-2V3KC-RR4QJ --- XXXXX-OEM-0011903-02843 --- Clevo Co (P)
KYKVX-86GQG-2MDY9-F6J9M-K42BQ --- XXXXX-OEM-0011903-00101 --- COMPAQ
*****-*****-MRYJ4-3769Y-HQ488 --- XXXXX-OEM-0011903-00179 --- Computer Tech Link (P)
*****-*****-D2M3J-DXBP3-JQ79Y --- XXXXX-OEM-0011903-02812 --- Cyberpower (P)
XJM6Q-BQ8HW-T6DFB-Y934T-YD4YT --- XXXXX-OEM-0011903-00102 --- DELL (*)
--- --- DIXONSXP
--- XXXXX-OEM-0011903-00192 --- ECS ELITEGROUP
BG6RK-BJ28X-4QTVT-T3BV2-C96V8 --- XXXXX-OEM-0011903-00103 --- EMACHINES (*)
*****-*****-FHT4C-VCFY8-3YRKM --- XXXXX-OEM-0011903-00248 --- EMAXS (P)
--- --- EPSON
HW8DV-GBVHT-YRPRK-RPDQ2-9K6XT --- XXXXX-OEM-0011903-00122 --- EQUUS
--- --- EVEREX
F4G2M-BH2JF-GTGJW-W82HY-VMRRQ --- XXXXX-OEM-0011903-00297 --- FOUNDER
--- XXXXX-OEM-0011903-00908 --- FRONTIER
GVVF9-44R2P-DHC42-QGVQV-R67RM --- XXXXX-OEM-0011903-00104 --- FUJITSU-PC (*)
C873T-F3X3M-9F6TR-J26GM-YTKKD --- XXXXX-OEM-0011903-00117 --- FUJITSU SIEMENS
PXQKT-6Y2TF-HHYGX-RFB48-YKVRQ --- XXXXX-OEM-0011903-00105 --- GATEWAY
--- --- GRANVILLE
FJXCH-4KYT3-XXJTH-4H848-FYP4D --- XXXXX-OEM-0011903-01861 --- GREATWALL (-P-)
--- --- HAIERCOMPUTER
--- --- HASEE
GVVF9-44R2P-DHC42-QGVQV-R67RM --- XXXXX-OEM-0011903-00104 --- HCL Infosystems (*)
--- XXXXX-OEM-0011903-00167 --- HEDY
DMQBW-V8D4K-9BJ82-4PCJX-2WPB6 --- XXXXX-OEM-0011903-00106 --- HEWLETT-PACKARD
--- --- HIGRADED
--- --- HITACHI
HCBR8-FGC2K-RY7BM-HM3KT-BKVRW --- XXXXX-OEM-0011903-00107 --- IBM
--- XXXXX-OEM-0011903-00902 --- iQon
--- --- JVC
*****-*****-TMHHJ-FWC6J-KW9Q6 --- XXXXX-OEM-0011903-00162 --- LAN PLUS (P)
FCDGH-QW3DJ-VBC6C-9BYTX-4GKQJ --- XXXXX-OEM-0011903-00155 --- LEGEND
HCBR8-FGC2K-RY7BM-HM3KT-BKVRW --- XXXXX-OEM-0011903-00107 --- LENOVO (*)
--- --- LG
TKYG4-YGQ8T-4B76T-K4MPF-TRD6M --- XXXXX-OEM-0011903-00116 --- Matsushita (*)
KPWY2-Y6VCB-GRKQG-MVH23-JQTW6 --- XXXXX-OEM-0011903-00114 --- MAXDATA
FVXK3-RP64M-Q3H9C-P4QKT-BKVVG --- XXXXX-OEM-0011903-00126 --- MEDION
MVF4D-W774K-MC4VM-QY6XY-R38TB --- XXXXX-OEM-0011903-02960 --- Microsoft
--- --- Mitsubishi
*****-*****-33X9X-KHR2B-7JRQ6 --- XXXXX-OEM-0011903-02950 --- MOUSE Computer (P)
--- --- Micro-Star Int.
CXD6B-HTKB7-DVPWP-KTHH7-43TWQ --- XXXXX-OEM-0011903-00109 --- NEC & PACKARD (*)
*****-*****-BKWFD-28XDQ-CY3TQ --- XXXXX-OEM-0011903-00277 --- OEGStone (P)
XM7BT-TXMJ8-Q38TY-WH9B6-FR4P8 --- XXXXX-OEM-0011903-02839 --- OQO Inc
FD4PM-TVGHD-3BC36-D3DPJ-FYF6Y --- XXXXX-OEM-0011903-00152 --- Optima
TKYG4-YGQ8T-4B76T-K4MPF-TRD6M --- XXXXX-OEM-0011903-00116 --- PANASONIC (*)
WRPKR-XB7PK-RJ4H3-MPJHM-PPXK8 --- XXXXX-OEM-0011903-00127 --- POWERSPEC
HXDYM-CPFJP-7VP7Q-98CRF-GVTDY --- XXXXX-OEM-0011903-00224 --- RoverBook
--- --- RTL&COEM
CXD6B-HTKB7-DVPWP-KTHH7-43TWQ --- XXXXX-OEM-0011903-00109 --- SAMSUNG (*)
--- --- SHARP
K4TDP-MGJ8D-YGF6X-9H3JM-W8PCM --- XXXXX-OEM-0011903-00112 --- SOTEC
Q9RV4-G448X-F4WJP-F69MX-YBQ46 --- XXXXX-OEM-0011903-00110 --- SONY
TFJMW-TGPQH-77PCH-8448V-XB3HG --- XXXXX-OEM-0011903-00190 --- SUPORTE TECNICO ?
--- --- SYSFIC
*****-*****-JCHBQ-TDVJT-V28RD --- XXXXX-OEM-0011903-00133 --- SYSTEMAX (P)
--- XXXXX-OEM-0011903-00382 --- Targa
--- XXXXX-OEM-0011903-00161 --- TCL
--- --- TEKTRONIX
--- --- TIME COMPUTER
--- --- Tiny Computers
WDWCD-QBBPF-YCFC7-4P6RP-H8YF8 --- XXXXX-OEM-0011903-00111 --- TOSHIBA
BG6RK-BJ28X-4QTVT-T3BV2-C96V8 --- XXXXX-OEM-0011903-00103 --- TRIGEM (*)
M68XC-TX2C9-PKK8H-GP8JH-RC8XB --- XXXXX-OEM-0011903-00180 --- TSINGHUA TONGFANG
--- --- VPR MATRIX





XP Professional 64 Bit Edition

FM634-HJ3QK-6QVTY-RJY4R-XCR9J --- XXXXX-OEM- --- Microsoft







XP MEDIA CENTER EDITION OEM SLP


M6YTH-FDKHY-P3F3J-WBWJV-7MVQ3 --- XXXXX-OEM-0011903-00865 --- ACER
--- --- ACTEBIS
KV4H8-8F2DT-J3PRX-YRQGY-WFTM6 --- XXXXX-OEM-0011903-00810 --- ALIENWARE
*****-*****-96KP4-4G6WX-G9CYW --- XXXXX-OEM-0011903-00807 --- AmericanFuture (P)
WPBTV-FHT4G-7WJJW-388TD-XFHMQ --- XXXXX-OEM-0011903-00837 --- AMOI (-H-)
VRJFM-B2DFH-Y3K8W-VB7PH-7MVYW --- XXXXX-OEM-0011903-00935 --- ASuS
--- --- BENq
--- --- CICERO-Seanix
HYHV7-W343F-9TCCK-JPCBM-B2FQ8 --- XXXXX-OEM-0011903-00803 --- COMPAQ (*)
--- --- Cyberpower
P8HY6-D3G46-RVF66-GP7VM-8CFT3 --- XXXXX-OEM-0011903-00825 --- DELL
*****-*****-33B24-FG24H-B4TVT --- XXXXX-OEM-0011903-00866 --- DIGITAL NETWORKS (P)
JKR2X-8TJFF-X6JKM-G3C24-K2QYW --- XXXXX-OEM-0011903-00839 --- DIXONSXP
*****-*****-T3H8R-4BVWQ-G6Y7D --- XXXXX-OEM-0011903-00829 --- ELITEGROUP (P)
--- XXXXX-OEM-0011903-00867 --- ELONEX
FGHVY-WGD2D-GDTF9-B9QW7-BBVH6 --- XXXXX-OEM-0011903-00806 --- EMACHINES (*)
--- --- EMAXS
--- --- EPSON
--- --- EQUUS
--- --- EVEREX
--- --- FOUNDER
VWW2Q-22YMY-W4VWC-GTX4Q-47BC6 --- XXXXX-OEM-0011903-00854 --- FUJITSU SIEMENS (*)
*****-*****-*****-*****-2P23J --- XXXXX-OEM-0011903-00827 --- FUJITSU-PC (P)
FGHVY-WGD2D-GDTF9-B9QW7-BBVH6 --- XXXXX-OEM-0011903-00854 --- GATEWAY (*)
--- --- GRANVILLE
--- --- GREATWALL
--- --- HAIERCOMPUTER
--- --- HASEE
--- --- HEDY
HYHV7-W343F-9TCCK-JPCBM-B2FQ8 --- XXXXX-OEM-0011903-00803 --- HEWLETT-PACKARD (*)
--- --- HIGRADED
--- --- HITACHI
--- --- IBM
--- --- iQon
--- --- JVC
--- --- LAN PLUS
VWW2Q-22YMY-W4VWC-GTX4Q-47BC6 --- XXXXX-OEM-0011903-00854 --- LEGEND (*)
VWW2Q-22YMY-W4VWC-GTX4Q-47BC6 --- XXXXX-OEM-0011903-00854 --- LENOVO (*)
--- --- LG
--- --- MAXDATA
PTVGT-CTW74-F84GF-3MPQY-X2Q2G --- XXXXX-OEM-0011903-00846 --- MEDION
--- --- Mitsubishi
--- --- MOUSE Computer
--- --- MSI
FJBM7-KW7G2-YXDGW-VHYVW-9QK9M --- XXXXX-OEM-0011903-00824 --- NEC & PACKARD
--- --- OQO Inc
--- --- PANASONIC
*****-*****-4WRDH-964JK-49M4M --- XXXXX-OEM-0011903-00808 --- POWERSPEC (P)
--- --- RTL&COEM
V37CQ-FRB7X-4MTGD-DBT9Y-HQ8D6 --- XXXXX-OEM-0011903-00802 --- SAMSUNG
--- --- SHARP
--- --- SOTEC
QC72Q-VWGKT-XC4Q9-W7RTD-7Q8G6 --- XXXXX-OEM-0011903-00826 --- SONY
--- --- SYSFIC
--- --- SYSTEMAX
--- --- Targa
CR8C9-M7QQG-FGJWT-CV666-4J3XG --- XXXXX-OEM-0011903-00822 --- TCL (-H-)
--- --- TEKTRONIX
--- --- TIME COMPUTER
--- --- Tiny Computers
VQBTX-HHK7C-DF4RC-97FHM-X2QW3 --- XXXXX-OEM-0011903-00817 --- TOSHIBA
QQ3J7-877X3-H4K68-XB7HB-3DMBT --- XXXXX-OEM-0011903-00838 --- TRIGEM
--- --- TSINGHUA TONGFANG
--- --- VPR MATRIX



XP TABLET EDITION OEM SLP


K967K-78T8H-D2VFR-CVF3Y-8CC2J --- XXXXX-OEM-0011903-00303 --- ACER
TJY2R-4CDXB-HGQWQ-TFP69-GGB6G --- XXXXX-OEM-0011903-00306 --- FUJITSU
--- XXXXX-OEM-0011903-00309 --- Fujitsu-Siemens
RBH2Y-KJJB4-HRT67-GG4WC-H82DD --- XXXXX-OEM-0011903-00377 --- Fujitsu
MVXGY-7R7YM-P7HQD-Y3QTT-DYRVJ --- XXXXX-OEM-0011903-00319 --- GATEWAY
MH24V-KM6KG-VB2B8-YFGM8-JCC2G --- XXXXX-OEM-0011903-00302 --- HEWLETT-PACKARD
XT67V-GY7FW-GR6FR-WDK2C-8T97J --- XXXXX-OEM-0011903-00799 --- Microsoft
*****-*****-M39CB-2RJWK-KK7KQ --- XXXXX-OEM-0011903-00313 --- Motion Computing (P)
BGXRF-VMHH4-9JXRY-9VJ3M-HQ6VY --- XXXXX-OEM-0011903-00356 --- OQO
FWB34-FWJ7X-9MRB2-923HK-MD6PQ --- XXXXX-OEM-0011903-00305 --- TOSHIBA
--- XXXXX-OEM-0011903-00311 --- ViewSonic

OEM Manufacturer oembios files
http://forums.mydigitallife.info/showthread.php?t=2127

February 6, 2009

How To Share Authentication Cookies across ASP.NET V1.1 and ASP.NET V2.0 Applications

ASP.NET V1.0 introduced a powerful forms-authentication model that provides the infrastructure plumbing necessary to issue authentication tickets to incoming browsers as http cookies, and then automatically decrypt them on each request so that you can identify who the incoming browser user is.

ASP.NET V2.0 has made this much more powerful and easier by providing built-in support for storing, managing and verifying username/password credentials using the new Membership system (so that you no longer need to manually create and validate usernames/passwords in a database). ASP.NET V2.0 also ships with a built-in role management system, as well as a suite of Login controls to enable you to declaratively authenticate and manage users on the system. This blog post I did from a few months ago goes into more detail on how easy it is to use this.

One of the questions I've been asked a few times is whether it is possible to share the forms-authentication ticket of a user between ASP.NET V1.0/V1.1 applications and ASP.NET V2.0 applications. Specifically, can you build a set of login/membership pages using ASP.NET V2.0 in a sub-application on a site (for example: www.mysite.com/login/), and then have the rest of the site (www.mysite.com, www.mysite.com/products, etc) which is still running on ASP.NET V1.1 pick up the logged in identify of the user when he or she browses those pages.

The good news is that you can. To enable the authentication identity to flow between the multiple applications (including different V1.1 and V2.0 ones), follow the below steps:

1) Make sure that you explicitly define the “validationKey” and “decryptionKey” attributes in the section of your applications’ web.config files. By default, these are configured to AutoGenerate/IsolateApps – which will end up generating separate unique keys in each application (which means that the decryption algorithm will not be able to convert a forms-authentication ticket issued from one application in another). By having them all share the same key value, the applications and encrypt/decrypt/validate cookie values can be read by each other.

2) In your ASP.NET 2.0 application(s), you’ll also then need to add the new “decryption” attribute to the element and set its value to be “3DES”. By default, ASP.NET V2.0 uses a new (stronger) encryption/decryption algorithm. Changing the value to be “3DES” will have it revert back to the older V1 behavior and allow the cookies to be shared.

Hope this helps,

Scott

P.S. Thanks and credit go to Stefan on my team for sending me the exact steps needed above.



http://weblogs.asp.net/scottgu/archive/2005/12/10/432851.aspx

January 25, 2009

تطبيقات الويب 2.0 وخصوصية المستخدم


العديد من مواقع الويب 2.0 تعتمد على مصطلح الشبكات الإجتماعية Social networking وتعتمد على ادخال البيانات والتشارك بواسطة المستخدمين وليس اصحاب الموقع نفسه .
موقع Facebook.com احد المواقع التي تعتمد بشكل رئيسي على إدخال المستخدمين للبيانات والتشارك بها ، وهو موقع خاص بالتعارف والأصدقاء .
عندما تقوم بتجربة الاشتراك في موقع فيس بوك لمدة شهر او اكثر تجد انه خلال هذه الفترة يقوم بعض الاشخاص بإضافتك ، بعضهم آخر مره تكون قد قابلته منذ فترة طويلة! وجميعهم اشخاص حقيقين تعرف معظمهم . شيء رائع ووسيلة رائعه للتواصل لكن ليست هنا المشكلة .
بإفتراض ان شخصا  ما عرف انك تعمل في شركة معينة ، واصحابك المضافين في فيس بوك هم فلان وفلان ، واراد ان يقوم بالتحايل عليك او الحصول على معلومات مهمة في الشركة التي تعمل بها ، ببساطة سوف يقوم بالاتصال عليك ويقول انه من طرف الشخص الفلاني ، او يذهب لمقر عملك ويقول اني من طرف فلان ودرست معه في الجامعة الفلانية واريد الحصول على كذا وكذا . ( يعرف هذا النوع من الاحتيال والاختراق بـ الهندسة الاجتماعية Social Engineering ، واشهر هاكر في مجال الهندسة الاجتماعية هو كيفن متنك ) .
او بافتراض انك سوف تقدم على وظيفة معينة وبمجرد البحث في هذه المواقع يستطيع الشخص الذي يقابلك معرفة سلوكك وحياتك العملية والدراسية واصدقائك ومعارفك بمجرد ضغطة زر .
مواقع اخرى يستطيع منها الشخص الذي يعرف اسم المستخدم الخاص بك ماتفضله من مواقعDel.icio.us او ماهي الصور التي تعجبك والمنطقة التي تسكن فيهاflickr.com ومايعجبك من مقالات ومواضيع Digg.com وما نوع الافلام والمقاطع التي تعجبك youtube.com .
في النهاية انا لا ادعو لعدم استخدام مواقع الويب 2.0 بل بالعكس هذه المواقع تعتبر ثورة وتحول هائل في مجال الانترنت ، لكن قد يكون رائعاً للاشخاص الذين لاتهمهم خصوصياتهم او انه لايمانع بان يكون اسمه وجميع تحركاته واضحة للجميع ، اما الشخص الذي يبحث عن خصوصيته فلايستغرب ان تضيع خصوصيته مع اشتراكه في مواقع الويب 2.0 .

January 22, 2009

Microsoft Windows XP Volume License Key (VLK)

Microsoft Windows XP Volume License Key (VLK) allows a single
product key to be used for multiple installations without having
to activate Window XP. I have been collecting these since 2002.

Tested

V2C47 MK7JD 3R89F D2KXW VPK3J

JG28K-H9Q7X-BH6w4-3PDCQ-6XBFJ

QF8XY-FGCWG-3V3QQ-4XTJC-JMT84



Untested

FM9FY-TMF7Q-KCKCT-V9T29-TBBBG

F6PGG-4YYDJ-3FF3T-R328P-3BXTG

QB2BW-8PJ2D-9X7JK-BCCRT-D233Y

DTWB2-VX8WY-FG8R3-X696T-66Y46

RBDC9-VTRC8-D7972-J97JY-PRVMG

BJXGH-4TG7P-F9PRP-K6FJD-JQMPM

22C7H-MWGPD-6KFXC-28D8F-F66TF

PCP4R-K78YH-4HBVT-KXMF3-P2DQ3

76DMY-V3TT4-3PDP7-GDM4Y-PWCG6

HRB26-KCP44-7BWJX-Q74DW-23C7V

WGPQH-CD6CB-6BBBC-YFG6C-9648T

MRGFM-KWV3V-F2BC4-VRJRM-JKMTK

DPD4T-C4243-RD7DK-C432X-4RXG4

8TRYR-2RYYW-YH347-7C2J2-DBYRV

6JR3P-3G3WR-GBP7B-YQRH8-9KFGH

2M4WV-8TCV4-VGQJF-DTRT3-G3MBB

DMV3H-K8YRF-QCMVM-823KK-B8737

VHCQG-JC2Q9-J4K36-CVFDK-KDT3J

KWl78-4D939-MRKK9-64W8C-CPF33

DW3CF-D7KYR-KMR6C-3X7FX-T8CVM

Q3R8Y-MP9KD-3M6KB-383YB-7PK9Q

RK7J8-2PGYQ-4P7VL-V6PMB-F6XPQ

JJWKH-7M9R8-26VM4-FX8CC-GDPD8

FCKGW-RHQQ2-YXRKT-8TGGW-2B7Q8

4F84D-KK827-XBHCP-2RXBR-FB89R

DMPXG-TH2MQ-CGMMH-JYW78-F8KC4

32RVH-BFG3X-TBKB3-6XFJR-F7H72

KPTHG-42CBP-BDVQP-VXGD4-4X6MV

3BTW4-KBTRV-3HQP7-4RKMR-91YPQ

BYDXC-2RRBM-T3FWY-2TMV6-BXWF2

PGT2F-V7HFQ-B2F6H-XVBQT-MQQ7M

FFVPH-BQY38-3HYGT-CWRFR-BP34G

3B844-TC2FF-76QFW-JWC4Q-978FP

RX34K-TDM23-V82H8-3GJXT-Bn/69

FM9FY-TMF7Q-KCKCT-V9T29-TBBBG


Official URL:
http://www.microsoft.com/windows/products/windowsxp/default.mspx

Install Notes

During installation, enter a key when you are prompted to do so.

Enjoy.

Windows XP OEM 激活码

我安装的版本是:2002年WINDOWS XP 中文专业版
因为系统重装,是正版软件,需要能过电话验证或传真,没有固定电话
想要激活码,谢谢!!!

我的PID中间是OEM




什么品牌的电脑
FCDGH-QW3DJ-VBC6C-9BYTX-4GKQJ XXXXX-OEM-0011903-00155 联想 LENOVO XP PRO SP1
XJM6Q-BQ8HW-T6DFB-Y934T-YD4YT XXXXX-OEM-0011903-00102 戴尔 DELL XP PRO SP1
BW2VG-XXDY6-VW3P7-YHQQ6-C7RYM XXXXX-OEM-0011903-00100 宏基 ACER XP PRO SP1
HCBR8-FGC2K-RY7BM-HM3KT-BKVRW XXXXX-OEM-0011903-00107 IBM IBM XP PRO SP1
DMQBW-V8D4K-9BJ82-4PCJX-2WPB6 XXXXX-OEM-0011903-00106 惠普 HP XP PRO
KYKVX-86GQG-2MDY9-F6J9M-K42BQ XXXXX-OEM-0011903-00101 康柏 COMPAQ XP PRO
- - - - XXXXX-OEM-0011903-00167 七喜 HEDY XP PRO SP1
ZM68XC-TX2C9-PKK8H-GP8JH-RC8XB XXXXX-OEM-0011903-00180 清华同方 THTF XP PRO SP1
F4G2M-BH2JF-GTGJW-W82HY-VMRRQ XXXXX-OEM-0011903-00297 方正 FONDER XP PRO SP1
- - - - XXXXX-OEM-0011903-00108 三星 SAMSUNG XP PRO SP1
- - - - XXXXX-OEM-0011903-00111 东芝 TOSHIBA XP PRO SP1
- - - - XXXXX-OEM-0011903-00161 TCL TCL XP PRO SP1
C873T-F3X3M-9F6TR-J26GM-YTKKD XXXXX-OEM-0011903-00117 富士通 FUJITSU XP PRO SP1
- - - - XXXXX-OEM-0011903-001 华硕 ASUS XP PRO SP1
K7RGC-CDXYJ-FTYH2-Y3VVV-KBYC7 XXXXX-OEM-0011964-38550 索尼 SONY XP PRO SP1
PWBPT-6PGKF-TP6MY-299P4-CPXQG XXXXX-OEM-0011903-00154 联想 LENOVO XP HOME SP1
RCBF6-6KDMK-GD6GR-K6DP3-4C8MT XXXXX-OEM-0011903-00102 戴尔 DELL XP HOME SP1
CXCY9-TTHBT-36J2P-HT3T3-QPMFB XXXXX-OEM-0011903-00100 宏基 ACER XP HOME SP1
DMY26-78CX9-Q89DP-Q8QK8-VF2B8 XXXXX-OEM-0011903-00107 IBM IBM XP HOME SP1
MK48G-CG8VJ-BRVBB-38MQ9-3PMFT XXXXX-OEM-0011903-00106 惠普 HP XP HOME SP1
KG27H-JV9M6-2CXKV-GMP22-HF2BQ XXXXX-OEM-0011903-00101 康柏 COMPAQ XP HOME SP1
JMY6-GMJHY-2VJ79-K67WT-KQHYT XXXXX-OEM-0011903-00166 七喜 HEDY XP HOME SP1
KMHJF-9M82Y-YPFV7-YQHXH-F9JW8 XXXXX-OEM-0011903-00179 清华同方 THTF XP HOME SP1
FK4VC-XP9C3-BD78M-68492-BP9BY XXXXX-OEM-0011903-00296 方正 FONDER XP HOME SP1
XVX72-2WCXQ-48VWH-T66HT-C7R2B XXXXX-OEM-0011903-00108 三星 SAMSUNG XP HOME SP1
WDHPC-6WQPF-W3R3K-J2VF4-JFP8W XXXXX-OEM-0011903-0011



xp系统因为30天激活问题锁死或者安装好的OEM版想转成VOL的解决方法


http://www.buyka.cn/blog/article.asp?id=124


写在前面的,本人遇到一机子情况是这样的,IBM的笔记本安装的是正版的联想的 OEM版winXP SP2,当然这样是没法激活的,开始打算通过DMICFG.EXE这个软件修改BIOS实现免激活,这种方法最简单也有效,但IBM的BIOS结构比较特 殊,DMICFG.EXE无法修改;于是就想到安装盘中OEM版和VOL版就几个文件不同,是不是直接替换就可以了呢?结果当然是失败。windows根 本不认账,看来是把微软想简单啦,于是通过覆盖激活信息文件wpa.dbl文件,修改注册表里面的Pid,还是没有成功!只好在网上找相关信息啦,其实我 已经很接近正确答案了,只是在wap.dbl文件的处理和注册表信息修改上不够彻底,不过最终还是搞定了!就把我的经历写出来供大家参考!当然我也是参考 了网上的相关资料的,这里要感谢共享这种方法的网友啦!

不论系统是否被锁死,都得有一张可以修改系统注册表的光盘,并可以覆盖相应文件。我这里用的是老毛桃的WinPE进行的,修改注册表用的是开始菜单-系统维护-注册表编辑器,覆盖文件就不用说啦!

如果你安装的是零售版或者是OEM版,没办法激活,系统已经被锁死或者没有锁死,但又不想重新安装系统(装软件是费时耗力啊)。你不妨试试这中方法,经我实践这种方法切实可行。

一、修复成vol的解决方案。(适合于修复sp1或sp2的简体pro版xp系统,Media center版除外!)
步骤1:
准备vol版的以下6个文件,并且将这6个文件复制到需要修复的系统 盘的相应目录下覆盖原文件:(如果需要修复的系统是sp1版的,需要再加一个文件:上海版sp1里面的winlogon.exe(无法直接覆盖,可以通过 DOS或者WinPE等覆盖)文件,附件里有!)pidgen.dll,dpcdll.dll,oembios.bin, oembios.dat,oembios.sig,oembios.cat
(友情提示:pidgen.dll,dpcdll.dll,oembios.bin,oembios.dat,oembios.sig这五个文件\ windows\system32目录下,oembios.cat这个文件\WINDOWS\system32\CatRoot\{F750E6C3- 38EE-11D1-85E5-00C04FC295EE}目录下)

步骤2:删除原来系统\windows\system32目录下的 wpa.dbl, wpa.bak(如果有)这两个文件。删除注册表HKEY_LOCAL_MACHINE\SYSTEM\下的wpa项,删除注册表 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion下的WPAEvents项(这两个键值是没法直接删除的,导入也不可以的,必须通过WinPE之类的系统修改)

步骤3:将附件里面的vol.reg文件导入需要修复的系统里!

二、修复成oem的解决方案。(适合于修复所有简体pro版xp系统,当然也包括Tabletpc版和Media center版,但是一定要在bios里加入与4个oembios文件相应的激活信息!比如联想LEGEND Dragon)
步骤1:
准备oem版的以下4个文件,并且将这4个文件复制到需要修复的系统 盘的相应目录下覆盖原文件:(如果需要修复的系统是vol版的,需要再加零售版的2个文件:pidgen.dll,dpcdll.dll,实际上vol版 是不需要修复的)oembios.bin,oembios.dat, oembios.sig,oembios.cat

步骤2:删除原来系统\windows\system32目录下的 wpa.dbl, wpa.bak这两个文件。删除注册表HKEY_LOCAL_MACHINE\SYSTEM\下的wpa项,删除注册表 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion下的WPAEvents项

步骤3:将附件里面的oem.reg文件导入需要修复的系统里!

友情提示:以 上操作需要您有一定的动手能力,所有操作在WinPE下面的erd commander 2003下完成!通过光盘启动进入erd commander 2003,在这个基础上进行编辑硬盘注册表的操作,erd commander 2003在雨浪飘零的扬州版,深山红叶的奥运版里面都有!由于需要从VOL版—OEM版的人很少,这里只提供方法,不提供相应的OEM.reg,可以自己 对照着VOL.reg修改的。

附件里的文件是vol.reg和上海版的winlogon.exe(SP2版)

点击下载此文件

Windows XP 激活原理是什么?

为什么同一电脑可以激活多次,而不同电脑则无法激活?


Windows XP 自从出道以后,流行在盗版市场上有许多版本,究竟谁才是真正的最佳版本,怎么才能脱逃一次次 SP 升级带来的激活问题,本文会给你一个完整的答案。

一、揭露市场上最流行版本的前世今生:

Pro 版 Windows XP 三种版本:OEM、零售、VOL 的详细比较。

因为有英文版三种 Windows XP Pro 的原版,所以从英文版开始比较。

(一)、原版。

1、“OEM”与“零售版”比较,发现有 5 个文件不一致,他们是:

OEMbios.bi_;

OEMbios.ca_;

OEMbios.da_;

OEMbios.si_;

SETUPPP.INI。

(SETUPPP.INI 的区别是在用记事本打开后:“Pid=”的后三位分别是 OEM,000)

2、“零售版”与“VOL”版比较,发现有 8 个文件不一致,他们是:

OEMbios.bi_;

OEMbios.ca_;

OEMbios.da_;

OEMbios.si_;

SETUPPP.INI;

dpcdll.dl_;

Pidgen.dll;

nt5inf.ca_。

这两个版本中的“nt5inf.ca_”释放后是“安全编录文件”,再进行详细比较后发现他们的“安全编录”完全一致。所以这两个版本的不一致文件实际上只有 7 个,他们是:

OEMbios.bi_;

OEMbios.ca_;

OEMbios.da_;

OEMbios.si_;

SETUPPP.INI;

dpcdll.dl_;

Pidgen.dll。

(SETUPPP.INI 的区别是在用记事本打开后“ExtraData=”后面的内容不一致,“Pid=”的后三位分别是:000,270)

3、IBM 的英文 OEM 和中文 OEM 进行比较,发现四个 OEMbios 文件是完全一致的。
4、各个版本的原版与升级 SP1 后比较发现:“dpcdll.dl_、Pidgen.dll”升级了,其他 5 个文件不变。

(二)、原版升级成 SP1 后;原版升级成 SP2 后,结论同上。(而且“nt5inf.ca_”也完全一致了)

(三)、类推到简体版。

1、用简体零售版打造简体OEM版。(类推到 SP1、SP2 .....)

用 OEM 版的四个 OEMbios 文件覆盖零售版中的相同文件,将简体版中的“SETUPPP.INI”用记事本打开后把 000 换成 OEM。

(没有做完全测试,“SETUPPP.INI”的替换有可能不行,但是国外已经破解了“SETUPPP.INI”,只要把相应零售版中的“SETUPPP.INI”用记事本打开后把“Pid=”后面的内容换成“82503OEM”就适用任何厂家的 OEM)

2、用简体零售版打造简体 VOL 版。

(1)、打造原版的 VOL。

没有原版 VOL 的“dpcdll.dl_、Pidgen.dll”,我没有能力打造。

(2)、打造 SP2 版的 VOL。

用 WinRAR 打开官方的 SP2 升级包,释放下面两个文件:“ipseldpc.dl_、ipselPid.dll”,把“ipseldpc.dl_”改名为“dpcdll.dl_”,把“ipselPid.dll”改名为“Pidgen.dll”,接下来把改好名的上面两个文件和英文 VOL 版中的四个 OEMbios 文件覆盖打了 SP2 的简体零售版 Windows XP,再把里面的“SETUPPP.INI”修改一下,把“Pid=”后面的内容改成:“51883270”。

国外已经破解了“SETUPPP.INI”,三个通用“Pid”分别是:

零 售:51882335;
O E M:82503OEM;
V O L:51883270。

OK 打造成功,测试成功,暂时起名为“Windows XP 北京政府 VLK 集成 SP2 版”。

(3)、打造 SP1 版的 VOL。

为什么先造 SP2 版的 VOL,再造 SP1版的VOL呢?不怕您笑话,打造失败!

January 8, 2009

iconv c++ 实现 字符 (语言) 编码 转换推荐精华锁贴

日志原文:http://worldant.blog.sohu.com/96069463.html

1. iconv


在LINUX上进行编码转换时,既可以利用iconv函数族编程实现,也可以利用iconv命令来实现,只不过后者是针对文件的,即将指定文件从一种编码转换为另一种编码。

(1) 利用iconv函数族进行编码转换

iconv函数族的头文件是iconv.h,使用前需包含之。
#include
iconv函数族有三个函数,原型如下:
  • iconv_t iconv_open(const char *tocode, const char *fromcode);
此函数说明将要进行哪两种编码的转换,tocode是目标编码,fromcode是原编码,该函数返回一个转换句柄,供以下两个函数使用。
  • size_t iconv(iconv_t cd,char **inbuf,size_t *inbytesleft,char **outbuf,size_t *outbytesleft);
此函数从inbuf中读取字符,转换后输出到outbuf中,inbytesleft用以记录还未转换的字符数,outbytesleft用以记录输出缓冲的剩余空间。
  • int iconv_close(iconv_t cd);
此函数用于关闭转换句柄,释放资源。

(2) 利用iconv命令进行编码转换

iconv命令用于转换指定文件的编码,默认输出到标准输出设备,亦可指定输出文件。

用法: iconv [选项...] [文件...]

有如下选项可用:

输入/输出格式规范:
-f, --from-code=名称 原始文本编码
-t, --to-code=名称 输出编码

信息:
-l, --list 列举所有已知的字符集

输出控制:
-c 从输出中忽略无效的字符
-o, --output=FILE 输出文件
-s, --silent 关闭警告
--verbose 打印进度信息

-?, --help 给出该系统求助列表
--usage 给出简要的用法信息
-V, --version 打印程序版本号

例子:
iconv -f utf-8 -t gb2312 aaa.txt >bbb.txt
这个命令读取aaa.txt文件,从utf-8编码转换为gb2312编码,其输出定向到bbb.txt文件。


2.iconv实现通用语言编码转换(c++)
可以实现对任意的两个iconv支持的语言编码做互相转换,比如GB2312, GBK, GB18030, UTF-8, UTF-16, BIG5等.
下面这段程序,非常的稳定,测试了超过10万行的数十种编码的文本的转换都没有出问题。

#include <stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<iconv.h>

#ifndef ICONV_CONST
# define ICONV_CONST
const
#endif

/*!
对字符串进行语言编码转换
param from 原始编码,比如"GB2312",的按照iconv支持的写
param to 转换的目的编码
param save 转换后的数据保存到这个指针里,需要在外部分配内存
param savelen 存储转换后数据的内存大小
param src 原始需要转换的字符串
param srclen 原始字符串长度
*/
int
convert(
const char *from, const char *to, char* save, int savelen, char *src, int srclen)
{
iconv_t cd;
char *inbuf = src;
char *outbuf = save;
size_t outbufsize
= savelen;
int status = 0;
size_t savesize
= 0;
size_t inbufsize
= srclen;
const char* inptr = inbuf;
size_t insize
= inbufsize;
char* outptr = outbuf;
size_t outsize
= outbufsize;

cd
= iconv_open(to, from);
iconv(cd,NULL,NULL,NULL,NULL);
if (inbufsize == 0) {
status
= -1;
goto done;
}
while (insize > 0) {
size_t res
= iconv(cd,(ICONV_CONST char**)&inptr,&insize,&outptr,&outsize);
if (outptr != outbuf) {
int saved_errno = errno;
int outsize = outptr - outbuf;
strncpy(save
+savesize, outbuf, outsize);
errno
= saved_errno;
}
if (res == (size_t)(-1)) {
if (errno == EILSEQ) {
int one = 1;
iconvctl(cd,ICONV_SET_DISCARD_ILSEQ,
&one);
status
= -3;
}
else if (errno == EINVAL) {
if (inbufsize == 0) {
status
= -4;
goto done;
}
else {
break;
}
}
else if (errno == E2BIG) {
status
= -5;
goto done;
}
else {
status
= -6;
goto done;
}
}
}
status
= strlen(save);
done:
iconv_close(cd);
return status;

}



附:关于iconv的能力

It provides support for the encodings:

European languages
ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R, KOI8-U, KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866}, Mac{Roman,CentralEurope,Iceland,Croatian,Romania}, Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh
Semitic languages
ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}
Japanese
EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
Chinese
EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS, BIG5-HKSCS:2001, BIG5-HKSCS:1999, ISO-2022-CN, ISO-2022-CN-EXT
Korean
EUC-KR, CP949, ISO-2022-KR, JOHAB
Armenian
ARMSCII-8
Georgian
Georgian-Academy, Georgian-PS
Tajik
KOI8-T
Kazakh
PT154, RK1048
Thai
ISO-8859-11, TIS-620, CP874, MacThai
Laotian
MuleLao-1, CP1133
Vietnamese
VISCII, TCVN, CP1258
Platform specifics
HP-ROMAN8, NEXTSTEP
Full Unicode
UTF-8
UCS-2, UCS-2BE, UCS-2LE
UCS-4, UCS-4BE, UCS-4LE
UTF-16, UTF-16BE, UTF-16LE
UTF-32, UTF-32BE, UTF-32LE
UTF-7
C99, JAVA
Full Unicode, in terms of uint16_t or uint32_t (with machine dependent endianness and alignment)
UCS-2-INTERNAL, UCS-4-INTERNAL
Locale dependent, in terms of `char' or `wchar_t' (with machine dependent endianness and alignment, and with OS and locale dependent semantics)
char, wchar_t
The empty encoding name "" is equivalent to "char": it denotes the locale dependent character encoding.
When configured with the option --enable-extra-encodings, it also provides support for a few extra encodings:
European languages
CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
Semitic languages
CP864
Japanese
EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
BIG5-2003 (experimental)
Turkmen
TDS565
Platform specifics
ATARIST, RISCOS-LATIN1
It can convert from any of these encodings to any other, through Unicode conversion.

It has also some limited support for transliteration, i.e. when a character cannot be represented in the target character set, it can be approximated through one or several similarly looking characters. Transliteration is activated when "//TRANSLIT" is appended to the target encoding name.




[参考]iconv
http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html
http://www.gnu.org/software/libiconv/

[参考]iconv实现通用语言编码转换
http://www.yuanma.org/data/2008/0503/article_3025.htm

[参考]linux下字符集编码转换轻松实现
http://blog.csdn.net/hnhbdss/archive/2007/11/30/1909456.aspx