Sunday, 24 June 2012

Flash Punisher Plugin For Counter Strike Server [New Release]

Recently I wrote a small AMX Mod X plugin that kills the player who throws flashbangs in counter strike and this post provides the plugin and source code of the plugin for the download.

Why this plugin

Well there are probably few other flash bang punishment plugins already available for download but all I needed was a minimal plugin that would just kill the flashbanger and prevent the effect of the flashbang to other players.

At the first look, the plugin may sound stupid but we play a lot of aa_dima map and few players were continually throwing the flashbangs. There are several maps which are meant to be played by making use of shooting skills that the use of flashbangs. But some people never understand.

I chose to have death as the punishment because that would be the worst punishment any player would expect. And, they will surely be not throwing flashbangs in next rounds.

Download flash_kill.amxx

Or check the Github Repos of Flash Punisher.

Installation is similar to other plugins. Copy the flash_kill.amxx file to cstrike/addons/amxmodx/plugins/ and add a new line "flash_kill.amxx" (without quotes) in the cstrike/addons/amxmodx/configs/plugins.ini.

tg_flashpunish 0 - prevent the killing of player on throwing flashbang.
tg_flashpunish 1 - the plugin shows its effect i.e. the player dies on throwing flashbang.

I hope this plugin becomes useful to some of you guys. :)


Saturday, 16 June 2012

IP Address Based Restriction Using Htaccess File

Sometimes you need to restrict access to files in your webserver to certain IP address or IP range only. In such case, you can apply a simple .htaccess rule and this post provides an information on how to make IP based restriction Using .htaccess.

First, be sure to enable use of htaccess in apache in your distro.

An example of .htaccess file that will block requests from all IP addresses but the subnet of is as below:

<limit GET>
order deny,allow
deny from all
allow from 192.168

Similarly, an example of .htaccess file that will allow requests from all IP addresses but the subnet of is as below:

<limit GET>
order allow,deny
allow from all
deny from 192.168

You can also specify the individual IP addresses instead of the entire subnet according to your need. Also, note that there should be no space after the comma between allow,deny.

Once you create the .htaccess file, make sure you've provided proper permission to it.

samar@Techgaun:/var/www/samar$ chmod 0644 .htaccess

Once you have made the .htaccess file and provided the proper permission, you might need to restart the apache server(but per directory .htaccess does not require reloading the apache in most cases) so that new configurations will show an effect.

samar@Techgaun:/var/www/samar$ sudo service apache2 reload

I hope this comes handy :)


Friday, 15 June 2012

NCell Introduces Ncell Sapati For Credit Based Recharge

Everytime ncell introduces a new service, it understands what its customer are looking for. Sometimes Recharging your phone becomes imposslible due to outreach of shop , sometime it may be late night or too early , reaching for the card sounds tough. But now ncell has extended it service by introducing Ncell sapati.

To get Ncell sapati of Rs. 20 as main balance, you will have to dial *9988#. You will be charged an extra amount of Rs. 2(Exclusive of VAT and additional taxes) while using this service.

More information is available through IVR by dialing 9980 or play the audio below to hear the full instruction.

This service will come handy lots of time to lots of customers so I welcome this service introduced by Ncell. :)


How To Enable Use Of Htaccess In Apache In Ubuntu

This How To provides a detail on how to enable use of .htaccess file in apache in ubuntu and the similar flavors of linux distribution.

To enable use of .htaccess, you can edit the /etc/apache2/sites-available/default file. Search for the portion which contains the following lines or something similar to that(The bold line is almost always present):

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

All you have to do is change the bold line above to:

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

Now you will need to restart the apache service so that the effect of change in configuration takes place. Enter the following command to restart the apache service:

samar@Techgaun:~$ sudo service apache2 reload

Now your .htaccess files will start to work in ubuntu. :)


Recover Deleted Files From An NTFS Volume Using Ntfsundelete

Ntfsundelete is a part of ntfsprogs, a suite of NTFS utilities based around a shared library. It lets us recover the deleted files from any NTFS volumes without making any changes in the NTFS volume itself.

Generally when a file is deleted from disks, it is some kind of pointer to the physical file that gets deleted and the actual content still remains in the disk unless it is overwritten by new files so it is possible to recover those files.

ntfsundelete has three modes of operation: scan, undelete and copy. By default, it will run in the scan mode which simply reads an NTFS volume and looks for the files that have been deleted.

To use ntfsundelete, you'll have to install the ntfsprogs suite with following command in ubuntu and debian-based distros:

samar@Techgaun:~$ sudo apt-get install ntfsprogs

You'll have to first figure out which drive you want to recover. A handy command for this is:

samar@Techgaun:~$ sudo fdisk -l

Once you know the NTFS volume you want to recover, you can first run the scan mode to list the filenames that can be recovered.

samar@Techgaun:~$ sudo ntfsundelete /dev/sda4

The optional -f switch can be specified for the forceful scanning. There is a nice percentage field which gives the information on how much of the file can be recovered. You can apply the time and percentage filters to scan specific files. For example, you can use the following command to search for the files which can be recovered 100%

samar@Techgaun:~$ sudo ntfsundelete -p 100 /dev/sda4

And, you can apply the time filter to list the files altered/deleted after the specified time. For example, following command will scan and list the files deleted in the last 14 days.

samar@Techgaun:~$ sudo ntfsundelete -p 100 -t 2d /dev/sda4

Other suffices you can use are d, w, m, y for days, weeks, months or years ago respectively.

Once you get the files to be recovered, you can use the -u switch to undelete or recover the files. An example of recovering files by pattern matching is as below:

samar@Techgaun:~$ sudo ntfsundelete -u -m *.jpg /dev/sda4

Similarly you can recover by providing inode or inodes range using the -i switch. You can get the inode values from the first column in the scan mode.

samar@Techgaun:~$ sudo ntfsundelete -u -i 161922 /dev/sda4


Monday, 11 June 2012

Graphical Frontends To Sopcast Client For Linux

As all of you know the official Sopcast client for linux is only the command line version and many people find it difficult to use the CLI version. However, many good people have made an effort to write the graphical frontends to the Sopcast client for linux. Here you will find some of such GUI frontends for sopcast.

Sopcast Player: SopCast Player is designed to be an easy to use Linux GUI front-end for the p2p streaming technology developed by SopCast. SopCast Player features an integrated video player, a channel guide, and bookmarks. Once SopCast Player is installed it simply "just works" with no required configuration.

qsopcast: qsopcast is a QT GUI front-end of the Linux command line executive of P2P TV sopcast.

gsopcast: gsopcast is a GTK based GUI front-end for p2p TV sopcast.

TV-Maxe: TV-MAXE is an application which provides the ability to watch TV stations and listen radio via different streams, such is SopCast. Currently it has a large number of channels, both romanian and international.

SCPlayer: SCPlayer is a simple and lightweight GUI frontend for sopcast supporting only linux GNOME3 platform.

Pysopcast: It is a simple GUI for sopcast made using PyGTK.

totem-sopcast: A totem plugin to let you browse and play sopcast streams.

wxsopcast: A sopcast GUI for linux written in python and wxPython. Note that the channel URL needs to be changed to at first.

jsopcast: jsopcast is a simple GUI to see P2P TV sopcast made in Java.

If you know of any other GUI frontend for sopcast, please feel free to leave a comment. :)


Download Full Package Of Winetricks And Fonts To Remove Checksum Mismatch Error

While trying to install allfonts from winetricks, I got a sha checksum mismatch error and soon I started fixing them manually. In order to make it easier for the wine users out there, I've slightly edited(changed the sha checksums) the winetricks file and packaged the font files.

You can download the package from HERE.

After downloading the file, unzip the file and then copy winetricks to /usr/bin/winetricks as below:

cp -f winetricks /usr/bin/winetricks

Now copy all the fcontents of dotcache/winetricks directory to ~/.cache/winetricks/

Now re-run the winetricks and install the allfonts. This time, you'll not get any error. I hope this helps :)


Sunday, 10 June 2012

Sopcast Player With GUI In Linux

SopCast is a simple, free way to broadcast video and audio or watch the video and listen to radio on the Internet. Adopting P2P(Peer-to-Peer) technology, It is very efficient and easy to use. The GUI for sopcast player for linux works pretty well and this post gives you the step by step process of installation of sopcast player in linux.

Follow the steps as below for easy installation under ubuntu. Instructions should be similar in many variants:

samar@Techgaun:~/Desktop$ su

root@Techgaun:/home/samar/Desktop/# mkdir sopcast && cd sopcast/

root@Techgaun:/home/samar/Desktop/sopcast# wget

root@Techgaun:/home/samar/Desktop/sopcast# wget

root@Techgaun:/home/samar/Desktop/sopcast# wget

root@Techgaun:/home/samar/Desktop/sopcast# tar -xvf sopcast-player-0.8.5.tar.gz

root@Techgaun:/home/samar/Desktop/sopcast# tar -xvf sp-auth-3.2.6.tar.gz

root@Techgaun:/home/samar/Desktop/sopcast# tar -xvf libstdcpp5.tgz

root@Techgaun:/home/samar/Desktop/sopcast# apt-get install gettext python-setuptools libvlc-dev

root@Techgaun:/home/samar/Desktop/sopcast# cd sopcast-player

root@Techgaun:/home/samar/Desktop/sopcast# make

root@Techgaun:/home/samar/Desktop/sopcast# make install

root@Techgaun:/home/samar/Desktop/sopcast# cd ../sp-auth

root@Techgaun:/home/samar/Desktop/sopcast/sp-auth# cp sp-sc-auth /usr/bin/

root@Techgaun:/home/samar/Desktop/sopcast# cd ../usr/lib/

root@Techgaun:/home/samar/Desktop/sopcast/usr/lib/# cp -a* /usr/lib/

root@Techgaun:/home/samar/Desktop/sopcast/usr/lib/# sopcast-player

Now everything should work fine. I hope this helps. :)


How Does Windows 7 Determine Internet Access Status

So I was curious on how Microsoft is managing to determine the status of internet access. I am a linux user and I have been thinking of having something similar to windows in ubuntu as well. Due to curiosity, I was tempted to dig further upon this and here is my finding.

What tool would be better than wireshark to analyze network traffics so I fired up wireshark in my friend's laptop. I took out the ethernet cable, started the capture in the ethernet interface, and then plugged in the ethernet cable back. I waited till the internet access status was shown at the right bottom(right part of taskbar) and stopped the live capture.

Now to the fun part, I analyzed the capture with my noob skill.

One particular entry was the DNS query for . Curios, I opened the site to find 403 forbidden error. I was now starting to think that Microsoft does the DNS lookup for this particular site and if it fails, Windows shows No Internet Access sign.

Wait!!! There's something more. Further analysis showed that a GET request is made for the file ncsi.txt to that website. Following the stream, I found out that the page contained the text Microsoft NCSI.

So this is what I concluded after this analysis:

Windows performs a dns lookup for then after it succeeds, a request is made to which should contain the text Microsoft NCSI.

I did a google search on Microsoft NCSI and THIS PAGE gives a detailed description on NCSI which stands for Network Connectivity Status Indicator.

If you guys have researched on this and found something different, please let us know by throwing a comment.


Saturday, 9 June 2012

How To Undo Sent Mail In Gmail

This is a how to on undoing the sent mail in gmail. However, this method has severe limitation at the time of writing this post since we are allowed to have maximum time of 30 seconds as a cancellation period but lets hope this gmail lab feature gets integrated in gmail with longer cancellation period.

Sometimes we send an e-mail to somebody and later realize that we should not have sent that particular e-mail. Though not so helpful, the "Undo Send" feature from Gmail Labs can be useful sometimes.

By default, you will not have Undo link after you just sent the message.

Click on the icon(see screenshot below) at the top left corner of your gmail interface and then click on Settings

Click on the Labs Tab and then in the lab search box, type Undo Send.

Now select the Enable radio button and then Save changes.

By default, the cancellation period is 10 seconds(at the time of writing). To change the default time to 30 seconds, again go to settings and in general tab, you will find the Cancellation period dropdown list. Choose any value you want.

Now you can undo the just sent emails as below:


Friday, 8 June 2012

Now NTC Hosts Ubuntu Repository For Nepal

As most of the ubuntu users know that the previous nepali repository hosted by Mitra Network Pvt. Ltd. had lots of problem in packages and later went down for a long time. This time, it is NTC who has taken a good initiative and has started providing local ubuntu repository for us.

As seen on foss nepal's mailing list, everybody seems to be happy with the effort of NTC to promote linux and open source software tools in Nepal.

The is now resolving to now. You can edit your sources.list and choose the nepali repository now. :)

Also, lots of ubuntu distros are available for download. See THIS. Now I can download ubuntu ISO's in around one or two minutes(Thanks NPIX for keeping local traffic local)

In case anyone wants my copy of sources.list file, here it is: sources.list or get it from HERE in case you hate registering on 4shared.

Once you copy the sources.list to /etc/apt/sources.list, make sure to run sudo apt-get update to update the package database.


Sunday, 3 June 2012

Check Your Plugins To Keep Firefox Updated and Safe

Mozilla foundation is now providing an online tool to check if the plugins you've installed are up to date or not using simple interface. The objective of this service is to keep your third-party plugins up to date which helps Firefox run safely and smoothly.

The service lets you check all the plugins and update the outdated ones from a simple UI in two major steps:

Step 1: Click Update to update a plugin.
Step 2: Complete all recommended updates before restarting your browser.

Head on to Firefox Browser Plugin Check & Updates.

Stay safe :)


Saturday, 2 June 2012

Torbutton works differently now: you can't turn it off any more

The way torbutton works has been changed and it can not be disabled anymore when the addon is active. You'll have to disable or remove the addon itself to not use the torbutton in firefox.

Whenever you try to click on the tor button icon to disable tor, you'll see the following information:

Torbutton works differently now: you can't turn it off any more.

We made this change because it isn't safe to use Torbutton in a browser that's also used for non-Tor browsing. There were too many bugs there that we couldn't fix any other way.

If you want to keep using Firefox normally, you should uninstall Torbutton and download Tor Browser Bundle. The privacy properties of Tor Browser are also superior to those of normal Firefox, even when Firefox is used with Torbutton.

To remove Torbutton, go to Tools->Addons->Extensions and then click the Remove button next to Torbutton.

If you don't like to have torbutton always enabled in firefox, you can instead use the tor browser bundle which consists of patched version of firefox made to work with better privacy. The Tor Browser Bundle lets you use Tor on Windows, Mac OS X, or Linux without needing to install any software. It can run off a USB flash drive, comes with a pre-configured web browser to protect your anonymity, and is self-contained.

You may continue to use tor by disabling the torbutton but manually configuring the tor proxy configuration by going to Edit menu - Preferences - Advanced - Network - Settings from where you can choose Manual Proxy Configuration(This may be different in windows OS, probably in Tools menu).

First uncheck the Use this proxy for all protocols if it checked. Then in the Socks Host field, type and 9050 in the corresponding port field. Screenshot below can help you.

Now you can use tor connection without any need to install torbutton. I hope this helps. :)


Friday, 1 June 2012

100% Internet Explorer 6 Clone In HTML5

Well I came across this website via some referral online and thought of sharing with you guys. A funny 100% IE6 clone done in HTML5 that MAKES sense :D.

IE6 Clone in HTML5


Installing Podbot MM With Counter Strike Dedicated Server

Podbot MetaMod(MM) is probably the best metamod plugin that adds computer players(bots) in the Counter-Strike. Since number of players were decreasing day by day in hostel, I decided to add Podbot MM so that I could play while no other human is joining in the local dedicated server. This How To will provide step by step explanation on the installation of Podbot MM for dedicated server in linux powered with metamod plugin.

I assume you've already installed the metamod plugin. Get podbot MM from official website. At the time of writing this, the link for latest version was not working, so you can also downlod it from HERE

Once you've downloaded the podbot files, extract it to cstrike/addons/ directory of your hlds installation.

Now, we'll have to add the podbot reference in the metamod's plugins.ini located at cstrike/addons/metamod/ directory of your hlds installation. Add a new line(one of the below) according to your system:

linux addons/podbot/
linux addons/podbot/
win32 addons/podbot/podbot_mm.dll

That should do the job. To verify if the installation worked properly, open the console(by typing ~) and type meta list in-game. You should see podbot MM loaded in that list without any errors(errors like Badf are usually seen).

Now that installation of podbot has gone fine, we'll set the password so that only authorized players can access podbot administration such as adding or kicking bot. Open the podbot.cfg file located at cstrike/addons/podbot directory and search for pb_passwordkey and set the key as below:

pb_passwordkey "pwpodbot"

Few lines below, you will see pb_password field. Put your password in there.

pb_password "mypassword"

You can go through the podbot.cfg file to change various configurations for your bot. You can also edit other files in podbot folder as per your necessity.

Now you'll have to enter the password information in your own PC's cstrike folder(NOT the cstrike folder of HLDS). Edit (or create) autoexec.cfg in the cstrike folder with following lines:

setinfo "pwpodbot" "mypassword"
bind "=" "pb menu"

Now you can use the = (equals to sign) as the bind key to access podbot menu. Soon after playing a while with podbots, you'll come to know about waypoints. You can create or edit waypoints by accessing waypoint menu by typing pb wpmenu in the console.

I hope this helps. Enjoy fragging :D