Pages

Unixbhaskar's Blog

Thursday, March 14, 2013

Git is cool and awesome!!


Using a version control system is a mandatory thing for software developments.I have personally use svn and to be very frank stumble a lot.

But when I look in git , I feel more comfortable and at home kinda feeling.Those of you are serious about it,should look in here to get your hands dirty.

First read it here

If you are impatience one like me then should start using it here
,provided you have little bit of understanding what you are doing.Just to get an feel for it and how it works.

I will update this space if I got time again with my own work...BTW you can visit my nonsense github page if you like...nothing in it...take a look..

https://github.com/unixbhaskar/

Here are few interaction with my git setup for your reference:

To see the branches:

bhaskar@Fedora_09:10:40_Sat Mar 16:~/git-linux> git branch -a
master
* testing
remotes/origin/testing


To see the my commits :


bhaskar@Fedora_09:17:57_Sat Mar 16:~/git-linux> git log -a
commit b8f0d469a3b525a524afc0905129cbb2d2248985
Author: Bhaskar Chowdhury
Date: Mon Feb 25 13:29:01 2013 +0530

adding an pattern file for ignore stuff

commit e9cf99dd57137312fe9da7d34418fbf2409856d3
Author: Bhaskar Chowdhury
Date: Mon Feb 25 12:59:04 2013 +0530

addming git source dir

commit 5e54a5e38848d547c098c829146c014ee9422720
Author: Bhaskar Chowdhury
Date: Fri Feb 22 20:15:04 2013 +0530

modified repo a bit

commit 43e5a004f3d8a56fdaa86103ae56fdc31ab5a60c
Author: Bhaskar Chowdhury
Date: Fri Feb 22 18:00:03 2013 +0530

added repo.rb

commit c7ec4663d18cb06a1179046e70b90d3cef9e8406
Author: Bhaskar Chowdhury
Date: Fri Feb 22 16:16:11 2013 +0530

suffed

commit ea7d06fe2088817b5c6a4c03f63b16956c1da950
Author: Bhaskar Chowdhury
Date: Fri Feb 22 16:15:09 2013 +0530

This is my commit

commit 3e84deef2bb7c25366fa618c0fe52c8c15de5d81
Author: Bhaskar Chowdhury
Date: Fri Feb 22 14:49:43 2013 +0530

This is comitted for testing

commit 2eedaf89ab7207b2e1b19beaedba8f2f0ec2bda7
Author: Bhaskar Chowdhury
Date: Fri Jun 29 12:30:55 2012 +0530

Setup repository


How to change branch:



bhaskar@Fedora_09:19:16_Sat Mar 16:~/git-linux> git status
# On branch testing
nothing to commit, working directory clean
bhaskar@Fedora_09:20:48_Sat Mar 16:~/git-linux> git checkout master
Switched to branch 'master'
bhaskar@Fedora_09:20:56_Sat Mar 16:~/git-linux> git status
# On branch master
nothing to commit, working directory clean


File add and commit to the testing branch:


bhaskar@Fedora_09:23:13_Sat Mar 16:~/git-linux> touch vpn_core
bhaskar@Fedora_09:23:29_Sat Mar 16:~/git-linux> git add vpn_core
bhaskar@Fedora_09:23:33_Sat Mar 16:~/git-linux> git status
# On branch testing
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# new file: vpn_core
#
bhaskar@Fedora_09:23:54_Sat Mar 16:~/git-linux> git commit
[testing f4853f9] this is for testing purpose with vpn core
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 vpn_core
bhaskar@Fedora_09:25:39_Sat Mar 16:~/git-linux> git status
# On branch testing
nothing to commit, working directory clean
bhaskar@Fedora_09:25:47_Sat Mar 16:~/git-linux> git log
commit f4853f968ea1231cd65864972736c94c938241cd
Author: Bhaskar Chowdhury
Date: Sat Mar 16 09:25:21 2013 +0530

this is for testing purpose with vpn core


Restricting the log to specific number of commits...you might not interested in others:



