Monday, 17 February 2014

List all Perl CPAN modules installed on the system

In order to list all the CPAN modules installed on a system, use the following command :

instmodsh

Now you'll see the following menu : 

Available commands are:
   l                      - List all installed modules
   m <module>   - Select a module

   q                     - Quit the program

cmd? l

On entering option l, it will display the complete list of modules installed on the system.

Eg: 

   Net::HTTP
   PDF::API2
   PDF::Report
   PDF::Report::Table
   PDF::Table
   Params::Validate
   Parse::CPAN::Meta
   Perl
   Perl::Destruct::Level
   Perl::OSType
   Probe::Perl
   SOAP::Lite

Wednesday, 12 February 2014

Oracle Weblogic 12c Installation Guide on Mac OSX

This post will walk you through the installation of Oracle Weblogic Application Server 12c on a Mac OSX machine.

First of all, visit the official Oracle Weblogic download page and download the latest generic version. You would need to create a Oracle ID first. Accept the agreement and start the download. In this example, we would download the Weblogic v12.1.2. The filename in this case is wls_121200.jar

Also, note that the generic version does not come with JVM / JDK for its installation. So make sure, you have Java installed on your machine.

Once downloaded, note the following steps :

Run the following command to initiate the installer

java -d64 -Dspace.detection=true -Xmx1024m -jar wls_121200.jar

This will start the extraction of the wls_121200.jar and also perform some routine system pre-requisite checks. Note the arguments that we passed. The space.detection parameter is set to true to detect available space. Also, the max memory usage size by JVM is set to 1024m i.e 1 GB.


Now, you'll the following installer GUI screens.



In the next screen, you'll see the option to modify or change location of Oracle_Home directory. Leave it to default option if you don't want to modify the location. Click Next.


In the following screen, you have to choose the type of installation. Choose the default option. However, choosing the Complete Installation will also install OPatch and some examples like medrec. 


In next screen, you can see the overall Installation summary. Save the response file if you intend to perform silent installations in the future. Check this link for reference. Click Next.


This will start the installation process. This will take a few minutes. You can observe the overall progress here.



Once the installation is completed, you'll see the following screen. Click Finish. This will initiate the next step - Configuration Wizard.


Below is the welcome screen of the Wizard.


Following is the first screen of the Configuration Wizard. Here you can set the Weblogic Administrator account and define the Parent domain location. Click Next.


In next screen, you'll see the progress of the domain creation.


Now, in the next and final screen, you'll see the Configuration success scene. Here you can check the option to start domain. Leave it unchecked, so that we can start it manually. Click Finish. That's pretty much a plain vanilla installation of Oracle Weblogic server 12c on Mac OSX machines.

In my next post, I'll cover how to start and stop Weblogic 12c and any associated issues related to it.

Monday, 10 February 2014

Info on decryptedFile.dmg - Mac OS X

I've come across many users who get confused or panicked, the moment they see something strange like "decryptedFile.dmg" in the Disk Utility. Well usually, it is the remnants of the last Flash Player install / update that you performed. Seemingly it is a harmless dmg. Although there is a well-known malware named Flashback, which disguises itself as the decryptedFile.dmg.

If you feel like it might be Flashback, check this link for detailed instructions on how to remove it manually. (Your system is clean if you have to jump from steps 1-3-8-9)

If its not the malware, then note these simple instructions for how to remove the harmless dmg from your system :
  • Open Disk Utility
  • From the left pane, control-click decryptedFile.dmg and choose the eject option
  • Again control-click decryptedFile.dmg and choose "Reveal in Finder" option.
  • Now, once you see the file in Finder (usually it's located in the sub-folders of /var/folders), delete it using Cmd-delete
Also, refer the following Apple Discussion page for more related content.

Types of Paper Shredders - A Comparison

In an office environment, all companies maintain sensitive documents. Over time, one is often required to shred and dispose the papers containing some valuable sensitive information. That's when a shredder comes into the picture, in order to shred huge volumes of paper in a short span of time.

The main advantages of using a paper shredder is its speed, its automation, ability of handle large volumes.

When it comes to paper shredders, there are roughly about 4 types of machines used for shredding (each identified by the style of shredding) as follows :
  • Strip-cut Shredders
  • Cross-cut Shredders (Confetti, Diamond cuts)
  • Micro-cut Shredders
  • Super-Micro-cut Shredders
Strip-cut shredders are the most basic, cheapest form of shredders. It cuts papers in strips. Note that, with some effort, these strips can be put back together and the document can be reconstructed. Hence these shredders are extremely the low level types and are not secure. These shredders are just perfect for basic home or small office use.

Eg : Fellowes 4690001 Powershred 90S 18-Sheet Strip Cut Shredder

Image Courtesy : Amazon

Cross-cut shredders add an extra level security by cutting the paper in cross cuts. Usually, in diamond or confetti cuts. This makes it more difficult to reassemble the pieces to reconstruct the original document. These can shred CD's and credit cards as well.

Eg : Swingline Hands-free 100-Sheet Super Cross Cut Shredder


Image Courtesy : Amazon

Micro-cut shredders are considered even more secure since they cut the papers in much smaller sizes than strip-cut. Just like the cross-cut varieties, these can shred CD's and credit cards as well.

Eg : SimplyShred 10-Sheet Micro Cut Heavy Duty Shredder


Image Courtesy : Amazon

Super Micro-cut shredders are even secure than micro-cut varieties since the cutting size is even much smaller. Thus making it extremely difficult to reconstruct the document.

Similarly, Confetti and Diamond shredders cut papers in specific shapes and are quite useful for extra added security.

Note that most good quality top-shelf products come jam-detection functionality to detect any paper jams. Check each product's specifications to suit your needs before buying.

If you plan to use shredders for heavy duty industrial purpose, then maybe you should try the following industrial strength products :

Intimus Cross Cut Shredder

Swingline CX40-59 Commercial Shredder

Thursday, 6 February 2014

Out of the Furnace 2013 - Limitless goofup

Hey guys, did you notice a weird thing on Google? When you google for "Out of the furnace", notice the topmost result. The 2-line description snippet of the IMDB link to Out of the Furnace, is actually the description for the Limitless movie. Is it just me or you see it as well? Looks like a Google goofup :)



Monday, 3 February 2014

Encrypt Tomcat Manager Password

In my previous post, we discussed about access to Tomcat Manager. In this post, we will discuss how to encrypt the Tomcat Manager password to make it more secure.

Recall that we had entered a plaintext password in the tomcat_users.xml file for access to Tomcat Manager. In this post we'll see how to encrypt the plaintext string using either SHA or MD5 encryption.

Go to bin folder within your Apache Tomcat home folder { eg: /usr/temp/apache-tomcat-7.0.47/bin }

Run the script digest.sh and pass your plaintext password to it in following way:

./digest.sh -a sha abc123  { For SHA encryption }  The output will give SHA encrypted password

abc123:6367c48dd193d56ea7b0baad25b19455e529f5ee

Alternatively use ./digest.sh -a md5 abc123 { If you intend to use MD5 encryption }

Note this encrypted password somewhere as you'd need this later.

Now, go to the conf folder and edit the tomcat-users.xml. Enter this encrypted password for the admin role instead of the plaintext password you entered previously for accessing tomcat manager.

Eg:

<user username="admin" password="6367c48dd193d56ea7b0baad25b19455e529f5ee" roles="admin-gui,admin-script,manager-gui,manager-script"/>

Now, lets edit the server.xml file, which also is present in the conf folder.

Search for the following text:

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

Once you locate the above code block, we just have to add digest="sha" at its end.

<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase" digest="sha"/>

Check out the screenshot for reference


Restart the Tomcat server so that the changes take effect.

Inserting values in Perl Tk Listbox

Perl programming language can be used to design GUI interfaces as well. Some most known modules used for this are Tk, Prima, Gtk2, wxPerl. Most popular and broadly used module is the Tk module. Thanks to the extensive documentation and easy learning curve.

In this post, we'll cover a basic tutorial using Perl Tk. We will create a basic listbox and insert array values into it.

First of all, download the Tk module and install it. If you're not aware about how to install Perl modules, we'll cover those basics in another post.

Consider the following piece of code :

use Tk;
use Tk::Listbox;

#This is the array containing values, which will be inserted into the listbox

my @values1 = qw(China Russia India Brazil USA UK);

#This is the code for defining the main window size along with the window title.

my $m = MainWindow->new;
$m->geometry("320x300");

$m->title("Listbox values Example");

# This is the definition of the Listbox. Try tweaking its parameters to modify its design.

my $lb = $m->Listbox(
-background =>'Yellow',
-font => 'Helvetica',
-foreground => "Red",
-selectborderwidth => '2',
-selectmode => "single",
-width => "15",
-exportselection => 1
)->pack();

#This is the syntax for inserting values into the defined listbox.

$lb->insert('end', @values1);

MainLoop;

Save the program as ListBox_Eg.pl and run it. (perl ListBox_Eg.pl). The output window would be as follows :


Note the above code will work on Windows and OSX alike, since Perl is a platform independent programming language.
Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker