Jan 28, 2009

Hacking into A Computer Using the Router

If you have access to the router, ultimately you have access to *ANY* computer on the network.

First off, let’s learn about the DMZ. DMZ stands for “Demilitarized Zone”. Basically, every router let’s you add an IP address to this DMZ, leaving the computer that has the the IP *WIDE OPEN* to the internet, meaning the firewall is off, all ports are open, etc.

So what do you do, once you hack into the router’s admin page, and add a computer into the DMZ? You attack the hell out of the computer! We’ll hope that the computer has no software firewall, and just a the router as a hardware firewall, because if it has a software firewall, it’s going to be a lot harder.

Now, here’s the tricky part: Getting access to the box. If you are *ON* the network (not remotely) that the router is on, you could simply plug the IP address into windows explorer (ie: \\192.168.0.101\) and look for shared directories. Most likely their will be at least one share on the computer. Their is also an administrator share on ALL win2000/XP boxes located at “\\IP_Address\c$\).

note:dont forget to change your IP address with IP spoofer

If we want full access to the computer, we’ll probably want to find some open ports on the computer and look for running services, such as FTP, Telnet, an HTTP web server, Remote Desktop, etc. Use your favorite port scanner to do this; if you find open ports, go ahead and brute force your way into these services. TelNet would be the best, basically giving you full access to the box.

Of course, you could always search the box for vulnerabilities/exploits using your favorite scanner, such as nessus, etc.

If you spend some time, their is a number of ways you can get access to the box, depending on what kind of box it is. Keep on keepin’ on.

