Jul 27
VN:F [1.6.7_924]
Rating: 5.7/7 (3 votes cast)

Recently I created an IM BOT that works with GTalk, Yahoo Messenger, Windows Live and other popular instant messaging clients.

To create your own IM Bot you need to have some very basic programming skills. You can use any programming language, I prefer PHP. You also need to have web space to host your bot.

For example, I have created a Twitter Bot that can be used to tweet in your twitter account using any IM client.

If you like to write a personal IM bot, just follow these simple steps:

Step 1: Register at Imified

Step 2: Create your Bot which is just a simple script which resides on your webserver. It can be in any programming language.

Step 3: Copy the path of your script in the clipboard shown below.

Imified

Your Bot is ready to serve now.

The script I wrote is self-explanatory.
Just Add Tweetbot@bot.im in your IM client to try it.

//Twitter.PHP
require('TwitterAPI.php');

if($_REQUEST[('value'.($_REQUEST['step']-1))]=="reset")
{
	echo " start all over again now ";
}

else if($_REQUEST[('value'.($_REQUEST['step']-1))]=="?")
{
	echo " Hi, I am a Twitter Bot, you can tweet and see friend's timeline using me.
 type 'reset' to start again at any stage.";}

else{

	switch ($_REQUEST['step'])
			{
				case 1:
				echo "Enter Twitter UserName:";
				break;

				case 2:
				echo $_REQUEST['value1'];
				echo ",Enter Your Password, dont worry I dont store your password:";
				break;

				case 3:
				echo "Thankyou for submitting details
                                        Type 'tweet' to post a tweet and 'friend' to see friend's timeline";
				break;

				case 4:
				if (trim($_REQUEST['value3']," ")=="tweet")
				{
					echo "Enter Message to tweet";
				}

				else if($_REQUEST['value3']=="friend")
				{
					echo "I am working on this function, will publish it soon";
				}
				else
				{
					echo "enter correct choice ";
				}
				break;

				case 5:
				$result=tweet($_REQUEST['value1'], $_REQUEST['value2'], $_REQUEST['value4']);
				echo $result;
				}

}

No, This is not the only code you require. We need to use Twitter API as well, I have put that code in a seprate file.
You can make a number of Applications using different Open APIs

//TwitterAPI.php
function tweet($username,$password,$message)
{

// The twitter API address
$url = 'http://twitter.com/statuses/update.xml'; 

// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password"); 

$resultArray = curl_getinfo($curl_handle);

    curl_close($curl_handle);

    if($resultArray['http_code'] == "200")
		{
    $result="Yipee, Check your profile ";
		}
	else
		{
		 $result="Error , Username or Password is not correct ";
		}
	return $result;
}

Learn How To Use Imified API
Happy Coding!

Tagged with:
Apr 01
VN:F [1.6.7_924]
Rating: 1.0/7 (1 vote cast)

cyber-threat

1. Collaboration Tools

Tools that help people collaborate i.e. IM, IRC, Social Networking Sites, Video Conferencing, and White Boards. Users can expect to see a surge of attacks through collaboration tools, as membership continues to increase. These tools will help cyber criminals in stepping up to hit interactive social networking site with unsolicited e-mail and malicious links. Ignorance about clicking on an ‘interesting link’ will be exploited by the bad guys on internet.  The cases of identity theft, cyber-stalking, cyber-bullying and cyber-extortion are expected to rise. At the corporate level, this may give rise to increase data theft from corporate databases.

2. Virtualization

Now a day’s companies are using virtual environments to reduce cost, save space and to increase convenience for their employees. Virtualization includes running a platform (Linux) on a different platform (Windows). But virtualization makes the security more complicated as it introduces an extra layer that must be secured. Now we have to secure both Virtual machine and the physical machine.

3. BotNet

A bot planted on the machine, maintains a command and control mechanism to enable communication with its master. A large number of such bots under command of the same master becomes a “bot army“ that has considerable computing power to engage in a variety of malicious activities including data theft, DoS attacks, spam delivery, NDS spoofing , to name a few.

4. Cyber Warfare

The low cost associated with launching cyber attacks as compared to physical attacks, the likely deniability of crime committed on the internet and the lack of international cyber laws to resolve conflicts between nations, are the main reasons for many governments mentoring cyber warfare. The vulnerability in systems , user ignorance and overdependence on outsourcing agencies are likely to be the main reason for the success of cyber warfare. The cyber attacks that occurred between Russia and Georgia in 2008 are indicators for military cyber engagements in 2009 and beyond.

5. Phlashing attacks

The attacks on network devices (router, switches etc) and other hardware systems that rely on firmware to contain OS related problems are likely to increase. In this type of attacks, hackers upload nonauthentic firmware to devices under the guise of original firmware updates. However this malicious firmware provides a back door into a network or permanently disables the devices. This may result to completely denial-of-service attacks.

6. Wireless Risks

Wireless will continue to be a big threat in 2009. Insecure protocols, easy accessibility, lack of strong encryption and authentication and more importantly, user ignorance are the main reasons for the increase in wireless risk.

7. Threats due to Green Computing

Using computing resources efficiently is certainly a good thing. But extra care should be taken while recycling computer resources, for example it can expose your data to a stranger if you don’t ensure that the hard drives have been completely wiped.

8.  Cloud Computing

Cloud computing is a buzzword these days.  It is a style of computing in which resources are accessed as a service over Internet. In this technology all of your resources are kept in terminals that are placed somewhere else. But when your data is placed somewhere else you can’t ensure the security of your data from everyone else out there.

9. Insider Threat

The financial meltdown and resulting lay-offs may fuel employee discontent, to cause serious threat to corporate networks and data theft.

10. Risk for OS other than Windows

Linux is safer than Windows. Is it true?
The reason Linux enjoying this reputation is Linux is not much popular as Windows is. Major portion of desktop OS market is acquired by windows. But as the popularity of Linux will increase, attention of bad guys toward Linux will also increase. There will be more targeted attacks on Linux in coming years.

Tagged with:
Mar 27
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

When I say “Fastest”, I mean fastest in anyway like a drag bike. So does guys from HostMySite.com. They said that they have created a World fastest server which is actually a customized fully electric Drag Bike that can go from 0 to really fast within 2 seconds. They are also hosting a contest on CodeProject.com.

World Fastest Server

World Fastest Server

See the evolution of this bike in this full album. Wendy and Matt have taken their fun interview at SXSW, checkout it here.

Tagged with:
Feb 16
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

If you are running a ADSL or ADSL2 Modem and your internet connection is not working, here are some basic steps which you can follow before calling any techsupport guy.

These Steps worked for MTNL, BSNL, Verizon, AOL and other telecom companies which provide internet connection through a phone line.

Broadly Internet connection does’nt work due to two reasons
1. Your modem is not getting proper signals from the central office or Telephone Exchange.  (No Synchronisation)
2. Connection between your modem and computer is not fine. (No Route)

How to Recognise if there is a No sync or a No Route.
Thumb rule is if DSL or Link or Ready light on your modem is Solid green it means that your modem is in sync with central office and getting proper signals. If DSL or Link or Ready Light on your modem is blinking then its No Sync.

Troubleshooting guidlines for No Sync.
Restart the Modem before doing anything else.
1. Check if there is a Dial tone in the phone line….If not call your phone provider.
2. Check if your modem is connected properly to the phonejack via a phone cable….Try to    swap the ends of the phone cable.
3. Check the modem is connected directly to the phonejack without any filter or splitter thing.
4. There should be a filter on all the analog devices which are working on the same phone line ex. Fax machine, Answering Machine etc. except MODEM (Modem should not be connected via a filter.

TroubleShooting guidlines for No Route.
1. Restart the modem
2. check the physical connection between modem and computer. Ethernet or Data light should be green on your modem

3. Ipconfig -Click Start > Run > Type “cmd” and click OK
and in the black screen type “ipconfig” and hit enter key.

IP Address………..192.168.1.11
Subnet Mask……….255.255.255.0
Default Gateway……192.168.1.1

(if could’nt get these results check the ethernet adapter and try to reinstall the drivers for the ethernet card)

4. Configure Modem.
Open the GUI of the modem by typing the default gateway of the modem in the Address Bar of  IE or any other browser.
Put the Username and password provided by your ISP.

5. Ping google.com or any other website.

Click Start > Run > Type “cmd” and click OK
and try to “ping google.com
If google is pinging you are good to go online.
If google is not pinging then try to ping google by its IP Address

6. ping 74.125.67.100
if google is pinging by the IP address and not by google.com
then go to Run> type “services.msc”> and click ok
and restart “DHCP Client” and “DNS Client”

7. Check TCP\IP Settings

“Lan connection > Properties > Internet Protocol (TCP/IP)”  and click on “Obtain an IP Adresss automatically”.

8. Reset Socket files….God Command to fix your internet connection!
Click Start > Run > Type “cmd” and click OK
and type “Netsh Winsock Reset Catalog”

and then restart the computer. (This command runs only on windows XP SP2 or Higher Versions)

9. Disable any firewall or any other Antivirus……Happy Browsing. :)

Tagged with:
Dec 24
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

I bought a new HP Compaq Presario 707TU Notebook few days back. To my surprise there was no driver CD comes with it. I installed Windows XP Professional Edition in it and couldn’t find the driver on HP’s website.  They have only provided the drivers for Windows Vista Operation System. Later, I found that there are so many people having the same issue.
Now the best part is that, today, I got all drivers for it. Thanks to HP Technical help desk. Here are the links to download the drivers. Please remember that these drivers are for window XP OS. You can find the driver for windows Vista on the HP website.

Video driver:
http://downloadmirror.intel.com/14388/a08/win2k_xp14311.exe

Chipset driver:
http://downloadmirror.intel.com/13799/eng/ChipUtil.exe

Realtek RTL8100CL/RTL8110Sb NIC Driver:
ftp://ftp.hp.com/pub/softpaq/sp30001-30500/sp30156.exe

Realtek RTL8139/810x Family Fast Ethernet NIC Driver:
ftp://210.51.181.211/cn/nic/Driver_5671_XP_0703.zip

Intel Pro Wireless:
ftp://ftp.hp.com/pub/softpaq/sp33001-33500/sp33404.exe

Now Audio Drivers,
This model of Presario has an audio controller that supports the high definition audio. You need to have Microsoft Universal Audio Architecture (UAA) Bus Driver for High Definition Audio installed on the computer before installing the audio driver. Here is the link for the Microsoft Universal Audio Architecture driver that needs to be installed before installing the audio driver:  ftp://ftp.hp.com/pub/softpaq/sp33501-34000/sp33867.exe

After the installation of above drivers install the following drivers
Conexant CX20549-12 High Definition Audio driver:
ftp://ftp.hp.com/pub/softpaq/sp36001-36500/sp36090.exe

Here are the installation instructions for installing the above piece of audio driver:
After extracting sp36090.exe, follow these steps

  1. Click on Start and select Run. Now type devmgmt.msc and press enter.
  2. Right click on “Audio device on High Definition Audio Bus” and click Update driver.
  3. Select “Install from a list or specific location”
  4. Click Next. Then select “Don’t search, I will choose the driver to install”
  5. Click Next and then select “Sound, video and game controller” from the list.
  6. Click Next and then click Have Disk.
  7. Click Browse C:\sp36090 folder and the double click the V32 folder. Select the .inf file, click open and Continue with the onscreen instructions.

Similarly install Modem Drivers given below

Conexant CX20548 Modem Driver for Microsoft Windows XP:
ftp://ftp.hp.com/pub/softpaq/sp36001-36500/sp36089.exe
HP Help and Support for Microsoft Windows XP:
ftp://ftp.hp.com/pub/softpaq/sp36501-37000/sp36545.exe

We have finished with all the XP drivers that are needed to be installed on your notebook. I believe the above will help you too.

Tagged with:
Dec 23
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

I have just finished modifications in my first dasBlog macro. This macro will add a shout-box to the dasBlog (see it on the right side of this blog). I have tested it successfully with Firefox and IE 5.5+. This macro is written for new version of dasBlog (version 2.0 – supports .Net framework 2.0). If you want to add this custom macro to your dasBlog, make sure you are using new version dasBlog 2.0.

On the best part, this macro uses Ajax to update the entries. It can refresh itself after a specified interval using Ajax calls. You can disable this behavior if you don’t want to update it silently. I have used XML to store the entires in a file on the webserver. So there is no need to bother about database. To make the look and feel for more controlled and customizable, I have added CSS support to shoutbox.

Here are few steps that will help you to add this macro to your blog. But before download macro and extract the zip file on your hard-drive.

1. After extracting, copy aakashjain.dll into the bin directory of your blog.

2. Now, edit the web.config file of your dasBlog application to make the following changes.

a) Uncomment or Add the following code in the <configuration>/<configSections> of web.config file.

