31 May, 2011

Downloading online flash games and playing it offline in ubuntu 11.04

Flash games are always the right option whenever you feel bored and frustrated sitting infront of pc. Here is a cool trick for downloading all your favorite flash games from any websites that we play usually online. Along with this i am just including the installation of a flash player for playing the .swf files we are going to download ( a browser installed with flash plugin is always enough, though just use it... ).

Usually all the flash games are embedded in the html page so that the browser first caches and loads the application. So the trick to find out the correct url of the .swf file (of the game) varies from website to website.. Dont worry we will go through some eye popping tricks :P

Installing swf player in ubuntu
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Install swfdec-gnome package with your terminal as follows. U can use synaptic or Ubuntu software centre to install it.  


$ sudo apt-get install swfdec-gnome
 

#   Catching the fish           <------ geeky way
-----------------------------------


Now it is the time to find a cool flash game that you call 'addiction'. For the timesake i am taking the famous game called 'appleshooter'. You can find it on the officegamespot website. Wait till the browser loads the game. Now just take the source code of the page using View => Page Source from the browser (or hit Ctrl + U). In the source page find the pattern ".swf" (Hit Ctrl + F and type .swf).


If you find this pattern as a part of a url then that is the original location of the swf file which we see embedded in the html page. Then copy paste the url ending with .swf on a new tab on the browser to load that game alone. If you dont get a url, we need to use some kind of guess work to find it out.
 

Here i am pinning the screenshot of page source of the appleshooter game on officegamespot website. They dont uses direct url to the .swf file in the page source.



I guessed the url to the .swf file from the above picture from this field <a href="arrow_shooter_03.swf" .....> and tried replacing the tail part of the url,  


http://officegamespot.com/officegames/appleshooter.htm 
with  
http://officegamespot.com/officegames/arrow_shooter_03.swf 
Hi hi, that worked !!! the flash game alone loaded in the browser.

Now save the swf file to your machines hard disk for using it offline. For this just go File > Save Page As from the browser itself. So we have done it almost, whenever you want to play the game just go to that folder and open the file with swfdec flash player.




   

#   catching the fish          <-------- firefox guy 1
----------------------------------


Here is another trick to findout the url to the .swf file. After the browser loads the game completely, open a new browser tab and type about:cache?device=disk in the address bar and hit the enter key. Now Find the pattern .swf file in this page. Copy the url of the one that is the flash game among the urls matchin the search for .swf pattern. Open another tab and paste the url (to .swf file) to load the swf application alone in the browser. Use File > Save File As to save it to your hard disk. Later you can play the game by opening the downloaded swf file with swfdec player or with any web browsers...




#   catching the fish        
<------- firefox guy 2
----------------------------------

Another methode to get a copy of the .swf file of the flash game is to search on the browser cache for the file. You shold have to load the game on the browser to make this trick work. After loading the game completely in the firefox browser (no need to play till the last level to get the file completely !!), open a new tab and type about:cache in the address bar and hit the enter key. 




Copy paste the value of Cache Directory under Disk Cache Device to the terminal after typing nautilus.

$ nautilus /home/jo/.mozilla/firefox/tu9q54ls.default/Cache

Then the cache directory will open up. Just sort the items by Modificaton date and you can find the .swf file among the recent files. Copy it from the cache to some other directory, other wise the file will be lost when the browser tab is closed or loaded with some other pages. Now open it with the swfdec flash player to play it anytime like a standalone application..

   
#
  catching the fish   
<------- for the lazy guys
---------------------------------
If you are too lazy to spend time on above tricks, then there is an option... Use the google's search engine to find the swf file for you, so that you can just download and play it. Just type in the search box like this pattern without quotes 'appleshooter filetype:swf'.


Copy the direct url to the swf file from any of the search result. Load it in a new tab. Save it using the browser itself. You can also use a terminal command called wget to download the files.

$ cd your/games/directory
$ wget http://vc02.free.fr/media/kangg/kang.swf


Hope you got the game, now play it ...






and Hope you like the post !  Comment on !! share your ideas ....!!!
Read rest of entry

17 May, 2011

Access the blocked websites [facebook, orkut, youtube] using free http proxy servers

Atlast that too happened. Ban  for facebook on the computer lab,  Damn proxyserver !! They first blocked youtube, then orkut, then torrents and now it's facebook's turn... Then how do a man live without all this things in such a technically overflooding world?

I can't agree with their policies... I want to talk, i want to chat and i want to tweet.. Squid proxy server was running on the network. It was powerful and configured well to block everything out of the rule. Then i started googling for a way to bring the blocked facebook onto my laptop within the same network, and found that some free http proxy servers outside the network will help me.Also port 80 (HTTP) was open, so that i can browse the internet.

What actually happens in the network when i am behind my college's proxy server is, whenever a url request for facebook comes from my browser, the proxy server which has been configured to capture such requests comes into action. But since we are allowed to browse on the internet, its clear that you can access servers other than facebook. Most of the free http proxy mechanisms work on this trick. They help you to cheat the squid server. Squid server beleive that your machine and the free proxy server  on the internet (may be in US, Europe ) are the two endpoints of communication. See the image below to see how that http proxy server loads the facebook page on your machine  [check the url area and the content area in the image]



Here the free http proxy server (faceoxy.com in image) communicate with the facebook server on behalf of you and serves the packets from the facebook within faceoxy's header. That was somewhat literally!!!  So when the squid program analyses the packets, it can not find any traces of the facebook in the source/destination address feilds of the ip packets. I am not going to the advanced details of http tunneling, another post is on its way...


List of the free and reliable http proxy servers that help you to access blocked websites such as facebook, orkut, youtube etc.. are : Though they are classified most of the sites serves facilities such as 
  • anonymous browsing
  • proxy bypassing
  • changing network location of your machine

HideMyAss.com – Free Anonymous Proxy Servers

Proxy.org – Directory of free proxy servers.

GlobalPandora – They give you a proxy address to add to your browsers netwrok settings

http://blockedsiteaccess.com/


 
facebook  



http://facebookoxy.com/

http://www.faceoxy.com/



youtube proxy


Megabypass

Youtubeproxy

MegaProxy 


proxybin.com
 
Another best trick that works well with these condition is the foxyproxy addon for firefox. Just install the addon for your firefox. FoxyProxy automatically switches an internet connection across one or more proxy servers based on URL patterns. Simply, it automates the manual process of editing Firefox's Connection Settings dialog. Proxy server switching occurs based on the loading URL and the switching rules you define...
Read rest of entry

11 May, 2011

6 best practises for a good kowledge researcher on internet

The century where we defined the meaning of 'www' and 'internet' were over. Now these technologies turned to be the best flavour tied up with our life. A child even before he stands up for the first time in his life comes in touch with the latest flavour of technology by watching tv and playing with the mobile phone. So the internet is being a big phenomenon.

Internet offers the best services that connect and educates people across the world. Majority of the internet users utilizes internet as a tool for social networking and chatting only. While internet remains the best knowledge pool, we must follow some good practises to utilize and extract the best from it. Worldwide acceptance of free software and the sharing concepts might have played the key role in fuelling the era of blogs and forums. 

I have always amazed at seeing the number of peple writing and contributing on free software platforms like ubuntu. Everyday how many tweets fly over the internet carrying links?? it might be millions..We have to break the rule that 'internet is nothing but a Goooooooogle search'. As the digital media is rapid and feature rich than the traditional and conventional printed media, we should follow a proper guideline for using it in better manner. My intention is nothing but introducing before you the best practises for online reading and keeping always in touch with the latest technology through this blog post.


1. Dont be the usual guy always :)

Find a little time for spending with the latest stuff in your favourite blogs and webpages other than facebook and myspace. Let's close the tabs of your favourite social networking sites while you read. Dont mix up the everything togeteher, instead find time for everything. You can make a better environment for learning, only if you have the gutz to do that...


2. Subscribe the best (its free of cost) 

Whenever you move over an interesting and 'followable' web page, don't forget to use the subscribe button to subscribe to the feeds from that blog. Feeds are the topics that are written in that blog or web page that will be available on your feed reader (such as google reader) and can be organized as you wish. If you are using an online feed reader service, the advantge is that you don't have visit your favourite blogs individually everytime, every stuff will be available on the feed reader's inbox. That makes all your faourite contents from many web pages under a single roof. Its better to use an online feed reader rather than bookmarking the stuffs with your browser. Bookmarks will be lost on a system crash unless otherwise it is not backed up properly, and it is better for websites rather than blogs.

I have been sticking on to the Google reader for a while since it provides better services to organize and manage my feeds. It have features like slideshow, collections and more to make reading attractive and easy.   


3. Inbox is not your waste box !


Many of the blogs and websites will allow you to subscribe contents through email also, along with the feed subscription. Think before you subscribe via email weather the contents are so important to sit on your inbox. Otherwise your inbox will flood with unimportant mails of blog subscriptions and that may be the reason for losing your job because of unnoticing the appointment order. It took almost one and half weeks for me to remove the unimportant subscriptions from my email inbox. I was forced to do it when my inbox crossed 4000 mails and lion's share of the subscriptions are 3-4 years old and are unread...


4. Comment on !! are you dead???


When you move over a blog post, just take a pause and comment if you have something to add up with the content described in the post. Most of the blogs allow the commenting feature to make discussions live. Remember your comments are always valuable to and useful for the next guy visiting the same post. I usually check for the comments area of the blogposts before reading the content of the post. My intention is nothing but to watch the feedback given by other readers. Soemtimes the trick given on that post might not work and may be the same is commented by someone. So a hawk eye view on comments section will let you decide weather to spend time on reading the post.


5. Share the spirit !!


Whenever you finds an interesting content don't forget to share that link to your friends also. Major social networking sites (twitter, facebook) and online bokmarking sites (delicious,digg) provides facilities to share the links. While sharing a link try to encourage your friends to read that post also. I think youtube videos are shared more than any other links in most of the social networking sites...


6. Watch it on your desktop


 You can use applications for reading the feeds in on your desktop. In a better way. Many feed reader application and widget are available. Google gears can be used to read contents offline from your blog. Some of the applications for Ubuntu distributions are Akregator, Yarssr, Liferea, Blam ...


Hope u like the post. Bye till the next one !!

Read rest of entry

30 November, 2010

fork bomb explained...

 


Don't try this @ your home ....Injurious to your computer's health, else  you will be...



Defining the fork bomb . . .

                   A fork bomb is simply a line of some characters entered into the command line of a Unix system, and when the enter key is pressed, within seconds the computer will crash... The little program we entered in to the bash shell act as a process & make multiple copies of itself, setting off a chain reaction and thus quickly exhausting the system’s resources. Most computer operating systems can be  simply crashed or at least brought to a coma stagewhen users, even those without superuser privileges, launches this 'logical bomb' that eat up all memory and CPU time. "Forkbomb" does nothing but launch two or more copies of itself upon startup. Since these copies do the same in turn, this sets off a chain reaction with an exponentially growing number of processes. A fork bomb process "explodes" by recursively  spawning copies of itself using the Unix system call fork().




Working of the 'bomb'...
  
              A process begins  execution when it's execution environment and corresponding threads are created. Before  execution the process has to take a room in the process table, which is a data structure for holding  information required by the kernel to run the process such as...

      > Process state
      > Several process IDs
      > User IDs for determining process privileges
      > Pointer to text structure for shared text areas
      > Pointer to page table for memory management
      > Scheduling parameters,  priority values
      > Timers for resource usage etc...


                A fork bomb creates a large number of processes very quickly and begins execution one after the other by seizing the process table. So whenever a free slot occurs in the process table, another copy of the bomb process enters it and start spawning new bombs. When process table becomes saturated, no new programs may start until another process terminates. Even if that happens, it is not likely that a useful program may be started since the instances of the bomb program will each attempt to take any newly-available slot themselves.


                In addition to using space in the process table, each child process of a fork bomb uses further processor-time and memory. As a result of this, the system and existing programs slow down and become much more unresponsive and difficult or even impossible to use.

see the defenition for fork bomb in wikipedia,
                In computing, the fork bomb is a form of denial-of-service attack against a computer system which makes use of the fork operation (or equivalent functionality) whereby a running process can create another running process. Fork bombs count as wabbits: they typically do not spread as worms or viruses. To incapacitate a system, they rely on the (generally valid) assumption that the number of programs and processes which may execute simultaneously on a computer has a limit.




Some bombs that you can try @ your friend's pc


Fork Bomb in windows

 Open up notepad and type the string below and and save
 it as fork.bat :


   %0|%0


 On double clicking this file,it will lead to total CPU jam 
 by opening a large no. of processes of command prompt.




In UNIX C or C++:


 Compile and execute the following C/C++ code snippet
 in Unix to understand (???) the bomb...

#include <unistd.h>
int main(void)
{
    for(;;)      //for(;;) or while(1) makes an infinite loop
    fork();
    return 0;
}


Bash Shell Fork Bomb


Following is the most coolest one i had ever seen. Take the bash terminal and just type in the following code....

   : (){ : |:& };:

This code is the elegant and most beautiful example of a fork bomb.


:()       _  define ':' , like a function call
{         _  beginning of what to do when we say ':'
    :      _  load another copy of the ':' function into
               memory...
    |      _  ...and pipe its output to...
    :      _  ...another copy of ':' function, which has to be
               loaded into memory (therefore, ':|:' simply gets 
               two copies of ':' loaded whenever ':' is called)
    &     _  disown the functions, that is if the first ':' is
               killed, all of the functions that it has started
               should NOT be auto-killed...
}         _  end of the definition of ':'
;          _  Having defined ':', like in structures etc... we
               should now...
:          _  ...call ':', initiating a chain-reaction: each ':' will
               start two more.


Simply the above function is the same as the code below

forkbomb(){ forkbomb|forkbomb & } ; forkbomb



How to get out of the bomb . . .
             One may have to reboot the system to resume its normal operation destroying all running copies of it. Trying to use a program to kill the rogue processes normally requires creating another process — this is  an impossible task if the host machine has no empty slots in its process table, or no space in its memory structures. Furthermore, as the processes of the bomb are terminated (for example, by using the kill command), process slots become free and the remaining fork bomb threads can continue reproducing again, either because there are multiple CPU cores active in the system, and/or because the scheduler moved control away from kill(8) due to the time slice being used up.


A simple solution is that we can stop (“freez”) the bomb's processes, so that a subsequent kill/killall can terminate them without any of the parts re-replicating due to newly available process slots:


killall -STOP bombprocess
killall -KILL  bombprocess



...Bye till the fire and smoke settles...
Read rest of entry

28 November, 2010

How to share /home directory between two linux installations

            Frequent re-installations of operating system due to crashes  is always been a problem for many of the linux users, and my case is also the same.... Everytime i start with doing something like trying some new commands or editing some configuration files and finally ends up with an 'OS crash' and a fresh installation thereafter. Now it's been a very usual matter that i may have to install a fresh copy of linux distro probably once in a month. Sometimes the crash may occur due to installation of a new theme (last week editing some theme files manually after it's installation made my 10.04box stand on nails...), sometimes the crash may be the by-product of installation of an incompatible version of application etc...

While fighting with all these crashes and re-installations the major problem is related to backing up of the data and personal files stored in the /home folder. Usually the contents of the /home contains files and directories including apache's root directory, downloads, files received over bluetooth, joomla/html/php projects etc. So it's very important to back up data all the time Ubuntu is reinstalled.

Solution

One of the best solution to avoid this kind of frequent backup-restore problem is separate the /home directory from the root directory during the installation. The advantages of this separation comes in two ways

1. When a crash occurs to the OS the /home directory remains intact because it is a separate disk partition. So on reinstalling after the crash we can map the old /home partition of the crashed one as the /home of the new linux. This makes it possible to access the files as if before the crash occured.

2. It's easy to share the /home folder between any no of linux distributions installed parellely on your machine. During installation of each of the distro, we can select the partition to be shared as its /home. Better keep the filesystem type (eg:- ext4) same while selecting the /home of other distro as it's new /home. This can be useful even with linux distributions of different architecture using similar filesystem types(Ubuntu and fedora can share a common /home if the /home is mounted as ext4).

On the ground...


Select the manual partitioning options


Setting up the root partition 


Selecting the /home partition of the previously crashed or parellelly installed linux.


 
Mounting the /home partition of old linux as /home of new linux. Don't check the format box. If mistaken you may lose all the data due to disk format
Read rest of entry

23 November, 2010

Easiest way to add nautilus scripts in Ubuntu

                  Here is a bit tutorial for adding nautilus scritps in ubuntu that will help you to increase the system accessibility. These scripts can be run by simply clicking the right mouse button and selecting any from the 'scripts' menu. The imporatnt advantage of the nautilus scripts is its easiness, for example we dont need a an image processing standalone application to rotate an image or convert it to another format or to mirror it... The only think that we need is to select the image and right clicking on it and choosing any of the scripts... its simple and can be accessed as shown in the figure...



Installing Nautilus scripts in Ubuntu 

Nautilus scripts are available for dowloading from G-script site. You can use the link here  to download it directly to your pc. Follow the steps below to to complete the installation.

  • Untar the downloaded file using the following command
 $ tar -xvzf  nautilus-scripts.tar.gz
  •  You can see the scripts arranged in a heirarchical manner inside the extracted folder. Copy the contents of the extracted nautilus-scripts folder  to the .gnome2/nautilus-scripts folder in your home directory. Since it a hidden folder you can't see it @ the first time. Click Ctrl + H key after enterin the home directory to see the hidden directory.
  • That's all for the installation... You can access the scripts by selecting a file > right clicking it > and choosing any of the scripts arranged in categories under the scripts menu.
Hope you enjoyed th tip...
Read rest of entry

18 October, 2010

Download flash videos in Ubuntu without any application

Here is a simple trick that you can use to download your favourite flash videos from Youtube or metacafe without any application. You can stop your search for an apt application for downloading youtube videos... installing it on linux...Just leave everything...


Just login to the youtube and click on some videos to play it.


While the video is streaming, check the /tmp folder in the Ubuntu's file system. There you can see the same video file being updated with filename like Flash26YGf2.flv


You can copy this video file to some other place to make it viewed later. If you reload the the webpage or open some other video in the same tab/window of the web browser then the previous video file will be overwritten with the new one. So better is to copy the flash video file just after it is completely buffered in the web browser.


This tip has one another advantage too. If you want to see the end part of a flash video file which is about 1 hour length, you dont need to download the complete video from the beginning. You can seek the video into desired portion in the website. Then video file in the tmp directory will be starting from the new positon to which you seeked it.


So this technique is simple and cool where you need only a flash video player embedded in the web browser only to save the video. This methode can be used in situation where you  can play  video but blocked from downloading it since you have no account registered in those websites.
Read rest of entry

14 October, 2010

How to add sudo to last command typed in bash terminal



Its most common that you might forget to type in the 'sudo' command along with some other commands. I have faced this problem many times and usually end up by typing the entire command with sudo keyword again. Here is a technique that we can use to avoid retyping the command again after typing sudo.