dont try this on Secured TelNet ,this method is working in my appartment(maison de l'Inde) bcoz they are using 18.2 router channel with Denclon and Orange provider.

How To Use Your TV as a Computer Monitor

Many a time I have looked over at my Sony bravio 32" television and thought, why can't I just hook up my computer to that thing and watch telugu movies(N.B.K) on ma big screen? I figured it would beat buying a huge monitor for a ton of cash, right?

Well I looked into it and it can be done but there are some limitations that, in the end, might not make it worth your while. I'll explain later in the article.

  1. Identify your TV's input connections. Most TVs these days have three basic types of inputs. You have your coaxial cable input, the same as your cable box or satellite, an RCA composite input (the yellow, red and white inputs) and an S-video connector. Newer televisions might have Component Video, DVI, VGA or HDMI inputs but the ones listed above are more common.
  2. Identify your computer's outputs. These days computer manufacturers are adding TV compatible outputs on their products so it's easy to hook it up quickly. The S-video in particular seems to be popping up on more and more computers. Mostly you will find the usual VGA output that the regular monitor hooks up to. The newer multi media computers of the near future will probably have all high definition outputs that connect directly to your TV, but for now we will deal with what most people have for both computers and televisions.
  3. Find the appropriate adapter for your connections. You may need to get an adapter so you can hook up your computer to the TV. These have a VGA adapter on one end and (usually) a selection of hookups on the other (S-video, RCA composite and Component). The good thing about these is that you can take it from TV to TV and you'll be able to hook up to all of them. I highly recommend a wireless adapter. It costs a bit more but it's worth not having a big cable mess and not keeping your computer near your TV.
but its a bit costly (in paris it costs around 22 euros(1500 rs))
  1. Connect your computer to your TV. If you have a TV compatible output on your computer, such as an S-video jack, just take an S-video cable and connect it to your computer and your TV. If you do not, then attach your VGA end of your adapter to your computer and use the RCA, S-video or Component Video cable to attach to your TV. After you've made all the connections, make sure you are on the correct TV video input. Press the input button on your TV or remote until you see your computer's signal.


Now, here is where you might get a little disappointed. Your TV's usual video signal is called NTSC (PAL if you live in Europe). This signal is different than the one generated by your computer. Computers use signals measured by pixels: 320x200, 320x240, 640x480, 800x600, 1024x768, 1280x1024 or 1600x1200. Most TV's can only get about 500 lines of resolution, in computers this is like 500 vertical pixels. The video amplifiers in televisions cannot handle higher resolutions either. So when you factor these things together you are left with a maximum resolution of 640x480.

This is not the worst thing in the world because you can play games and watch video in lower resolutions no problem. It's just that you will never get close to the resolution your computer monitor will give you.

Now its time to have some popcorn and a DVD (okka magadu)




Jan 27, 2009

Build Animated GIFs in Photoshop.

Build Animated GIFs in Photoshop.

StickmanAnnimation.gif

If you’ve ever wondered how to create animated GIFs in Photoshop, we’ve created a simple tutorial with some example files you can download and try out.

We use a lot of animated GIF files in our weekly tips. They are fun to build, and better for our email subscribers because Flash animations are not supported in most email readers.

A Simple Example

For a quick hands-on tutorial on creating animated GIFs in Adobe Photoshop, we’ll walk you through creating the following animation:

ExampleAnimation.gif

This simple animation combines the two most common animation techniques in Photoshop: Turning layers off and on, and using the Tween command to animate the movement of an object on a layer.

Step 1: Set up your layers.

ExampleAnimation-Step1.png

The first step in creating any animation in Photoshop is to build a layered Photoshop file with all the elements you plan to animate. Our example document has 7 layers containing the text for our countdown, and layers for the rocket and flame.

You can download our example Photoshop file here:

ExampleAnimation.psd

Step 2: Create Animation Frames with Layer Visibility.

ExampleAnimation-Step2.png

Chose Windows > Animation to show Photoshop’s animation palette.

On the first frame, turn off visibility for all layers you do not want visible at the start of your animation. Then add one frame at a time, and turn on the layers you want visible for each step in the animation.

Changing layer visibility one frame at a time is a classic Photoshop animation technique that covers a wide variety of needs.

In our example, continue this pattern to reveal the countdown and the flame at the bottom of our rocket.

Step 3: Create Animation Frames using Tween.

ExampleAnimation-Step3.png

Now that the countdown is complete, we need to create the illusion that our rocket ship is taking off. Add one more frame, and this time select the group called “Rocket” in layers and move your rocket off the top of your image window.

Then choose “Tween…” from the Animation palette’s pop-out menu.

ExampleAnimation-Tween.png

Set how many frames to add, and Photoshop spreads the movement of your layer across those extra frames.

Step 4: Adjust your Timing.

ExampleAnimation-Step4.png

Finally, go back through and adjust the delay for each frame of your animation. That time is shown in seconds below each frame.

Tip: You can hold down the Shift-key to select a range of frames (such as the 9 frames we added for the rocket’s takeoff) and change them together.

Step 5: Export the Animated GIF.

Finally, to export your animated GIF choose:

In Photoshop CS3: File > Save For Web & Devices…

In Earlier Photoshops: File > Save For Web…

ExampleAnimation-Step5.png

Make sure the image type is set to GIF, feel free to experiment with some of the other options, and save your file.

To test your resulting animated GIF, drag the file onto you web browser.

As a final reference, you can download our finished Photoshop file here:

ExampleAnimation-Final.psd

Windows Vista Registry Problems

I recently endured a nightmare situation in Windows Vista. After a restart all of my file extensions (including .exe!) had been disconnected from their handlers and many fundamental services were failing.

The first symptom that jumped off the desktop was the blank icons of most of the files and shortcuts on the desktop. Because the file extensions had lost their application connections, Windows could no longer locate and display the appropriate icon for many files.

Next, and far more disturbing than the shortcuts, I noticed that I couldn't double-click a shortcut to load a file. I tried running a few applications, nothing worked.

Finally, after a bit of hacking around I discovered that Windows Key + R still worked, and I could type a URL into the Run dialog to bring up a browser, e.g. Windows Key + R, type 'http://google.com', hit Enter.

Once into a browser I was able to Google around, and after trying several fixes for similar problems I located the following post, which solved the problem:

Weird Vista Registry Issue (BrianPeek.com)
In case that link disappears the relevant fix is:

  • Install subinacl.
  • Copy/paste the following to a batch file and run it, replacing YOURUSERNAME with your Windows username:

  • cd /d "%programfiles%\Windows Resource Kits\Tools"


    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /grant=restricted=r /setowner=administrators
    subinacl /keyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /grant=restricted=r /setowner=administrators

    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /setowner=administrators
    subinacl /keyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /setowner=administrators

    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators
    subinacl /keyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators




  • Before I located the above fix, my first step toward fixing this issue was to re-associate the .exe extension with its Windows handler. Without this .exe handler hooked up your system is brought to its knees, as you can no longer run even many of the diagnostic tools you might want to use to look into what's going on. If you just want to start by fixing the .exe association, follow these steps:
  • Hold down Windows key, then press R
  • Type 'regedit' into the Run dialog and press Enter
  • Save the following file to your desktop as 'exefile.reg':
    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\.exe]
    @="exefile" "Content Type"="application/x-msdownload"

    [HKEY_CLASSES_ROOT\.exe\PersistentHandler]
    @="{098f2470-bae0-11cd-b579-08002b30bfeb}"
    (download it here if you can't save this yourself)
  • In the Registry Editor, click File->Import and choose the 'exefile.reg' you created.

    In attempting to locate the source of this issue, which was caused by missing registry permissions, I looked through my recent install history, and I believe that one of my recent installs messed up and removed all permissions from some root keys (such as HKEY_CLASSES_ROOT). I don't want to point any fingers but the last things I installed on my system as these problems started (from oldest to newest) were:

    Windows Live Writer 12.0.1370.0325
    SpamFighter 6.3.21
    Microsoft Silverlight Developer Package 2.0.30523.8
    Microsoft Silverlight 2.0.30523.8
    Update for Microsoft Windows (KB110806)
    Update for Microsoft Windows (KB929300)

    Somewhere in the sequence of installing these programs the registry permissions were broken.

  • Delete an Access Denied File

    When my old HP ( which i bought it for 45000 rs) died because of a fried mother board, I salvaged my hard disk. I snagged a 2.5″ USB hard disk case but didn’t have time to clean it up. While cleaning up the old Windows XP files tonight, I ran into the following error:

    E:\WINDOWS\Temp\hsperfdata_SYSTEM>attrib +R *.*
    Access denied - E:\WINDOWS\Temp\hsperfdata_SYSTEM\2792

    I thought the attrib utility might help me fix the error but it didn’t. I checked the file Property dialog for a quick fix and didn’t find one.

    A little poking around on the web and I decided that disabling simple file sharing may provide additional options. You disable it by navigating to Start, My Computer, where you click on the Tools option in the menu and chose the Folder Options … to get the following dialog box. You clicked the View tab. In the tab, you scroll down in the Advanced setttings section until you see the Use simple file sharing (Recommened) option. You click the check box to turn off simple file sharing. Click the Apply button to make the change.

    folderoptions

    Open a separate Explorer session, and navigate to the directory where you’ve encountered a file that denies you access to delete it. Right click on the file. You should see two tabs, one labeled General and the other Security. If you see only the General tab, you may have forgot to check the Apply button earlier.

    2792_properties2

    Click the Security tab to see the following dialog. Click the Allow check box in the Permissions for Everyone section and then click the Apply button. You should now be able to delete the file in Windows Explorer.


    Windows 7 Review - Not bad

    As most of you know (through Twitter), I recently installed Windows 7 in VMWare Fusion. Chris Davis (blogger) asked me to write up a review on it, so here it is!

    First off, installing Windows 7 was a painless process. I installed using the VMWare Vista drivers and all worked well. Some of you that are familiar with VMWare know that it “captures” your mouse, not so with Windows 7, your mouse is free to move back and forth between the VM and the host OS (before installing VMWare Tools).

    Now onto something Microsoft messed up on. Again. If you notice in the screenshot (right), Windows 7 will have the same “versions” as Vista (Home Basic, Home Premium, Business, and Ultimate). A big mistake in my opinion. All that it leads to is consumer confusion. I can’t help but say: “You’re already takingborrowing‘ so many ideas from Apple, please ‘borrow‘ the notion that one price gives you all the features.”

    One cool feature of the dock-like taskbar. is the ability for applications to display progress. For example, Internet Explorer displays the progress of downloads as a progress overlay on the icon (see screenshot to right). The question will be, are third party browsers/applications going to be allowed to access this functionality? Or are we stuck using IE if we want this functionality?

    Web developers rejoice! Windows 7 ships with Microsoft’s best attempt so far at being a standards-compliant browser: Internet Explorer 8. But then again, it’s not fully standards-compliant, so you still can’t use all of those nifty CSS 3.0 features. Oh well, it’s a start. (And then there’s the possibility someone will accidentally go into “compatibility mode” and never find their way out…)

    One thing I thought was greatly improved from Vista (maybe I’m wrong…) is unity performance in VMWare (see screenshot to left). I was able to drag around windows from either OS and not have graphic glitches. I’m not a huge unity user, but I find myself using it once in a while, so I’m glad it works nicely.

    That about wraps it up, if you have any questions or comments, leave me a comment below, or contact me through any of the methods listed on the contact page.

    Moving your code from Dashcode to Xcode



    After you have completed your application work in Dashcode here are the steps to move it to Xcode.
    1. Publish your Dashcode application - you can publish this to either a directory         or to the web server on your machine. Either way works.
    2. Start and name a new Xcode project.
    3. Delete the placeholders in the Xcode project.
    1. index.html
    2. main.js
    3. main.css
    4. mappings.js
    5. functions.js
    6. databaseDefinition.js
    7. everything in the Images directory
    8. everything in the Parts directory
    5. Add the files from your published Dashcode directory to the locations that the placeholders used to have. Do this by dragging and dropping or by right clicking and selecting Add->Existing Files. You can have Xcode copy the files into your application, this is good if you are sharing it with others, or you can not select the copy checkbox and it will refer to the files in their current location, good if you are going to continue development in Dashcode.
    6. If you told Xcode to copy the files you need to do a global search and   replace in Xcode for Images and replace it with a blank string.
    7. If you told Xcode to copy the files you need to do a global search and replace in Xcode for Parts and replace it with a blank string.
    8. If you told Xcode to copy the files you need to do a global search and replace in Xcode for QCiPhone and replace it with a blank string.
    9. Click ‘Build and Go’. If your project is set to use the simulator the app will run there. If it is set to use your device, it will install and run, assuming you follow apple’s instructions for distributing your applications to your device.
    I hope this helps.

    Syntax Highlighting for WordPress

    • My conversion from an online code formatting tool, that required me to copy and past and change settings, to the WordPress plug-in WP-Syntax has been like taking a blindfold off. I can actually see and read my code on my blog now! I love it!!!!! Life is soo much better when it is easier to read code. :-)

    • Simple Java Thread Example

      I decided to take a quick break from homework and write this simple thread example for my system integration lab project
      This code creates 3 threads that count. 1 thread counts to 2 million while the second 2 threads are set to split up the work. After all counting is done a summary of how long each took and what the time savings was.

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      package threadExample;

      import javax.swing.JOptionPane;

      public class CountingThreadExample {

      /**
      * Thread example created by @author Mike on 10/30/08
      */

      public static void main(String[] args) {
      //2,000,000,000
      Counter counter1 = new Counter("Counter 1");
      Thread thread1 = new Thread(counter1);
      Counter counter2 = new Counter(1000000000, "counter 2");
      Thread thread2 = new Thread(counter2);
      Counter counter3 = new Counter(1000000000, "counter 3");
      Thread thread3 = new Thread(counter3);
      thread2.start();
      thread3.start();
      thread1.start();
      while (counter1.getRunTime() == 0) {
      try {
      Thread.sleep(1000);
      }
      catch (InterruptedException e) {
      e.printStackTrace();
      }
      }
      long time1 = counter1.getRunTime();
      long time2 = counter2.getStartTime();
      long time3 = counter3.getEndTime();
      long splitWork = time3 - time2;
      long faster = time1 - splitWork;
      JOptionPane.showMessageDialog(null,
      "A single thread counted from 0 - 2,000,000,000 in "
      + time1 + " milliseconds.\n" +
      "Two threads that split the work did it in " +
      splitWork + " Milliseconds.\n" + "That is " + faster
      + " milliseconds faster!\n" +
      "If you have a multi-core processor and have a way to monitor\n"
      + "the usage, run this program again and watch each core.\n"
      + "1000 milliseconds = 1 second");
      }
      }
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      package threadExample;

      public class Counter implements Runnable{
      double max = 2000000000;
      String name = "No name";
      long runTime = 0;
      long startTime = 0;
      long endTime = 0;
      public Counter() {
      }
      public Counter(String name) {
      this.name = name;
      }
      public Counter(double max, String name) {
      this.max = max;
      this.name = name;
      }
      public void run() {
      startTime = System.currentTimeMillis();
      for (double i = 0.0; i <= max; i++) {
      // Does nothing, just counts.
      }
      endTime = System.currentTimeMillis();
      runTime = endTime - startTime;


      }

      public long getRunTime() {
      return runTime;
      }
      public long getStartTime() {
      return startTime;
      }
      public long getEndTime() {
      return endTime;
      }
      }


    • Java Reflection

      Java reflection rocks!!!! Being able to create a class object from a string is cool. Mix that with an interface and you can create objects based on string and make function calls that are defined in the interface without ever knowing what the object is or what methods it has, as long as the object implements the said interface. I created an example of reflection and interface use in the same code.

      The example takes place in a dance performance hall. A man object and a woman object is created which both are dancers because they both implement the dancer interface. The man and the woman are cast as dancers and then told to dance. No need to know all of their methods since I already know what dancers can do because of the interface. Now all that’s left to do is tell the dancers what to do.
      Run() Jump() Trip()! :-)

      All the classes are in my sandbox package. In order to create an object from text using reflection, the path to the class has to be known so what package I put the classes in is important but I only show it in the StartDance class code.

      1. public interface Dancer {
      2. public void jump();
      3. public void run();
      4. public void trip();
      5. public void rollCall();
      6. }
      1. public class Man implements Dancer{
      2. public void jump() {
      3. System.out.println("I jumped. Grrrr!");
      4. }
      5. public void run() {
      6. System.out.println("I ran. Grrrr!");
      7. }
      8. public void trip() {
      9. System.out.println("I triped. Grrrr!");
      10. }
      11. public void rollCall() {
      12. System.out.println("I am a Man. Grrrr");
      13. }
      14. public void goToWork() {
      15. System.out.println("I'm off to work. Grrrr");
      16. }
      17. }
      1. public class Woman implements Dancer{
      2. public void jump() {
      3. System.out.println("I jumped. Tehe!");
      4. }
      5. public void run() {
      6. System.out.println("I ran. Tehe!");
      7. }
      8. public void trip() {
      9. System.out.println("I triped. Tehe!");
      10. }
      11. public void rollCall() {
      12. System.out.println("I am a Woman. Hear me Roar!");
      13. }
      14. public void takeCareKids() {
      15. System.out.println("Kids are soo cute. Tehe");
      16. }
      17. }
      1. package sandbox;

      2. public class StartDance {

      3. @SuppressWarnings("unchecked")
      4. public static void main(String[] args) {
      5. String command1 = "sandbox.Man";
      6. String command2 = "sandbox.Woman";

      7. try {
      8. Class class1 = Class.forName(command1);
      9. Class class2 = Class.forName(command2);
      10. Dancer dancer1 = (Dancer)class1.newInstance();
      11. Dancer dancer2 = (Dancer)class2.newInstance();
      12. dancer1.run();
      13. dancer1.jump();
      14. dancer2.trip();
      15. dancer2.rollCall();
      16. }
      17. catch (Exception e) {
      18. e.printStackTrace();
      19. }
      20. }
      21. }

    The Case of the Failed File Copy

    The other day a friend of mine called me to tell me that he was having a problem copying pictures to a USB flash drive. He’d been able to copy over two hundred files when he got this error dialog, after which he couldn’t copy any more without getting the same message:

    Unfortunately, the message, “The directory or file cannot be created”, provides no clue as to the underlying cause and the dialog explains that the error is unexpected and does not suggest where you can find the “additional help” to which it refers. My friend was sophisticated enough to make sure the drive had plenty of free space and he ran Chkdsk to check for corruption, but the scan didn’t find any problem and the error persisted on subsequent attempts to copy more files to the drive. At a loss, he turned to me.

    I immediately asked him to capture a trace with Process Monitor, a real-time file system and registry monitoring tool, which would offer a look underneath the dialogs to reveal actual operating system errors returned by the file system. He sent me the resulting Process Monitor PML file, which I opened on my own system. After setting a filter for the volume in question to narrow the output to just the operations related to the file copy, I went to the end of the trace to look back for errors. I didn’t have to look far, because the last line appeared to be the operation with the error causing the dialog:

    To save screen space, Process Monitor strips the “STATUS” prefix from the errors it displays, so the actual operating system error is STATUS_CANNOT_MAKE. I’d never seen or even heard of this error message. In fact, the version of Process Monitor at the time showed a raw error code, 0xc00002ea, instead of the error’s display name, and so I had to look in the Windows Device Driver Kit’s Ntstatus.h header file to find the display name and add it to the Process Monitor function that converts error codes to text.

    At that point I could have cheated and searched the Windows source code for the error, but I decided to see how someone without source access would troubleshoot the problem. A Web search took me to this old thread in a newsgroup for Windows file system developers:

    Sure enough, the volume was formatted with the FAT file system and the number of files on the drive, including those with long file names, could certainly have accounted for the use of all available 512 root-directory entries.

    I had solved the mystery. I told my friend he had two options: he could create a subdirectory off the volume’s root and copy the remaining files into there, or he could reformat the volume with the FAT32 file system, which removes the limitation on entries in the root directory.

    One question remained, however. Why was the volume formatted as FAT instead of FAT32? The answer lies with both the USB drive makers and Windows format dialog. I’m not sure what convention the makers follow, but my guess is that many format their drives with FAT simply because it’s the file system guaranteed to work on virtually any operating system, including those that don’t support FAT32, like DOS 6 and Windows 95.

    As for Windows, I would have expected it to always default to FAT32, but a quick look at the Format dialog’s pick for one of my USB drives showed I was wrong:

    I couldn’t find the guidelines used by the dialog anywhere on the Web, so I looked at the source and found that Windows defaults to FAT for non-CD-ROM removable volumes that are smaller than 4GB in size.

    I’d consider this case closed, but I have two loose ends to follow up on: see if I can get the error message fixed so that it’s more descriptive, and lobby to get the default format changed to FAT32.


    Jan 26, 2009

    EJB3 testing -Don`t Panic



    For EJB3 testing, an interesting solution based on JBoss embedded package. Of course other alternative are available (Cactus, EJB3Unit...).

    Thanks to this solution, it is now possible to launch an embedded JBoss container in standalone (without the need to install and configure a full JBoss container).

    This solution is very interesting for testing purpose because there is no need to deploy and un-deploy each time on the server.

    This JBoss package includes all mandatory libraries used to validated an EJB3 solution:

    • 1 EJB3 container
    • The EJB3 Hibernate implementation
    • 1 embedded java database: HSQLDB
    • JUnit (3) for testing purpose

    For this tutorial, the embedded-jboss-beta3 is used and can be downloaded here

    All the tutorial sources is available here.

    Tutorial objective: Testing an EJB3 solution with JUnit based on

    • 1 entity bean (Person)
    • 1 session bean used for CRUD operation (Create, Remove, Update, Display)
    • 1 JUnit test case used to validate session bean operation

    Step 1: Download the embedded JBoss library

    Step 2: Create a startup project

    Create a project with your favorite IDE and import the JBoss embedded library (from the library and from the optional-lib directories). Do not forget to add all the .jar files in the classpath. Embedded configuration directory needs to be in the classpath also (/embedded-jboss/bootstrap).

    Step 3: Create your Entity bean

    For this tutorial, the Person class is created

    Step 4: Create your session bean

    For this tutorial, the PersonService session bean (interface and local implementation)

    Step 5: Create your JUnit test case

    It's the most interesting part of the tutorial.

    To create and deploy JUnit tests easily, JBoss provides an extension of the JUnit TestCase class, the BaseTestCase. This class needs to package the application hosting the testes. A dynamical jar builder is used to create the package.

    Step 6: Build your applications and tests with ant

    Ant 1.7 is used for this tutorial.

    Step 7: Run the tests

    The tests ant task is used. This task will execute all tests available in the test directory.

    An other ant task tests-report-html can be used to generate the report in html format.

    Step 8 (optional): Running multiple tests

    To avoid deploying and starting the JBoss container for each test case, it's possible to group all test cases in a suite by extending the JUnit TestSuite class.

    For the tutorial, the AllTests class has been used and 2 test cases has been added in the suite. The all-tests task is used to run the TestSuite.

    Conclusion

    Embedded JBoss seems to be an attractive solution for EJB3 testing with JUnit. For now, only the internal java DB is used for persistence but it seems possible to configure an other database like Mysql. I will try to cover this feature in a new post.

    The JUnit4 framework has not been tested and can be evaluated in an other post.


    Best Free Softwares for Windows

    There are thousands of well known softwares for Windows. Most of them are paid products. You may get confused while selecting the best suited software for you (as each of them claim to be THE BEST in their categories) and invest hundred dollars into something that was not worth a penny. So why don't I give you a deal that will help you in finding the best that too for free. Yes, today I am going to tell you about the best free softwares for Windows.
    • Best Antivirus
    • Best Archiving Tool
    • Best Audio Player
    • Best Video Player
    • Best office tools
    • Best Graphics/ Photo Editing Tool
    • Best 3d Modeling Tools
    • Best Note taking tools
    • Best Web Browser
    • Best Instant Messenger
    • Best Email Client
    • Best p2p File Sharing Tool
    • Best FTP/SFTP

    Desktop

    Best Antivirus

    1. Avira Anti-virus Software

    If you have read our previous article on guide to the best free anti-virus software for Windows, you know everything about it already, right? So why don't you try for Avira Antivir yourself?

    Download

    2. ClamWin

    Open Source Anti-Virus. Very good at detecting viruses. Can be plugged into MailServer for e-mail protection. I will prefer to keep it for a second choice. Stil Clamwin is a reliable guard nevertheless.

    Download

    Best Archiving Tool

    3. 7-Zip

    7-Zip is a file archiver that does everything that a file archiver can do. If you read our detailed comparison 15 best archiving tools you will understand why we have preferred it to others.

    Download

    Best MP3 and Audio Tools

    4. Media Monkey

    The best sound of music for Windows is Winamp, Media monkey. If you read our detailed review of the particular software, you will be downloading it with relief. With its specialized auto-dj options and the

    Download

    5. MP3 Gain

    Easy to use MP3 manipulation tool for Windows. adjusts sound levels on MP3's so they are all the same

    Download

    [Note: Audacity is the best Sound Recording tool. If you wanna record voice or sound then this is the best.]

    Best Video Software

    6. VLC Media Player

    VLC needs no mention. Its one of the best players ever. Plays more video files than most players: Quicktime, AVI, DIVX, OGG, and more. Pretty good interface.

    Download

    7. GOM Player

    GOM Video Player was my personal favorite and is too. If you haven't heard of it, here is a chance.

    So decide yourself. Which way do you want to go?

    Download

    Best Word Processing/ Office Tools

    8. OpenOffice.org

    Big, full featured suite of tools for word processing and spreadsheets. Compatible with and a free replacement for Microsoft Word documents. Also supports OpenDocument Format.

    Download

    9. AbiWord

    A word processor. Leaner and quicker than OpenOffice. Compatible with Microsoft Word documents and OpenDocument Format.

    Best Graphics / Photo Editing Tool

    10. GIMP

    Photo editing application that rivals Photoshop in features.
    Download

    11. Paint.NET

    Graphics editor with a very nice interface.
    Download

    12. Inkscape

    Vector graphics application.
    Download

    Best 3d Modeling Tools

    13. Google SketchUp7


    Google Sketch up 7 is a wonderful solution to 3d modeling field. Though the pro version comes with an expensive payment, the initial version, which is quite good, is impressive enough. Read our review to know more about it.

    14. Blender


    Powerful 3D Modeling software.
    Download

    Note Taking

    15. Freemind

    freemind

    An innovative application for note taking and outlining. Takes time to get used to, but some people swear by it.

    Download

    16. Keynote

    keynote

    Open Source note tak ing application, very good. I use this myself extensively
    Download

    Internet

    Best Web Browser

    17. Mozilla Firefox

    The premier free, open-source browser. Tabs, pop-up blocking, themes, and extensions. Considered by many to be the world's best browser.We had done our own test too to confirm on this issue.

    Download

    18. Google Chrome

    I will keep Google Chrome above Opera or any other web browser such as Maxthon etc because it has come a long way though we have seen it being launched this year only. We can expect more from chromium in years to come.

    IM - Instant Messaging

    19. Pidgin

    gaim

    Connect to multiple IM accounts simultaneously in a single app, including: AOL IM, MSN, and Jabber. I don't believe in too many softwares but AIO. Anyway, you can read our article on the best web messenger of recent times.

    Download

    Best E-mail

    20. Mozilla Thunderbird

    thunderbird

    Powerful spam filtering, solid interface, and all the features you need.

    Download

    Best P2P File Sharing Tools

    21. Cabos

    cabos

    A simple, easy to use filesharing program. Gnutella network.
    Download

    22. Gnucleus

    gnucleus

    A very good Gnutella search and download filesharing program.
    Download

    23. Azureus

    azureus

    A powerful, but complicated BitTorrent client. So many features you'll lose your mind.
    Download

    Best FTP / SFTP Tool

    24. Filezilla

    filezilla

    Excellent FTP program. Try it.

    Download

    While rambling on and on about these software I knew that there are so many categories that are being missed and it will take a humongous effort to jot all of them down into one. So, I promise to come up with one for developers and another for gamers in the next edition. Stay hooked and enjoy the free service.

    [source: opensourcewindows.org]

    The Latest Worm, Conficker or Downadup, Hit Millions of Computers Worldwide



    Conficker or Downadup, the fastest growing computer worm hit the internet, affecting millions of computers across the world, as per security expert. It takes advantage of windows vulnerability and spread by guessing the PC administrative password on net or by means of USB drive. China was affected the most with 29% infection and Argentinia stood second with 11% infection. The infection rate is about 1% in USA.

    The worm spread very fast almost like lighting speed and converts the infected PCs into a system called Botnet that accepts instructions accordingly from the master. The designer of the worm wrote some special code that hit the PC population at China and Brazil the most. The reason behind this may be that the piracy plays an important role for those countries. The botnet may operate in the background, using the infected computer to send spam or infect other computers, or it might steal the PC user’s personal information. Security experts are not sure yet how to fix the problem.

    Laptops Reviewed by me...

    Old desktops are getting too big and spacious to be true. So it is understandable if you wish to switch to a perfectly desktop replacable laptop now. Businessmen, students, gamers, normal users and more explicitly everyone wants to own a laptop that suits their specific demands. But amongst thousands of laptops to choose from, which one is the right one for you? If you are confused then lemme help you. We not only have 11 best laptops at display here but also we have categorized which one is best for whom.

    We have maintained separate categories for the best value for money laptops, best looking laptop, best business oriented laptop and we haven’t disappointed the gamers and the students either. So why don’t we start our journey?

    Categories

    (the numbers don’t actually suggest any preferential order)

    Best Value Notebooks

    1. Dell Inspiron 6400

    Dell Inspiron 6400 is a stylish product with exceptional screen quality - easy to use, portable, powerful and versatile. I don’t know bout what astounded me most was users’ delight. I have used it and have read at least 50 comments from genuine users who have given their thumbs up for this system.

    It comes in a fantastic Artic Silver and Alpine White design.

    It offers upto five hours of battery life for watching movies or gaming without re-charging your batteries. and that is actually true.

    Another point I will like to make is the flexibility of Dell to provide plenty of options at the point of purchase.

    Features

    • Choice of Windows operating systems including Ubuntu Edition version 7.04.
    • Models come with an Intel Core 2 Duo (up to 2.00 GHz)
    • 15.4inches display
    • SATA hard drive (up to 160 GB)
    • DDR2 SDRAM (up to 2 GB)
    • Wireless options include wireless LAN
    • Integrated Dual-Band (802.11 a/b) antenna
    • Integrated Intel Pro/Wireless 3945 (802.11a/b/g) or Dell Wireless 1500 network connections.
    • A 5-1 card reader and front-access multimedia buttons
    • S-Video (TV-Out) port, IEEE 1394 (Firewire) and four built-in USB 2.0 interfaces

    Cons

    1. At this time, the specs may look old because obviously its not a new laptop and if you want an absolutely superfast machine with HUGE storage, then this is not for you.
    2. Dell’s customer service support is not upto the mark

    2. Fujitsu-Siemens Amilo Pi

    You may feel what the hell an F-S combination doing here. But as I am talking about a best value laptop, I can not but talk of this one as I have used this. It is pretty reliable and provides high end gaming support as well. and the price is also reasonable.

    Amilo Pi 1536 is an award-winning laptop, picking up a Best Buy from Computer Buyer magazine.

    Features

    • 1.83GHz core duo processor from Intel, which isn’t the fastest in the world, but is more than enough to power you through most tasks.
    • 1GB of memory (RAM)
    • A 120GB hard drive
    • 15.4in screen and a standalone graphics card,
    • It has built in wireless connectivity
    • A combined DVD and CD writer
    • Slots: 1 x Expresscard; SD/MMC/MS card slot
    • Ports: 3 x USB 2.0 (2 on left, 1 on right)
      o Firewire port (right)
      o DVI output (right)
      o S-Video out (right)
      o Gigabit Ethernet LAN (right)
      o Headphone and SPDIF optical combined (left)
      o Microphone (left)
      o Modem Telephone jack V.92 56 K (back)
      o Power (back)
    • Battery: 4400MAh Li-Ion

    There is another cool feature in it that I liked, is its whisper mode. It’s a button with a fan icon on it, and when activated, it slows down the CPU and the graphics card. This is great for just normal office work, and even better when you’re running on battery power.

    Cons

    • Poor speakers
    • ATI X1400 drivers not formally supported (ATI’s fault!)
    • Not great battery life
    • No Bluetooth

    3. Gateway P-7811FX

    Yes you can slam me for bringing in names that are perhaps never heard of. But now you will have to.

    Gateway P-7811FX features a high-end Centrino 2 CPU and Nvidia GeForce 9800 graphics card for an incredibly reasonable price ($1500); higher screen resolution than previous models; 4GB of RAM and 64-bit OS.

    Features

    • Processor of 2.26GHz Intel Core 2 Duo P8400
    • Memory- 4GB, 667MHz DDR3
    • Hard drive- 200GB 7,200rpm
    • Chipset- Intel P45
    • Graphics- Nvidia GeForce 9800M GTS
    • Operating System- Windows Vista Premium (64-bit)
    • Dimensions (WDH)- 15.7 x 12.2 x 1.6 inches
    • Screen size (diagonal) - 17.1 inches
    • Video- VGA, HDMI, VGA-out, S-video, HDMI
    • Audio- Stereo speakers, headphone/microphone jacks, Stereo speakers with subwoofer, headphone/microphone jacks.
    • Data- 3 USB 2.0, mini FireWire, SD card reader, eSATA 4 USB 2.0, mini FireWire, SD card reader
    • Expansion- ExpressCard/54 ExpressCard/54
    • Networking- Modem, Ethernet, 802.11 b/g/n Wi-Fi modem, Ethernet, 802.11 b/g/n Wi-Fi, optional Bluetooth
    • Optical drive- DVD burner

    Cons

    Nothing much. lacks a few basic amenities, such as Bluetooth and a fingerprint reader.

    Best Style & Graphics Laptop

    1. Apple Macbook

    When it comes to delicacy, sophistication and graphics, there are very few who can compete with Apple. Because, Steve jobs and co. are always working for sleek and cheek designs lol. So if you are sure to dive into Mac, and as I find no alternative but to let you do so, Apple macbook is the one for you, Its so refined in looks and less in noise that you sometimes feel like driving Chevrolet Spark in a highway. (lol, weird comparisoin I know, but if you have owned a sparky you will know)

    Features

    • Mac OS X v10.5.5 (Build 9F2114)
    • Intel Core 2 Duo P7350 2.0GHz (3MB L2 cache, 1066MHz frontside bus)
    • 2GB 1067MHz DDR3 SDRAM
    • 160GB 5400rpm SATA hard disk drive
    • 13.3″ glossy widescreen TFT LED backlit display (1280 x 800)
    • NVIDIA GeForce 9400M graphics (256MB of DDR3 shared memory)
    • 8x slot-loading SuperDrive (DVD±R DL/DVD±RW/CD-RW)
    • iSight webcam
    • AirPort Extreme WiFi (IEEE 802.11a/b/g/n)
    • Bluetooth 2.1 + EDR (Enhanced Data Rate)
    • Mini DisplayPort, Ethernet, two USB 2.0 ports (480Mbps), Audio out and microphone in
    • Dimensions : 0.95″ x 12.78″ x 8.94″ (H x W x D)
    • Weight: 4.51 pounds
    • Integrated 45-watt-hour lithium-polymer battery
    • 60W MagSafe power adapter with cable management system

    Cons

    • No Firewire ports
    • No standard video out ports
    • No eSATA port
    • All the ports are located on one side
    • Flat keyboard keys
    • 13-inch mirror masquerading as a display
    • It’s a Mac and I am not too comfortable with that. sorry I don’t intend to offend any Mac user. Its personal.

    2. Apple Macbook Pro

    When Apple Macbook is here, how can we leave the younger and more stylish brother behind. The new MacBook Pro is unquestionably Apple’s most revolutionary notebook to date, the build quality is simply unmatched, while its size and weight to performance ratio is excellent; allowing you to multi-task and game comfortably ( Apple macbook pro needs no real introduction in the world of laptop enthusiast. or macbook rather.

    Features

    • Mac OS X v10.5.5 Leopard and Windows XP SP3 (Boot Camp)
    • Intel Core 2 Duo P8600 2.4GHz (3MB L2 cache, 1066MHz frontside bus)
    • 2GB 1066MHz DDR3 SDRAM
    • 250GB 5400rpm Serial ATA hard disk drive
    • 15.4″ glossy widescreen LED backlit display (1440 x 900)
    • Integrated Nvidia 9400 graphics (256MB of shared memory) and Discrete Nvidia 9600M GT (256MB of shared memory)
    • iSight webcam
    • AirPort Extreme WiFi (IEEE 802.11a/b/g/n)
    • Bluetooth 2.1 + EDR (Enhanced Data Rate)
    • Mini Display port, 2 x USB 2.0 port (480Mbps), Audio out, mic, ExpressCard, FireWire 800
    • Dimensions : 0.95 x 14.35 x 9.82 inches (H x W x D)
    • Weight: 5.5 lbs
    • Integrated 50-watt-hour lithium-polymer battery
    • 85W MagSafe power adapter with cable management system (6.5oz)

    Cons

    • Expensive($1999! no thank you)
    • Lower specced than cheaper models from Dell, Sager, Lenovo
    • Few ports
    • No matte screen option

    Best Business Laptop

    1. Toshiba Satellite Pro S300M

    Businessmen usually look for laptops that are more sturdy, reliable and resource-ful to run major processes within the computer. keeping that in mind, I had to say good bye to old friend Lenovo Thinkpad T61 and bring in brand new Toshiba Satellite Pro S300M.

    Features

    • Intel Core 2 Duo Processor (T5870)
    • 3GB of RAM
    • 250GB hard drive
    • DVD burner.
    • Intel’s GMA 4500MHD integrated graphics.
    • Windows XP & Vista

    Other notable features are,

    • EasyGuard Technology
    • Face Recognition Software
    • Express Port Replicator
    • Business Card Reader Software

    Cons

    • Lesser battery life
    • Very bad looking

    And as I don’t have a particular fascination for these business laptops, I can’t be adept enough to talk about them. Let’s go the next section which is my favorite.

    Best Entertainment and Gaming Laptop

    1. Toshiba Qosmio G45

    he Toshiba Qosmio G45 is a full entertainment system packed into one slightly over-sized 17” widescreen notebook. It combines a 1080P high-resolution display, HD-DVD Player, surround sound system, ATI Cable-Card HDTV Tuner, and gaming machine into one device that can be carried to different locations inside your backpack.

    Features

    • OS: Windows Vista Ultimate (32-bit)
    • Processor: Intel Core 2 Duo Processor T9300 (2.50GHz, 6MB L2, 800MHz FSB)
    • Chipset: Mobile Intel P965 Express Chipset
    • Wireless: Intel Wireless WiFi Link 4965AGN (802.11a/g/n), Bluetooth version 2.0 plus Enhanced Data Rate (EDR)
    • Memory: 3GB PC2-5300 DDR2 SDRAM (maximum capacity 4GB)
    • Hard Drive: 320GB Total Space (160GB x 2)
    • Optical Drive: HD DVD-R/DVD SuperMulti (+/- double layer) drive (in one optical drive), supporting 13 formats
    • Screen: 17.0″ diagonal widescreen TrueLife TFT LCD display at 1920×1200 (WUXGA, Glossy)
    • Graphics: 512MB nVidia GeForce Go 8600m GT
    • Webcam: 2.0 megapixel webcam
    • Slots: ExpressCard slot (ExpressCard/34 and Express Card/54) and PC-Card Slot, 5-in-1 media card reader
    • Ports: VGA, HDMI, and S-Video out, Mic, 2 Headphone, line out, 2 IR out, IEEE-1394 (FireWire), Five USB 2.0 ports
    • Dimensions (WxDxH Front/H Rear): 17.25″ x 11.75″ x 1.759″
    • Weight: 10.6 Advertised, 9lbs 15oz actual w/ battery
    • 120W (15V x 8A) 100-240V AC adapter
    • 9-cell (70.5Ah) Lithium Ion battery
    • 1-Year Standard Limited Warranty

    Cons

    • Gaming performance lackluster compared to others in the same price bracket.

    2. Alienware Area-51 m17x

    Alienware is one of the few well wishers for gamers in this world. The Alienware really shines when packed out with dual Nvidia GeForce 9800 GPUs and an Intel Core 2 Extreme X9000 processor. Of course, few people, even serious gamers, need that much horsepower, but as a display of conspicuous consumption, it’s hard to beat, with an illuminated keyboard, imposing new black-slab aesthetic, and a Blu-ray drive.

    Features

    • Processor- 2.8GHz Intel Core 2 Extreme X9000
    • Memory- 4GB, 667MHz DDR2
    • Hard drive- 1TB 5,400rpm (500GB x2)
    • Chipset- Intel PM965
    • Graphics - Nvidia GeForce 9800M GT (x2)
    • Operating System- Windows Vista Home Premium
    • Dimensions (WDH)- 6.1 x 11.5 x 2.1 inches
    • Screen size (diagonal)-17.1 inches

    Cons

    • Starting configurations are overpriced ($2000). Still if you are looking for a good deal with alienware, then you can look at the New Alienware Gaming Grid
    • Touch controls are a bit wonky.

    Best Ultimate Laptops

    1. Sony Vaio AR21S Laptop

    Perhaps the most interesting thing about this laptop is that it includes a Blu-Ray disc drive. Blu-Ray technology hopes to take over from DVD as the new high capacity storage format, and Sony is championing its cause in the AR21S. It is a big step up from DVD, although you can still play all your old DVDs and CDs in a Blu-Ray drive.

    Its a true media centre PC.

    Features

    • Processor: Intel Core 2 Duo T7200 - 2.06GHz (x2), 667MHz FSB, 4MB L2 Cache
    • RAM: 2048MB DDR2-667MHz
    • Hard Drive: 200GB Serial ATA 5400rpm (2×100GB)
    • Screen: 17″ Widescreen TFT (1920×1200 - 16:10)with X-Black Technology
    • Optical Drive: DVD±RW / BD-RE Blu-Ray Super Multi Double Layer
    • Graphics: NVidia GeForce Go7600 256MB
    • Wireless LAN: 802.11a/b/g - Call for advice on Wireless Networking
    • Bluetooth: Bluetooth Enabled
    • Warranty: 1 Year - Upgradeable to 3 Years!
    • Operating System: Windows XP Media Center Edition
    • Hybrid TV Tuner (Digital + Analogue)
    • Built-In 0.37 MegaPixel Camera
    • Built-In Microphone

    Cons

    • Excessive price (1800$)
    • Poor customer service

    2. Lenovo ThinkPad X300

    The ThinkPad X300 is a premium product that’s worth the price if you need the features it offers. The X300’s excellent portability, abundance of wireless options, built-in optical drive, SSD advantage, great screen, fantastic keyboard, and second-to-none build quality all add up to a notebook that’s easy to recommend to business users who consider a notebook to be an important part of their success with work.

    Features

    • Processor: 1.20GHz Intel Core 2 Duo L7100 (800Mhz FSB, 4MB Cache)
    • Graphics: Intel X3100
    • Screen: 13.3-inch WXGA+ (1440 x 900, 300 nit) LED backlit display
    • Memory: 2GB (up to 4GB configurable)
    • Storage: 64GB SSD
    • Optical Drive: Ultra-thin DVD Burner
    • Wireless and Communications: Intel 4965AGN (802.11 a/b/g/n wi-fi), BlueTooth 2.0 EDR, Intel UWB, GPS, Verizon WWAN (EV-DO)
    • Battery: 6-cell Li-Polymer extended life battery (3-cell Li-Polymer battery available and multi-bay extended life 3-cell battery)
    • Ports: 3 USB 2.0 ports, Monitor out port, AC adapter, headphone/line-out, microphone/line-in, Gigabit Ethernet
    • Dimensions: 12.4″ x 9.1″ x 0.73″ - 0.92″
    • Weight: from 2.93lbs with 3-cell battery and no optical drive to 3.32lbs with 6-cell battery and DVD Burner in
    • Port Replicator: Via USB
    • Input: Full sized keyboard, trackpoint navigation, touchpad, fingerprint reader
    • Operating System: Windows XP Professional (Windows Vista available in various flavors)
    • Other Features: Integrated web camera
    • Warranty: 1-year

    Cons

    • No SD card reader
    • 64 GB SSD is not at all the mark of a high end laptop we are looking for
    • No expansion dock capability, USB based port replicator only
    • No ExpressCard or PC card slot
    • Starting price of $2,500 is out of range for many people

    Best Budget Laptop

    1. Compaq CQ50100EM

    The best feature of Compaq Cq5010EM is its price, $488. You can get a laptop within $500 and that is the best part. Rest is as follows. We have generously overlooked the minimal cons because of the price.

    Features

    • Screen Size in Inches- 15.4
    • Operating System- Windows Vista Home Basic
    • Hard Disk Capacity- 120GB
    • Bluetooth- No
    • DVD Writer- Yes
    • RAM- 1GB
    • WiFi- Yes
    • Processor- Sempron SI-40
    • Graphic Card- nVidia
    • Integrated webcam

    Cons

    • Low Battery life
    • no bluetooth

    In Conclusion

    There are many laptops that I couldn’t mention here but had wished to. And again, I have talked about some not-so-new laptops too. But, the whole point was to test the laptops w.r.t. time. The time tested laptops are what I have found more reliable. Do you have anything to add to my list or do you want me to review any laptop you wish to? Write to me.