Wednesday, 19 September 2012

How to check Malware injection in Code

To check Malware injection in your script/Code you can use a Web based Google Tool called “Webmasters Tools”

You can find it here Google Webmasters Tool

You just need to login with any of your Google Logins.
Click on  to add the Website to Google Webmasters Tools
After Adding the Website,You’ll get the below given screen.


Now,Download the HTML file and paste it into your root directory of your domain.
Next,Access the click to verify.
Later,Click on Verify.Now You are done adding your website to Google Webmasters.
Now,To check the injection just click on the Option “Health>>Malware” on left panel options.


Here you will find the files that are been injected.

When you click on the link/file where the Code has been injected.You get the below given screen


 Here you even get the injected script which later you can remove from the file.

How to improve internet speed on your Windows XP Desktop

Following steps will help you to improve the internet speed of Windows XP

Step 1:

Click Start => Run => type “gpedit.msc” without quotes and then press enter. A group policy editor will be opened.

Step 2:

Then go to: Local Computer Policy => Computer Configuration => Administrative Templates => Network => QOS Packet Scheduler => Limit Reservable Bandwidth (Double click on it)

Step 3:

When you double click on Limit Reservable Bandwidth it will say it is not configured. But the truth is under the ‘Explain’ Tab i.e.”By default, the Packet Scheduler limits the system to 20% of the bandwidth of a connection but you can use this setting to override the default.” So the trick is to ENABLE reservable bandwidth, then set it to ZERO. This will allow the system to reserve nothing, rather than the default 20%.

How to Change RDP Port

The setting for the Terminal Services port lives in the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp

Open up Regedit, find this key, and look for the the PortNumber value.

 Double click on the PortNumber setting and enter in the port number you wish to use. Unless you think in hex (pat yourself on the back if you do), you might want to click on decimal before entering your new port number.

 Or, you can use my creatively named VelocIT Terminal Services Port Changer application, which is available with source.  This is a simple five minute application that does one thing and one thing only. It allows you to change the port number that Terminal Services listens on.


Remember, all the usual caveats apply about tinkering with the registry. You do so at your own risk.

Connecting via Remote Desktop to the non-standard Port

Now that you have the server all set up, you need to connect to it.  This is pretty easy.  Suppose you change the port for the virtual machine to listen in on port 3900.  You simply append 3900 to the server name (or IP) when connecting via Remote Desktop.

Could not load type ‘System.ServiceModel.Activation.HttpModule’

Error:

Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.
Resolution

To resolve this issue, run the following from command line:

aspnet_regiis.exe /iru

The aspnet_regiis.exe file can be found in either

    %windir%\Microsoft.NET\Framework\v4.0.30319
    %windir%\Microsoft.NET\Framework64\v4.0.30319 (on a 64-bit machine)

Tuesday, 18 September 2012

Windows Login Error: An unauthorized change was made to Windows

After Log in to Windows Getting error  “An unauthorized change was made to Windows”

Resolution:

1) Click the option that launches an Internet Browser

2) Type: %windir%\system32 into the address field

3) Find the file cmd.exe

4) Right-click on cmd.exe and select Run as Administrator

5) Type:  cscript %windir%\System32\slmgr.vbs /ilc %windir%\System32\licensing\ppdlic\Security-Licensing-SLC-ppdlic.xrm-ms

6) Hit the Enter key

7) Reboot

Later,Go to your system options and Update your Windows License Key and also run if any Windows Updates are available.

Monday, 17 September 2012

How to Configure SmarterMail 9 site in IIS7

1. Connect via Remote Desktop


2. Start > Run > services.msc


3. Right-Click SmarterMail Web Server and Select Properties 

 4. Select Disabled from the Startup type drop-down, Click Stop and Click OK 


5.Close the Services window

6.Open IIS, Start > Run > inetmgr

 7. Select your Server Name and Double-Click ISAPI and CGI Restrictions 


8. For Each ASP.NET v4.0 entry Right-Click and Select Allow 

 9. Expand your Server Name, Right-Click on Sites and Select Add Web Site 

 10.Enter a site name e.g. SmarterMail

 11.Enter Physical Path to SmarterMail installation e.g. C:\Program Files (x86)\SmarterTools\SmarterMail\MRS

 12.Enter Port 9998 and Click OK 

 13. Select Application Pools 

 14. Right-Click SmarterMail application pool and Click Advanced Settings 

 15.Select v4.0 from the .NET Framework Version drop-down

 16. Set the Managed Pipeline to Integrated 


17. SmarterMail should now be accessible at http://127.0.0.1:9998 as well as http://1.2.3.4:9998 where 1.2.3.4 is your IP address

18. For attachments to work properly ensure the Network Service and IIS IUSR users have Modify permissions for the /MailProcessing and /App_Data folders usually located in C:\Program Files\SmarterTools\SmarterMail\MRS 


 

Back up all MS SQL databases at once

This article will discuss how to backup all MS SQL databases with one script. A separate file will be created for each database.
  1. Log into your server through Remote Desktop Connection.
  2. Open SQL Server Management Studio and select the server name.
  3. Click the New Query button and enter in the following data:
  4. DECLARE @name VARCHAR(50) -- database name 
    
    DECLARE @path VARCHAR(256) -- path for backup files 
    
    DECLARE @fileName VARCHAR(256) -- filename for backup 
    
    DECLARE @fileDate VARCHAR(20) -- used for file name 
    
    SET @path = 'C:\Backup\' 
    
    SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) 
    
    DECLARE db_cursor CURSOR FOR 
    
    SELECT name 
    
    FROM master.dbo.sysdatabases 
    
    WHERE name NOT IN ('master','model','msdb','tempdb') 
    
    OPEN db_cursor 
    
    FETCH NEXT FROM db_cursor INTO @name 
    
    WHILE @@FETCH_STATUS = 0 
    
    BEGIN 
    
     SET @fileName = @path + @name + '_' + @fileDate + '.BAK' 
    
     BACKUP DATABASE @name TO DISK = @fileName 
    
     FETCH NEXT FROM db_cursor INTO @name 
    
    END 
    
    CLOSE db_cursor 
    
    DEALLOCATE db_cursor 
    
  5. Make sure that the directory in the SET @path line exists. If the directory (in this case C:\Backup) does not exist, create the directory else the script will fail.
  6. Click the Execute! button and the script will execute.
  7. Once finished, a dialog box will appear stating such. Now all databases are backed up in C:\Backup with the database name as the file name.

    To take the full backup of all the databases in MS SQL server :

    1. Log into your server through Remote Desktop Connection.
    2. Open SQL Server Management Studio and select the server name.
    3. Click the New Query button and enter in the following data:
      -----------------------------------------------------------------
      DECLARE @BackupFile varchar(255), @DB varchar(30), @Description varchar(255), @LogFile varchar(50)
      DECLARE @Name varchar(30), @MediaName varchar(30), @BackupDirectory nvarchar(200)
      SET @BackupDirectory = 'C:\Backup\'
      --Add a list of all databases you don't want to backup to this.
      DECLARE Database_CURSOR CURSOR FOR SELECT name FROM sysdatabases WHERE name <> 'tempdb' AND name <> 'model' AND name <> 'master'
      OPEN Database_Cursor
      FETCH next FROM Database_CURSOR INTO @DB
      WHILE @@fetch_status = 0

          BEGIN
              SET @Name = @DB + '( Daily BACKUP )'
              SET @MediaName = @DB + '_Dump' + CONVERT(varchar, CURRENT_TIMESTAMP , 112)
              SET @BackupFile = @BackupDirectory + + @DB + '_' + 'Full' + '_' +
                  CONVERT(varchar, CURRENT_TIMESTAMP , 112) + '.bak'
              SET @Description = 'Normal' + ' BACKUP at ' + CONVERT(varchar, CURRENT_TIMESTAMP) + '.'

              IF (SELECT COUNT(*) FROM msdb.dbo.backupset WHERE database_name = @DB) > 0 OR @DB = 'master'
                  BEGIN
                      SET @BackupFile = @BackupDirectory + @DB + '_' + 'Full' + '_' +
                          CONVERT(varchar, CURRENT_TIMESTAMP , 112) + '.bak'
                      --SET some more pretty stuff for sql server.
                      SET @Description = 'Full' + ' BACKUP at ' + CONVERT(varchar, CURRENT_TIMESTAMP) + '.'
                  END   
              ELSE
                  BEGIN
                      SET @BackupFile = @BackupDirectory + @DB + '_' + 'Full' + '_' +
                          CONVERT(varchar, CURRENT_TIMESTAMP , 112) + '.bak'
                      --SET some more pretty stuff for sql server.
                      SET @Description = 'Full' + ' BACKUP at ' + CONVERT(varchar, CURRENT_TIMESTAMP) + '.'
                  END
                  BACKUP DATABASE @DB TO DISK = @BackupFile
                  WITH NAME = @Name, DESCRIPTION = @Description ,
                  MEDIANAME = @MediaName, MEDIADESCRIPTION = @Description ,
                  STATS = 10
              FETCH next FROM Database_CURSOR INTO @DB
      END
      CLOSE Database_Cursor
      DEALLOCATE Database_Cursor
      -----------------------------------------------------------------
    4. Make sure that the directory in the SET @path line exists. If the directory (in this case C:\Backup) does not exist, create the directory else the script will fail.
    5. Click the Execute! button and the script will execute.
    6. Once finished, a dialog box will appear stating such. Now all databases are backed up in C:\Backup with the database name as the file name.