bhaskar@Fedora_09:29:16_Sat Mar 16:~/git-linux> git log -p -2
commit f4853f968ea1231cd65864972736c94c938241cd
Author: Bhaskar Chowdhury
Date: Sat Mar 16 09:25:21 2013 +0530

this is for testing purpose with vpn core

diff --git a/vpn_core b/vpn_core
new file mode 100644
index 0000000..e69de29

commit b8f0d469a3b525a524afc0905129cbb2d2248985
Author: Bhaskar Chowdhury
Date: Mon Feb 25 13:29:01 2013 +0530

adding an pattern file for ignore stuff

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*~


Elaborate information about commits with stat option with log


bhaskar@Fedora_09:31:37_Sat Mar 16:~/git-linux> git log -p -2 --stat
commit f4853f968ea1231cd65864972736c94c938241cd
Author: Bhaskar Chowdhury
Date: Sat Mar 16 09:25:21 2013 +0530

this is for testing purpose with vpn core
---
vpn_core | 0
1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/vpn_core b/vpn_core
new file mode 100644
index 0000000..e69de29

commit b8f0d469a3b525a524afc0905129cbb2d2248985
Author: Bhaskar Chowdhury
Date: Mon Feb 25 13:29:01 2013 +0530

adding an pattern file for ignore stuff
---
.gitignore | 1 +
1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@


This is cool to see all at once with hash value of commit:


bhaskar@Fedora_09:32:50_Sat Mar 16:~/git-linux> git log --pretty=oneline
f4853f968ea1231cd65864972736c94c938241cd this is for testing purpose with vpn core
b8f0d469a3b525a524afc0905129cbb2d2248985 adding an pattern file for ignore stuff
e9cf99dd57137312fe9da7d34418fbf2409856d3 addming git source dir
5e54a5e38848d547c098c829146c014ee9422720 modified repo a bit
43e5a004f3d8a56fdaa86103ae56fdc31ab5a60c added repo.rb
c7ec4663d18cb06a1179046e70b90d3cef9e8406 suffed
ea7d06fe2088817b5c6a4c03f63b16956c1da950 This is my commit
3e84deef2bb7c25366fa618c0fe52c8c15de5d81 This is comitted for testing
2eedaf89ab7207b2e1b19beaedba8f2f0ec2bda7 Setup repository


With time:



bhaskar@Fedora_09:32:52_Sat Mar 16:~/git-linux> git log --pretty=format:"%h - %an, %ar : %s"
f4853f9 - Bhaskar Chowdhury, 10 minutes ago : this is for testing purpose with vpn core
b8f0d46 - Bhaskar Chowdhury, 3 weeks ago : adding an pattern file for ignore stuff
e9cf99d - Bhaskar Chowdhury, 3 weeks ago : addming git source dir
5e54a5e - Bhaskar Chowdhury, 3 weeks ago : modified repo a bit
43e5a00 - Bhaskar Chowdhury, 3 weeks ago : added repo.rb
c7ec466 - Bhaskar Chowdhury, 3 weeks ago : suffed
ea7d06f - Bhaskar Chowdhury, 3 weeks ago : This is my commit
3e84dee - Bhaskar Chowdhury, 3 weeks ago : This is comitted for testing
2eedaf8 - Bhaskar Chowdhury, 9 months ago : Setup repository



I believe this will kick you for starting!...please consult the link on top of this article to know more about git and get a hand on thing on it.

Hope this will help.

Cheers!
Bhaskar

Wednesday, January 9, 2013

How to enlist installed packages on Gentoo

Okay,I haven't write anything about sometime.So start this year with very rudimentary little info.

Say, I would like to see how many packages are installed in system running Gentoo? So ,how do i do that?

Actually couple of ways to do that.First and foremost thing to do, installed a package called gentoolkit .Once this is installed all the hard is done!

Lets explore it.

bhaskar@GentooLinux_17:52:33_Wed Jan 09:~> sudo genlop -t gentoolkit
Password:
* app-portage/gentoolkit

Wed Aug 17 11:48:34 2011 >>> app-portage/gentoolkit-0.3.0.4
merge time: 10 seconds.

Fri Oct 14 10:34:59 2011 >>> app-portage/gentoolkit-0.3.0.4-r4
merge time: 9 seconds.

Wed Dec 21 10:15:12 2011 >>> app-portage/gentoolkit-0.3.0.4-r5
merge time: 11 seconds.

Fri Jun 15 12:42:17 2012 >>> app-portage/gentoolkit-0.3.0.5
merge time: 23 seconds.

Fri Jul 13 11:15:24 2012 >>> app-portage/gentoolkit-0.3.0.6-r3
merge time: 27 seconds.

Wed Dec 19 12:21:43 2012 >>> app-portage/gentoolkit-0.3.0.7
merge time: 14 seconds.

So, I have installed it.Now this package come with lot of utility tools.One of them is called "equery" and I am gonna use it to show ,how it can be useful in this regards.

bhaskar@GentooLinux_17:52:49_Wed Jan 09:~> sudo equery list "*"
* Searching for * ...
[IP-] [ ] app-accessibility/at-spi2-core-2.6.2-r1:2
[IP-] [ ] app-accessibility/caribou-0.4.5:0
[IP-] [ ] app-admin/apache-tools-2.2.23:0
[IP-] [ ] app-admin/apachetop-0.12.6-r1:0
[IP-] [ ] app-admin/apg-2.3.0b-r5:0
[IP-] [ ] app-admin/drush-5.1:0
[IP-] [ ] app-admin/eselect-1.3.1:0
[IP-] [ ] app-admin/eselect-ctags-1.13:0
[IP-] [ ] app-admin/eselect-esd-20060719:0
[IP-] [ ] app-admin/eselect-fontconfig-1.1:0
[IP-] [ ~] app-admin/eselect-gnome-shell-extensions-20111211:0
[IP-] [ ] app-admin/eselect-mesa-0.0.10:0
[IP-] [ ] app-admin/eselect-opencl-1.1.0-r1:0
[IP-] [ ] app-admin/eselect-opengl-1.2.6.1:0
[IP-] [ ] app-admin/eselect-php-0.6.2:0
[IP-] [ ] app-admin/eselect-pinentry-0.3:0
[IP-] [ ] app-admin/eselect-python-20100321:0
[IP-] [ ] app-admin/eselect-qtgraphicssystem-1.1.1:0
[IP-] [ ] app-admin/eselect-ruby-20100603:0
[IP-] [ ] app-admin/eselect-vi-1.1.7-r1:0
[IP-] [ ] app-admin/eselect-xvmc-0.3:0
[IP-] [ ] app-admin/gam-server-0.1.10-r1:0
[IP-] [ ] app-admin/gamin-0.1.10:0
[IP-] [ ] app-admin/gnome-system-log-3.4.1:0
[IP-] [ ] app-admin/logrotate-3.8.3:0
[IP-] [ ] app-admin/openrc-settingsd-1.0.1:0
[IP-] [ ] app-admin/perl-cleaner-2.7:0
[IP-] [ ] app-admin/pessulus-2.30.4:0
[IP-] [ ] app-admin/puppet-2.7.18:0
[IP-] [ ] app-admin/python-updater-0.10:0
[IP-] [ ] app-admin/sabayon-2.30.1:0
[IP-] [ ] app-admin/sudo-1.8.5_p2:0
[IP-] [ ] app-admin/syslog-ng-3.2.5:0
[IP-] [ ] app-admin/sysstat-10.0.5:0
[IP-] [ ] app-admin/system-config-printer-common-1.3.11-r1:0
[IP-] [ ] app-admin/system-config-printer-gnome-1.3.11:0
[IP-] [ ] app-admin/tripwire-2.4.2.2-r1:0
[IP-] [ ] app-admin/webapp-config-1.50.16-r4:0
[IP-] [ ] app-arch/bzip2-1.0.6-r3:0
[IP-] [ ] app-arch/cabextract-1.4:0
[IP-] [ ] app-arch/cpio-2.11:0
[IP-] [ ] app-arch/file-roller-3.4.2:0
[IP-] [ ] app-arch/gzip-1.5:0
[IP-] [ ] app-arch/libarchive-3.0.4-r1:0
[IP-] [ ] app-arch/pax-3.4.12.16:0
[IP-] [ ] app-arch/rpm2targz-9.0.0.5g:0
[IP-] [ ] app-arch/tar-1.26:0
[IP-] [ ] app-arch/unzip-6.0-r3:0
[IP-] [ ] app-arch/xz-utils-5.0.4:0
[IP-] [ ] app-arch/zip-3.0-r1:0
[IP-] [ ] app-cdr/brasero-3.4.1:0
[IP-] [ ] app-cdr/cdrdao-1.2.3-r1:0
[IP-] [ ] app-cdr/cdrtools-3.00:0
[IP-] [ ] app-cdr/dvd+rw-tools-7.1-r1:0
[IP-] [ ] app-crypt/gcr-3.6.2:0/1
[IP-] [ ] app-crypt/gnupg-2.0.19:0
[IP-] [ ] app-crypt/gpgme-1.3.2:1
[IP-] [ ] app-crypt/mhash-0.9.9.9-r1:0
[IP-] [ ] app-crypt/p11-kit-0.14:0
[IP-] [ ] app-crypt/pinentry-0.8.2:0
[IP-] [ ] app-crypt/seahorse-3.4.1:0
[IP-] [ ] app-dicts/aspell-en-6.0.0:0
[IP-] [ ] app-dicts/gnome-dictionary-3.4.0:0
[IP-] [ ] app-dicts/myspell-en-20081002:0
[IP-] [ ] app-editors/gedit-3.4.2:0
[IP-] [ ] app-editors/nano-2.2.5:0
[IP-] [ ] app-editors/vim-7.3.409:0
[IP-] [ ] app-editors/vim-core-7.3.409:0
[IP-] [ ] app-emulation/libvirt-0.10.2-r3:0
[IP-] [ ] app-emulation/qemu-1.1.2-r2:0
[IP-] [ ] app-emulation/spice-protocol-0.12.2:0
[IP-] [ ] app-emulation/virt-manager-0.9.4:0
[IP-] [ ] app-emulation/virtinst-0.600.3:0
[IP-] [ ] app-emulation/wine-1.4.1:0
[IP-] [ ] app-forensics/chkrootkit-0.49:0
[IP-] [ ] app-forensics/rkhunter-1.4.0:0
[IP-] [ ] app-i18n/enca-1.13-r2:0
[IP-] [ ] app-laptop/radeontool-1.6.3:0
[IP-] [ ] app-misc/ca-certificates-20111025:0
[IP-] [ ] app-misc/editor-wrapper-4:0
[IP-] [ ] app-misc/geoclue-0.12.99:0
[IP-] [ ] app-misc/mime-types-8:0
[IP-] [ ] app-misc/pax-utils-0.4:0
[IP-] [ ] app-misc/screen-4.0.3-r6:0
[IP-] [ ] app-misc/scrub-2.5.1:0
.........

I have snipped the output for ease of viewing.As you can see it nicely enlisting all the package installed in the system.Now a little bit of explanation about the leftmost two square brackets.The first one saying "IP" ,that means it is installed from the portage tree and the next bracket is for slots.

Now you can achieve the same thing other ways to ..like below:

bhaskar@GentooLinux_18:12:20_Wed Jan 09:~> cd /var/db/pkg && ls -d */*
app-accessibility/at-spi2-core-2.6.2-r1 media-libs/libsndfile-1.0.25
app-accessibility/caribou-0.4.5 media-libs/libtheora-1.1.1
app-admin/apache-tools-2.2.23 media-libs/libv4l-0.8.9
app-admin/apachetop-0.12.6-r1 media-libs/libvorbis-1.3.3
app-admin/apg-2.3.0b-r5 media-libs/libvpx-1.0.0
app-admin/drush-5.1 media-libs/libwebp-0.2.1
app-admin/eselect-1.3.1 media-libs/memphis-0.2.3
app-admin/eselect-ctags-1.13 media-libs/mesa-9.0
app-admin/eselect-esd-20060719 media-libs/musicbrainz-3.0.3
app-admin/eselect-fontconfig-1.1 media-libs/musicbrainz-4.0.3
app-admin/eselect-gnome-shell-extensions-20111211 media-libs/openjpeg-1.5.0
app-admin/eselect-mesa-0.0.10 media-libs/raptor-2.0.8
app-admin/eselect-opencl-1.1.0-r1 media-libs/sampleicc-1.6.6
app-admin/eselect-opengl-1.2.6.1 media-libs/sdl-mixer-1.2.11-r1
app-admin/eselect-php-0.6.2 media-libs/speex-1.2_rc1
app-admin/eselect-pinentry-0.3 media-libs/swfdec-0.8.4
app-admin/eselect-python-20100321 media-libs/t1lib-5.1.2
app-admin/eselect-qtgraphicssystem-1.1.1 media-libs/taglib-1.7.2
app-admin/eselect-ruby-20100603 media-libs/tiff-4.0.2-r1
app-admin/eselect-vi-1.1.7-r1 media-libs/vigra-1.7.1-r1
app-admin/eselect-xvmc-0.3 media-libs/vo-aacenc-0.1.2
app-admin/gamin-0.1.10 media-libs/webrtc-audio-processing-0.1
app-admin/gam-server-0.1.10-r1 media-libs/x264-0.0.20111220
app-admin/gnome-system-log-3.4.1 media-libs/xvid-1.3.2

Those of you are curious about all the stuff,please go through this gentoolkit-doc

Hope this will help.

Cheers!
Bhaskar

Thursday, September 20, 2012

Best possible way to Systemd's transition from /lib to usr/lib on Arch Linux


Okay,I seriously had struggle(due to my lack of brilliance) for this transition ,once I update one regular update on Arch Linux by ignoring glibc like previous time.And only found out that kernel image creation is not possible. Because the kernel module location has changed with new kernel with systemd.So ,it was trowing "module not found error"..irk..

And I was trying to do it from chroot environment on Fedora and Gentoo.

After several hours of brain scratching and hover through different forum thread at Arch Linux site;I landed on a wiki page ,which solve the mystery.

The simplest possible way to do this transition from chroot environment is below:



pacman -Syv
pacman -S busybox rsync
rsync -rapv /lib/ /usr/lib/
mv /lib/ /lib.backup/
busybox ln -s /usr/lib/ /lib
# rm -rf /usr/lib/modules/
ldconfig
pacman -Suv
pacman -Sf glibc linux
rm -rf /lib.backup/



And please do it sequentially.Period.

If you don't do that, then the glibc and as well the system will be broken for ever for the new kernel which run systemd for boot.You just cannot create or make the new kernel image by running mkinitcpio! which was the case with me.

Hope this will help.

Cheers!
Bhaskar



Tuesday, August 21, 2012

Create batch accounts of user automated way

I wrote a little and mundane script long time back to solve my purpose to create bunch of user accounts on specific host.

Here is the script:
#!/bin/bash
# This script is meant to run when we create a bunch of user account of any specified host.
#Backup important file before doing anything.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# or at your option any later version, as published by the
# Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.


PASSWDFILE="/etc/password"

GROUPFILE="/etc/group"

SHADOWFILE="/etc/shadow"

DATE=`date`

USERFILE="THis file should have the form of password file like username:password:UID:GID:gecos:shell"

cd /etc ;pwd

cp -v $PASSWDFILE $PASSWDFILE.$DATE

echo " Password file backed up.."

cp -v $GROUPFILE $GROUPFILE.$DATE

echo " group file backed up.."

cp -v $SHADOWFILE $SHADOWFILE.$DATE

echo "shadow file backed .."


/usr/sbin/newusers $USERFILE

echo " Done"

echo " Forcing user to change their password upon first login.."

for i in $USERFILE

do

/usr/sbin/chage -d 0

echo $i

done


If you feel ,you can suggest me the enhancement.

Hope this will help.

Cheers!
Bhaskar

Wednesday, July 11, 2012

How to fix shell "permission denied" error

I believe everyone,who works on terminal for certain length of time come across this error sometime.

Very trivial topic so the fixing is also very trivial too.

Once you tried to logged into the shell you get the "permission denied" error on the console but get the shell prompt and most importantly you can not do a "ls" and other stuff too.

But you can login to the shell as root fine..without any error..it's the normal user that is getting it!!

So it signifies, something wrong with the way disk has been mounted.But once you give the correct flags with the mount it will work..but once you reboot it will started to react in same manner i.e erroneously.

How to do it right?

simple, put an entry like this in /etc/rc.local(that is file executed last at boot stage)

chown -R username:groupname disk-partition

I have had multiple disk partitions and I did that.

and make /etc/rc.local file executable by doing a chmod. Additionally check for /etc/nologin file..if that is present..then it might hinder you to get in.Double check the shell you are trying to use is exists.

That's all you need to do..next reboot it should be good.

Tip: Be careful about /dev/null! if the permission of this file get changed ;you might get the "permission denied" error too on console.So,you need to fixed that by running "mknod" to recreate it and assign the correct permission to this file.Normally it should look like this:

ls -al /dev/null
crw-rw-rw- 1 root root 1, 3 Jul 11 08:34 /dev/null


Udev plays a role to determine the right thing about those.So keep an eye on Udev related matters on system.


Hope this will help.

Cheers!
Bhaskar

Monday, April 23, 2012

Read the contents inside a RAM

In this post I will show you ,how you can see what is holding in your system RAM at the present moment.

Here is what you need to do :
bhaskar@GentooLinux_12:11:22_Mon Apr 23:~> sudo strings /dev/mem | less

And the outcome from my laptop is below:

ZRr=
`|f
\|f1
GRUB
Geom
Hard Disk
Read
Error
ZRr=
`|f
\|f1
GRUB
Geom
Hard Disk
Read
Error
loading
Geom
Read
Error
WVS1
[^_]
[^_]
>G9}
Ft51
D[^_]
[^_]
[^_]
Y_^+
RBRPQR
ZYs
(hd0,msdos2)/grub2
t)PS
USRf
fSfRQ
[_^]
UQPSVWR
_^[XY]
WVS1
[^_]
<,u; PAMS PAMSu [^_] [^_] [^_] u SSh, QQh< [^_] VVPh_ SSQht RRPh (<-t PWQh [^_] (<-t PQRh [^_] [^_] [^_] RPWh [^_] SSh/ PPhC PPhe t$QP [^_]Z [^_]Z s SSh% PPh6 [^_] [^_] (Ph] PPhn [^_] [_t3 [^_] [[t>
[^_]
[^_]
[^_]
4RPh
3w RRh
ELFu
PPh9
PPh\
PPhr
C09E
C09E
C09E
C09E
C09E
QPhY
t"RR
[^_]
[^_]
>PVWh
[^_]
[^_]
,[^_]
[^_]
RRhP
8(uB
PPh@
[^_]
RRhL
[^_]
>/t
[^_]
VVhq
[^_]
8+t 1
8+u< s VVh [^_] [^_] [^_] PPhP 8mimgu [^_] [^_]Z [^_] Y[^] WVSW ^[^_] ZY[^_] SWvP ^[^_] [^_] [^_] $[^_] [^_] u
Entering rescue mode...
grub_abort
grub_bios_interrupt
grub_boot_drive
grub_chainloader_real_boot
grub_checkkey
grub_command_list
grub_current_context
grub_device_close
grub_device_iterate
grub_device_open
grub_disk_ata_pass_through
grub_disk_close
grub_disk_dev_iterate
grub_disk_dev_register
grub_disk_dev_unregister
grub_disk_firmware_fini
grub_disk_firmware_is_tainted
grub_disk_get_size
grub_disk_open
grub_disk_read
grub_disk_write
grub_divmod64_full
grub_dl_get
grub_dl_head
grub_dl_load
grub_dl_load_file
grub_dl_ref
grub_dl_unload
grub_dl_unref
grub_env_export
grub_env_find
grub_env_get
grub_env_iterate
grub_env_set
grub_env_unset
grub_err_printed_errors
grub_errmsg
grub_errno
grub_error
grub_error_pop
grub_error_push
grub_exit
grub_fatal
grub_file_close
grub_file_read
grub_file_seek
grub_free
grub_fs_autoload_hook
grub_fs_list
grub_fs_probe
grub_get_rtc
grub_get_time_ms
grub_getkey
grub_gettext
grub_isprint
grub_isspace
grub_list_push
grub_list_remove
grub_machine_fini
grub_machine_mmap_iterate
grub_malloc
grub_memalign
grub_memcmp
grub_memmove
grub_memset
grub_millisleep
grub_mm_base
grub_module_iterate
grub_named_list_find
grub_parser_cmdline_state
grub_parser_split_cmdline
grub_partition_get_name
grub_partition_iterate
grub_partition_map_list
grub_partition_probe
grub_pit_wait
grub_print_error
grub_printf
grub_printf_
grub_prio_list_insert
grub_puts_
grub_pxe_call
grub_real_dprintf
grub_realloc
grub_reboot
grub_refresh
grub_register_command_prio
grub_register_variable_hook
grub_snprintf
grub_stpcpy
grub_strchr
grub_strcmp
grub_strcpy
grub_strdup
grub_strlen
grub_strncmp
grub_strncpy
grub_strndup
grub_strrchr
grub_strstr
grub_strtoul
grub_strtoull
grub_strword
grub_term_inputs
grub_term_inputs_disabled
grub_term_outputs
grub_term_outputs_disabled
grub_term_poll_usb
grub_unregister_command
grub_vprintf
grub_vsnprintf
grub_xasprintf
grub_xputs
grub_xvasprintf
grub_zalloc
memcpy
no gzip magic found
vga=791 is deprecated. Use set gfxpayload=1024x768x16,1024x768 before linux command instead.
no gzip magic found
Intel(R)Sandybridge Mobile Graphics Chipset Accelerated VGA BIOS
Intel Corporation
Intel(R)Sandybridge Mobile Graphics Controller
Hardware Version 0.0
A wHq}
s} K
!nr'
'Dj"f
w_{{
.}#
'8|+
|B&Y
f87N,
:N_>
3c#S?
;Q~P
%Iiil
:j )j#
npdZy
IU9#G
D*~1
x3&~
{JKK
( PT
0 5
8MJWP
133WH2
VESA
Intel(R)Sandybridge Mobile Graphics Chipset Accelerated VGA BIOS
Intel Corporation
Intel(R)Sandybridge Mobile Graphics Controller
Hardware Version 0.0
0 5
0 5
8MJWP
133WH2
WVS1
[^_]
[^_]
>G9}
Ft51
D[^_]
[^_]
[^_]
Y_^+
RBRPQR
ZYs
B>Sz~
,zD#i8
tX6p
.yn1
6lx3u
^Zm2
vXg{3
i[.b
uj!s
(ds&
O3L5
X 3vO
_iiZ
whvZ
qg?
mO''
y[hg4
wR;=
so_?
dOAj0X
zp}c\K~[
qRpd5
/o]`
D&X+
kfv[q
4t7M
.o#K &u
xn-9
aua*
]oS|(
8vzw
l[M(
@\!$
t,MEH
[NUe
iBi&
1.<& {I_6 (#lD .G;S ,ptl "(,B } 8+.O| Yo_g9m Pi&S C:9V `^[Ui ?cht xkpl !F{5 m UWw 6gK! ,- | ]-rB .Ywk t/{6 byX| jJ2& h*S& gOl".a {6_UE ru-L ^|xE, ^|oK :B:7 {0oR Ijg) 60Mq {/bn ey:h# x~mN n 5T4f }S+t Nen. x~+S& *HaY- TT8#B UJ;]h0 hnKd ] ?Y IU[~ A0K`D Sp"d HJ+~ 0$'%X 3]4@" I/Pl# 3\w^ ]W&@ u'ay 7kyn .xs6` A%Lxc BpUv gXJ,c U&L2OZ ~`8>Q_H
:WDH
f$S6
#q`E
nb%r
\;po
3i5~
|Vs-
T;t@
WN"K
HFcs
\U68
\A|?
|eI#
%Izg
3X1l
,lM;
|~4[8
#kO,*NgNt
Gd!o
D j"
^Fy!
\vz`
NfYBU
]gz1
\2g?
C@bi
T' Z52B
jtb{$p
fR{O_x
j>U`
~V/*A{k
.
.
.
.
$VBT SANDYBRIDGE-M d
BIOS_DATA_BLOCK
2098Intel(R)Sandybridge Mobile PCI Accelerated SVGA BIOS
Build Number: snm20980.dnq PC 14.34 12/22/2010 15:25:04
DECOMPILATION OR DISASSEMBLY PROHIBITED
Copyright (C) 2000-2003 Intel Corp. All Rights Reserved.
02468:<@BDFHJLPRTVXZ\ LFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelName 0@0p H?@0b 0@0p 0*x Q H?@0b @0 6 #@0 * q8-@X-6 0 5 LFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelNameLFP_PanelName+a fPfVfWf t[VfP ZYf;F rwfVWR . . . . . Diskette Drive Internal HDD USB Storage Device CD/DVD/CD-RW Drive Modular Bay HDD Onboard NIC Unknown device BIOS Setup Diagnostics eSATA CPU 1 Intel Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz To Be Filled By O.E.M. To Be Filled By O.E.M. To Be Filled By O.E.M. L1-Cache L2-Cache L3-Cache J1A1 PS2Mouse J1A1 Keyboard J2A2B Video J3A1 USB1 J3A1 USB2 J3A1 USB3 J5A1 J2B3 - CPU FAN J9E1 - SCAN MATRIX J9G1 - LPC SIDE BAND J2G1 - GFX VID . . . . DIMM_B BANK 2 Not Specified Not Specified Not Specified Not Specified vPro INTEL 0000 Dell Inc. 05/26/2011 Dell Inc. 0M516T .G2VKKP1.CN7016617J002I. To Be Filled By O.E.M. Dell Inc. Not Specified G2VKKP1 DELL2 OKP1 Dell Inc. Vostro 3350 Not Specified G2VKKP1 To be filled by O.E.M. 20110720 20110720 ATI Robson XT DIMM_A BANK 0 830B 35963CFC 0D111800 NT4GC64B8HB0NS-CG 110720 20110720 ptal ptalH ptalp ptal ptal pfr0 IFE$ $PMM G=fHf RSD PTR . . . . IBM COMPATIBLE IBM IS A TRADEMARK OF INTERNATIONAL BUSINESS MACHINES CORP. Dell System Vostro 3350 (C)1985-2009,American Megatrends, Inc.All Rights Reserved. $BV# A04$DEL R:EF8 !dhuS @t$j@ @((PP((PP,(-)*. AMIBIOS 080010 06/16/10(C)2010 American Megatrends, Inc. All Rights Reserved (C)2010 American Megatrends, Inc. 63-0100-000001-00101111-061610-Chipset 000-0-0000-00-00-0000-00-00-000 000-0-0000-00-00-0000-00-00-00-0 _TG_0AAAA000 AMIBIOS(C)2010 American Megatrends, Inc. BIOS Date: 05/26/11 10:52:20 Ver: 04.06.04 CCCC ???? <<<<


.... and many more...I have chopped out the rest for sake of brevity :-)

Hope this will help.

Cheers!
Bhaskar

Thursday, March 22, 2012

How to correct a small python code error!!

So, I was building a software which built on python2.6 version and I was exploiting it on CentOS 5.8.But when I ran the script I have come across that the script is throwing error and saying the syntax is invalid!! heck!

Although I have installed python2.6 separately on this box ...then what??

The error is ordinary :



sudo ./w3af_console -f
File "./w3af_console", line 108
rev = 0 if (a == 'HEAD') else -1
^
SyntaxError: invalid syntax


So , as next step I look into the script, which I should have done in first place and I couldn't.The problem lies in the first line of the script..as we all know that the shebang is the guide to system environment where the script are going to be interpreted.It was showing like this


#!/usr/bin/env python


Now I have corrected it ...as the software demands python2.6 ..so below..



#!/usr/bin/env python26



and Voila!!

Ordinary stuff right?? but tricky..might lead into long haul :)

Hope this will help.

Cheers!
Bhaskar