b) Add or uncomment the following lines under the <configuration>.

    

c) Add  the following line under the <httpHandlers> section of web.config.

d) One more setting is to be done. We need to tell dasBlog about the XML file where our entries will be stored. For this you have to create a key under <configuration>

    

The above piece of code add a key “AakashJainShouts” to specify the location of XML file in which all entries of shoutbox will be saved. I have chosen content directory to save the xml file in the code above. You can specify any directory on the webserver but make sure it should have write permission.
Now add the following line in your homeTemplate.blogtemplate file at a suitable place where you want shout-box to appear. (You can find this file in the current theme folder of your blog.)

<%AjShoutBox(max char,refresh interval,max entries)|AJmacros%>

Here is the description of each parameter,

max char (int) – Maximum number of characters allowed to enter in the message textbox of shoutbox. For name this is fixed to 30 characters.

refresh interval (int) – Enter the number of seconds when the shoutbox will update from new server. If you want to disable this feature enter anything less than 5.

max entries (int) – Maximum number of entries shown at a time in shout-box.

For instance – <%AjShoutBox(150,50,30)|AJmacros%>
(In this example shoutbox will be refreshed in 50 seconds, upto last 30 entries will be shown and only upto 150 characters can be entered in the message.)

Now lets move to style part of shoutbox. After the above settings you would like to apply some styles and colors to shoutbox to match with your blog theme. For this matter I have kept all style related code in a separate style-sheet (ajshoutbox.css). You can find this stylesheet in the download package. To attach this stylesheet to your blog enter the following lines with in the <head> section of your homeTemplate.blogtemplate file.

(You can keep the stylesheet file in any directory on your web server but I’d recommend the image directory of dasBlog. Attribute “href“ specified the path of CSS file.)

Ok, now this shoutBox is ready to run on your blog. If you have any comments or suggestions please feel free to post them here.

Tagged with:
Aug 16
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

Finally, much awaited dasBlog v2.0 is released.  I have been waiting this for a long time. The new version can now be hosted on ASP.Net 2.0 with Medium Trust. (download dasblog v2.0)

In the past, dasBlog can be hosted on Asp.Net 2.0 but only with Full Trust. This limitation of dasBlog create hosting issues as most of hosting companies doesn’t allowed .Net applications to run with Full Trust for security sake. Those who have faced this trust problem know what this new version mean (figured out in my previous post.) This release completely supports Asp.Net 2.0.  Now I can integrate those application which I wanted to but couldn’t due to the version incompatibility.

Umm, I got some work this weekend. :-)

Tagged with:
Jul 17
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

This weekend I have added some Technical Interview questions in my site. This part is still in progress. I could have added them much earlier but there was some URL Rewriting problem. Anyway I have published them without using URL Rewrite module.
You can checkout that part here – .Net Interview Questions (removed)


ASP.Net Inverview Question

Vb.net Interview Questions

.Net Framework

Tagged with:
May 27
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)


If you want to uninstall the windows vista operation system, then you wouldn’t be happy to know that there is no uninstalling option for Windows Vista. Yes, the Windows Vista installation is permanent. You cannot uninstall windows Vista from Add/Remove Programs.  In case of dual boot, most importantly you will have to restore the MBR to what it was before installing Windows Vista. Like in my case, I have windows XP installed on my Desktop PC and I install this Beta Trial version of Windows Vista.
(Windows Vista uses different mechanism to boot the system. Earlier OS have been using NLTDR but in the case of Windows Vista it is BOOTMGR.)
In any case, if you want to remove the Windows vista from dual boot system, follow the following steps I Performed for the same.  Remember it is not a task for faint hearted.
Given below are the steps I performed to remove the Windows Vista from my PC.

  1. Boot the computer in to Windows XP.
  2. Insert the Windows Vista DVD in the DVD Drive.
  3. Go to “Start” and “Run”. Type in “d:\boot\bootsect.exe /nt52 ALL /force” (without quotes, d: is the DVD drive letter.).
  4. Restart the computer, and you will notice the boot selection menu is gone.
  5. Format the partition/drive where you had Vista installed.
  6. Remove two files (Boot.BAK & Bootsect.BAK) on XP root folder (C:)

Note. Bootsect.exe is a utility by Microsoft which updates the master boot code for hard disk partitions in order to switch between BOOT MGR and NTLDR. You can use this tool to restore the boot sector on your computer.

You can type “bootsect /help” for more detailed explanation of usage.

Performing the above step helps in returning to the previous state, when I didn’t installed the Windows Vista.

Tagged with:
Jan 24
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)


Here is a step by step walkthrough to setup dasBlog on Godaddy. But before let me tell you that dasBlog is a ASP.Net weblog application. It runs on .Net1.1 framework and maintains all its data and settings in XML files stored in a folder on the server. So there is no need of any database tool. dasBlog adds lots of additional features like Trackback, Pingback, Mail notifications. It’s a true weblog engine with lots of features and themes to use.

Setting up dasBlog is really very easy task, you will know it shortly. You can go through these generic notes provided by dasBlog (http://www.dasblog.info/SetupInstall.aspx )

Now once you have been through with the notes above, let’s go further with these steps to setup your dasBlog on Godaddy.

Upload all the files in dasblogce folder to your web server. You should keep the same structure of file and images. Any change in that may cause your web application not run properly.

[Note: Before uploading your files, make sure you have made the necessary changes the site.config file (as instructed in turorial). You need to change the <Root> value to your Blog root directory.]

You can upload the files in a new folder or in your root folder. Ex – If suppose you want to add your blog to this path (http://www.yoursite.com/blog) then you need to create a blog directory in the root and upload all contents of dasblogce in the blog directory.

After you finished uploading, open the hosting manager given by Godaddy and click on the “Directory Management”. This will brings up a new screen where you can create new directory and set the permission to the directories.

You need to set the write permission to the following directories:

  • Content
  • SiteConfig
  • Logs

To create and set permission to the directory click on the “Create Directory” Button, it will bring up the new screen given below

Enter the directory name and check on the “read” and “write” checkboxes.

Your screen should look like this:

Click on the “Continue” button. Confirm your changes by clicking on “Add” button in the next screen.

Repeat the same steps SiteConfig and logs directory

[Note: You may also need to set the permission on content\binary directory. For this you can create a sub directory under content and set the permission as we have done above. Binary directory is used to store the images and files attached with your post.]


Now don’t jump in hurry, allow sometime so that changes get applied. This is require by godaddy.

Once all above is done your application is ready to run online.

Here one thing I like to mention is that you need to set your hosting account to use ASP.Net1.1. You cannot run this weblog with ASP.Net2.0 on Godaddy. This is due to some security reasons. dasBlog require Full level of trust to run under ASP.Net2.0 but Godaddy doesn’t allow applications to run on the high/full level trust on shared hosting.
[Update: Now there is a newer version available that supported on Asp.Net 2.0 with medium trust.]
Tagged with:
preload preload preload