Consider that i have to install a package called blueman system with the apt package manager via the terminal. Here i am not adding the sudo command before the apt command



Then type the following command to avoid rexecuting the command with all permissions

 $ sudo !!


See here the bash automatically retyped the command with sudo. 



Read rest of entry

29 September, 2010

I'm Feeling Lucky in Google

The I'm Feeling Lucky button seen on google's home page is a feature that leads directly to the top-ranked page corresponding to your search keyword. You can avoid the search results page in cases you know the top-rated pages corresponding to your search. For example, you may need to go twitter's home, you only need to do is: type twitter in google's search box and then press the I' feeling lucky button. Then google will automatically redirect to www.twitter.com instead of showing the search results.

Adventures with I'm Feeling Lucky button

Go to www.google.com and try the following keywords in your search box and click the I'm Feeling Lucky button to see the craziest and awesome things in the google... You will be stunned.....

  • Google Hacker 

  • Google Pacman

  • Google Gravity

  • Google Sphere

  • Epic Google

  • Rainbow Google

  • Google Mirror

  • Google Loco

  • Google Gothic

  • Google Easter Eggs

Among the above searches gravity, pacman and hacker are the most awesome 




Read rest of entry

27 September, 2010

How to wipeout your hard disk perfectly in Ubuntu


Here is a command shread which can be used to in bash terminal of Ubuntu to wipeout your harddisk completely without leaving any chances for further recovery. Please dont try it unless otherwise you dont have no other use with your current system...

$ shread -v -n 1 -z /dev/hda


Options


-f, --force
       change permissions to allow writing if necessary

       -n, --iterations=N
       Overwrite N times instead of the default (25)

       -s, --size=N
       shred this many bytes (suffixes like K, M, G accepted)

       -u, --remove
       truncate and remove file after overwriting

       -v, --verbose
       show progress

       -x, --exact
       do not round file sizes up to the next full block;

       this is the default for non-regular files

       -z, --zero
       add a final overwrite with zeros to hide shredding
Read rest of entry

25 September, 2010

How to assign an IP address in Ubuntu using command line

Computers may be assiged a static IP address or assigned one dynamically. Typically servers and institutions will use a static IP which will not change each time u get connected. Workstation will use Dynamic Host Configuration Protocol (DHCP) for IP address assignment. It is more easily to find a system if the IP address does not change and is static.


Use the Command Line:

    /sbin/ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255                  
 
The ifconfig command does NOT store this information permanently. Upon reboot this information is lost. Manually add the network configuration to /etc/network/interfaces  as shown in my next post .
Read rest of entry

03 June, 2010

How browse wap sites using Mozilla Firefox


wapsites are a great source of music and videos that can be used in your mobile phones free of cost. By default the desktop browsers do not support loading the wapsites, istead they have support only for different website formats . This trick is all about equipping the firefox browser to load the wapsites by installing an addon called wmlbrowser...

Select Add-ons from the tools menu in the firefox. Click on the Get addons button and enter wmlbrowser in the search box. Install the addon completely and follow the steps thereby. You have to restart the firefox to make the changes into effect.


One among the content rich wapsites waptrick.com

Read rest of entry

How to add Twitter and Facebook gadgets to gmail inbox


This is simple technic lets you to add both the facebook and twitter gadget to the left side of your gmail inbox. You can see the tweets, direct messages and perform all the twitter activities from within your gmail account. The case is same for the facebook also...





Follow the steps to setup this feature in your gmail inbox.

1. Login  to your gmail account and take the google labs from the more --> even more button.





2. You will be redirected back to your inbox, with settings tab opened. Enable the Add any gadget by URL option and save the changes.



3. Then click on the Gadgets tab and add the URL of the twitter and facebook gadgets by copying the following lines onto the text box given there



4. Thats all for now.  You can write your tweets in the widget box in the left side and see everything in twitter by clicking on the expand button




Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger