Tuesday, December 2, 2008

ckvo.exe Manual removal Steps

ckvo.exe
This virus is the same as amvo.exe and same steps should be followed to remove this virus. It creates autorun.inf and a .cmd file on all the partitions mounted on windows.

Follow this guide to remove the virus.

Cheers...

Sunday, November 23, 2008

Downloading Photos from Orkut Album

Photo Download?
Orkut has done a good job in "trying" to prevent downloads from orkut photo albums. They have blocked right clicking. But using Firefox we can still download the photo (ie If you can see the photo, you can download)

Drag drop the photo to the URL (Address Bar) and then save the page.
(works for both IE and Firefox)

-OR-

These are the steps for Firefox alone:

  • Browse to the appropriate Photo / Album

  • Now select Tools > Page Info

  • Click on Media, and in the list search for the photo, and Press Save As (Right of the Media Preivew Label)




TADA: Thats all!

Tuesday, November 18, 2008

Digitalpbk is now 2 years old

Another year passes and digitalpbk is now 2 years!! Happy Birthday today...
And the stats till now goes as ..

231000+ Visitors...
112 Posts
300+ Comments I dint count ;)

Thank you world!
Keep clicking..
.digitalpbk.

8086 Assembly Language Program to find the factorial upto 255!

Intro
The following assembly language program is for MASM 5.1 up calculates factorial of numbers upto 255!, that is quite a large number to compute a factorial. See below:


Number:255
Factorial
3350850684932979117652665123754814942022
5840635917407025767798842862087990357327
7100562613812676331425928080211850228244
5926550135522251856727692533193070412811
0833303256593220417000297921662507342533
9051375446604571124033846270103402026299
2581378423147276636643647155396305352541
1055414394348401099150682854306750685916
3858198060416294038335658673919826878210
4924614076605793562865241982176207428620
9697768031494674313868079724382476891586
5600000000000000000000000000000000000000
0000000000000000000000000


for the Faint Hearted
The program calculates and computes big numbers by simulating the traditional way of multiplication and division of numbers. Hence it can do this upto any number of digits as much as the memory can hold. In this example, I have used 512 digited numbers, which is more than enough for holding 255!.

The key parts of the following program is bignum_mul and bignum_add macro which simulates the traditional method of multiplying and adding numbers (not using any vedic maths, which can certainly improve the efficiency I guess).

The following is the assembly language program, try digesting...

.asm Program

data segment
b1 db 512 dup(0)
b2 db 512 dup(0)
msg db 0dh,0ah,"Number:$"
fac db 0dh,0ah,"Factorial",0dh,0ah,"$"
data ends

bignum_get macro var
local exit,get,loo,skip
xor cx,cx
lea si,var
mov di,si
mov ah,01h
get:
int 21h
cmp al,0dh
je exit
sub al,30h
mov [si],al
inc si
inc cx
jmp get
exit:
shr cx,1
jz skip
dec si
loo:
mov ah,[si]
mov al,[di]
mov [si],al
mov [di],ah
dec si
inc di
loop loo
skip:
endm

geti macro
local exit,get
xor bx,bx
mov dx,bx
mov cx,00ah
get:
push bx
;Read character
mov ah,01h
int 21h
xor ah,ah
pop bx
;If enter stop
cmp al,0dh
jz exit
sub al,30h
;Multply By 10
push ax
mov ax,bx
mul cx
mov bx,ax
pop ax
;add
add bx,ax
;redo
jmp get
exit:
mov ax,bx
endm

bignum_put macro var
local put,en,nxt,exit
lea si,var
mov di,si
mov cx,0200h
add di,cx
dec di
en:
cmp BYTE PTR [di],00h
jne nxt
dec di
jmp en
nxt:
mov ah,02h
put:
mov dl,[di]
add dl,30h
int 21h
cmp si,di
je exit
dec di
loop put
exit:
endm



bignum_add macro b1,b2
local ader,exit
lea si,b1
lea di,b2

mov cx,0200h
mov bl,10
ader:
mov al,[di]
mov ah,[si]
add al,ah
jz exit
xor ah,ah
div bl
mov [si],ah
inc si
add [si],al
inc di
loop ader
exit:
endm

bignum_mul macro b1
local loo,exit
cmp dl,01h
jz exit
lea si,b1
mov dh,10
xor bx,bx
mov cx,0200h
loo:
mov al,[si]
xor ah,ah
mul dl
add ax,bx
div dh
mov [si],ah
inc si
mov bl,al
loop loo
exit:
endm

puts macro msg
push ax
push dx
mov dx,offset msg
mov ah,09h
int 21h
pop dx
pop ax
endm


assume cs:code,ds:data
code segment
start:
mov ax,data
mov ds,ax

lea si,b1
mov BYTE PTR [si],01h

puts msg
geti
mov dl,al
loo:
push dx
bignum_mul b1
pop dx
dec dl
jnz loo

puts fac
bignum_put b1
mov ah,4ch
int 21h
code ends
end start


The Simple Factorial code upto 8!

geti macro
local exit,get
xor bx,bx
mov dx,bx
mov cx,00ah
get:
push bx
;Read character
mov ah,01h
int 21h
xor ah,ah
pop bx
;If enter stop
cmp al,0dh
jz exit
sub al,30h
;Multply By 10
push ax
mov ax,bx
mul cx
mov bx,ax
pop ax
;add
add bx,ax
;redo
jmp get
exit:
mov ax,bx
endm

puti macro buffer
local exit,put
mov bx,0ah
lea si,buffer
add si,06h
mov BYTE PTR [si],'$'
put:
xor dx,dx
dec si
div bx
add dl,30h
mov [si],dl
cmp ax,0h
jnz put

mov dx,si
mov ah,09h
int 21h

endm

puts macro msg
push ax
push dx
mov dx,offset msg
mov ah,09h
int 21h
pop dx
pop ax
endm

data segment
msg1 db 0dh,0ah,"Enter Number : $"
msg2 db 0dh,0ah,"Factorial : $"
buff db 20 dup(?)
data ends

assume cs:code,ds:data
code segment
start:
mov ax,data
mov ds,ax
puts msg1
geti
push ax
puts msg2
pop ax
mov cx,ax
dec cx
jz over
xor dx,dx
re:mul cx
loop re
over:
puti buff
mov ah,4ch
int 21h
code ends
end start


Thanks to ABA (Bellari) for challenging me to do the 255!.. Yo!!!

Friday, November 7, 2008

Remove old kernels in Ubuntu

Whenever a new kernel is applied ubuntu keeps the old one. This clogs up the grub and hard disk space and ends up having a lot of kernels to boot in the grub.
To know the version that is currently running:

uname -r


and to remove all other kernels use
sudo apt-get remove --purge 2.6.24-16-*


change the 2.6.2x-xx- parts to remove those kernel. Make sure you dont remove the kernel you are using, or you will end up breaking the system. It is wise to keep a recent kernel and a second one just prior to the new one, just in case your system doesn't do well with the new kernel.

Update

Please be sure to type the command exactly as such, dont miss any of the hyphens (-) and dots (.)
Missing something would end up uninstalling all of your kernels and hence making the system not bootable.


Correct commands :
sudo apt-get remove --purge 2.6.27-7-*
sudo apt-get remove --purge 2.6.27-9-*

etc

Command Line Output:

arun@server4:~$ sudo apt-get remove --purge 2.6.27-9-*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting linux-headers-2.6.27-9-generic for regex '2.6.27-9-*'
Note, selecting linux-image-2.6.27-9-generic for regex '2.6.27-9-*'
Note, selecting linux-image-2.6.27-9-server for regex '2.6.27-9-*'
Note, selecting linux-headers-2.6.27-9 for regex '2.6.27-9-*'
Note, selecting linux-headers-lbm-2.6.27-9-generic for regex '2.6.27-9-*'
Note, selecting linux-headers-2.6.27-9-server for regex '2.6.27-9-*'
Note, selecting linux-restricted-modules-2.6.27-9-server for regex '2.6.27-9-*'
Note, selecting linux-backports-modules-2.6.27-9-generic for regex '2.6.27-9-*'
Note, selecting linux-restricted-modules-2.6.27-9-generic for regex '2.6.27-9-*'
Note, selecting linux-headers-lbm-2.6.27-9-server for regex '2.6.27-9-*'
Note, selecting linux-backports-modules-2.6.27-9-server for regex '2.6.27-9-*'
Note, selecting linux-image-2.6.27-9-virtual for regex '2.6.27-9-*'
The following packages will be REMOVED:
linux-headers-2.6.27-9* linux-headers-2.6.27-9-generic*
linux-image-2.6.27-9-generic* linux-restricted-modules-2.6.27-9-generic*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 149MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 127310 files and directories currently installed.)
Removing linux-headers-2.6.27-9-generic ...
Removing linux-headers-2.6.27-9 ...
Removing linux-restricted-modules-2.6.27-9-generic ...
update-initramfs: Generating /boot/initrd.img-2.6.27-9-generic
Purging configuration files for linux-restricted-modules-2.6.27-9-generic ...
Removing linux-image-2.6.27-9-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms
Uninstalling: nvidia 177.82 (2.6.27-9-generic) (i686)

-------- Uninstall Beginning --------
Module: nvidia
Version: 177.82
Kernel: 2.6.27-9-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia.ko:
- Uninstallation
- Deleting from: /lib/modules/2.6.27-9-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod......

DKMS: uninstall Completed.
run-parts: executing /etc/kernel/prerm.d/last-good-boot
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.27-11-generic
Found kernel: /boot/memtest86+.bin
Replacing config file /var/run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
you may need to re-run your boot loader[grub]
Purging configuration files for linux-image-2.6.27-9-generic ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.27-11-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

rmdir: failed to remove `/lib/modules/2.6.27-9-generic': Directory not empty
dpkg - warning: while removing linux-image-2.6.27-9-generic, directory `/lib/modules/2.6.27-9-generic' not empty so not removed.

Friday, October 24, 2008

When September ends ... October starts

Nothing technical to post this month!
My laptop was sick for most of the days and it got its skeleton (motherboard) replaced. (Freely ofcourse)
Seems to be working fine.

Its a hectic semester! No time to even think what to do next! Universities up in next month.

Waiting for something exciting to happen in my digital world!

Rest of the stuff is really really analog ;)

Sunday, August 10, 2008

Free Online 8085 Assembler and Simulator

Free Online 8085 Assembler and Simulator
I just made this long back, just put it online for anyone that might be interested in using it.

Quick Start

  • Enter the code as shown in the sample in the code view,
  • Click Compile and Simulate.
  • Click HexView to see the hex code of the program
  • Click SimView and Click Step or Exec to simulate the program.


There is a built in special function call for keyboard reads : CALL KBINPUT
Displays a prompt for directly entering into the Accumulator.

In addition memory locations can be assigned in code using
ORG Hex Address
AA BB CC DD
EE FF 00 11
22 33 44 55
66 77
etc

Assembly Source CodeView


HexView


SimView


The SimView Screen is divided into 4 Sections:
  • The extreme left shows the code and highlights the current section being executed.
  • The middle box shows the registers and flags
  • The extreme right shows the stack.
  • The bottom box prints values of memory locations.


More features would be posted as memory comes to me
;)

Friday, August 1, 2008

nVidia Core Temperature too high on my Compaq Presario Lappy

LAPtops as the name stands, conventionally meant to be on the LAP. But in my case not only can it be kept on a lap, it fries everything underneath !
Check out the screenshot!

nVidia GPU Core Temperature Screenshot


This is kinda normal, it gets to 110+ when connected to TV or playing a game!.

The nVidia GeForce card is suspected to do the overheating.
I am using a Compaq Presario V3000 Notebook.
Does any one having a similar series face the problem?
Any Solutions?
Has anyone tried cooking with this lappy? !
Please do comment.

:D

Saturday, July 26, 2008

T9 Dictionary Implementation in C, BASH

/*
t9.c
Dependency : t9.dic
A file with lots of words to populate our t9 trie structure.
All in small letter no spaces no other characters
Terminated by a line with only a 0 (zero)
=================
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

struct t9
{
struct t9 * node[27];
};

struct t9 * t9_new()
{
struct t9 * r = (struct t9 *)malloc(sizeof(struct t9));

int i=0;
for(;i<27;i++) r->node[i] = (struct t9 *)0;

return r;
}

void t9_free(struct t9 * root)
{
if(root)
{
int i=0;
for(;i<27;i++)
t9_free(root->node[i]);
free(root);
}
}

struct t9 * t9_insert(struct t9 * root ,char *val)
{

if(!root){ root = t9_new(); }

if(!*val) return root;
*val |= ('A' ^ 'a');
char c = *val - 'a';
root->node[c] = t9_insert(root->node[c] ,++val);

return root;
}

void t9_print(char *pre, struct t9 * root,int depth)
{
int i=0,flag=0;
for(;i<27;i++)
{
if(root->node[i])
{
pre[depth]='a'+i;flag=1;
t9_print(pre,root->node[i],depth+1);
pre[depth]=0;
}
}
if(flag == 0)
{
pre[depth]=0;
printf("%s\n",pre);
}
}

int in_mob_ks(struct t9 * root,char val,int o)
{

int a[]={0,3,6,9,12,15,19,22,26};
/* 2=>0 1 2
3=>3 4 5
4=>6 7 8
5=>9 10 11
6=>12 13 14
7=>15 16 17 18
8=>19 20 21
9=>22 23 24 25
*/
if(o && o>=a[val+1]) return -1;


int s=o?o:a[val];
int e=a[val+1];
//printf("From %d-%d",s,e);
for(;s<e;s++)
if(root->node[s])
return s;
return -1;
}

void t9_search_mob(char *pre, struct t9 * root,int depth,char *val)
{

if(*(val+depth)==0)
{
pre[depth]=0;
t9_print(pre,root,depth);
return;
}

int i=in_mob_ks(root,*(val+depth)-'2',0);
if(i==-1)
{
pre[depth]=0;
//printf("%s\n",pre);
}
while(i>=0)
{
pre[depth]=i+'a';
t9_search_mob(pre,root->node[i],depth+1,val);
pre[depth]=0;
i=in_mob_ks(root,*(val+depth)-'2',i+1);
}
}


struct t9 * t9_search(struct t9 * root, char *val)
{
while(*val)
{
if(root->node[*val-'a'])
{
root = root->node[*val-'a'];
val++;
}
else return NULL;
}
return root;
}

int main()
{
struct t9 * root = (struct t9 *) 0;
char a[100],b[100];int i;
FILE *fp = fopen("t9.dic","r");
while(!feof(fp))
{
fscanf(fp,"%s",&a);
if(a[0]=='0')break;
root=t9_insert(root,a);
}

while(1)
{
printf("mob keys 2-9:");
scanf("%s",&a);
if(a[0]=='0')break;
t9_search_mob(b,root,0,a);
}
t9_free(root);
}



V2
Nothin's changed except for the input method and output limited:

/*
t9.c
Dependency : t9.dic
A file with lots of words to populate our t9 trie structure.
All in small letter no spaces no other characters
Terminated by a line with only a 0 (zero)
Input :
2-9 mobile keys
0 for a new word
q to quit
=================
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include <termios.h>
#include <unistd.h>

int getch( )
{
struct termios oldt,newt;
int ch;
tcgetattr( STDIN_FILENO, &oldt );
newt = oldt;
newt.c_lflag &= ~( ICANON | ECHO );
tcsetattr( STDIN_FILENO, TCSANOW, &newt );
ch = getchar();
tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
return ch;
}

int maxdepth = 0;

struct t9
{
struct t9 * node[27];
};

struct t9 * t9_new()
{
struct t9 * r = (struct t9 *)malloc(sizeof(struct t9));

int i=0;
for(;i<27;i++) r->node[i] = (struct t9 *)0;

return r;
}

void t9_free(struct t9 * root)
{
if(root)
{
int i=0;
for(;i<27;i++)
t9_free(root->node[i]);
free(root);
}
}

struct t9 * t9_insert(struct t9 * root ,char *val)
{

if(!root){ root = t9_new(); }

if(!*val) return root;
*val |= ('A' ^ 'a');
char c = *val - 'a';
root->node[c] = t9_insert(root->node[c] ,++val);

return root;
}

void t9_print(char *pre, struct t9 * root,int depth)
{
int i=0,flag=0;

if(depth < maxdepth)
for(;i<27;i++)
{
if(root->node[i])
{
pre[depth]='a'+i;flag=1;
t9_print(pre,root->node[i],depth+1);
pre[depth]=0;
}
}
if(flag == 0)
{
pre[depth]=0;
printf("%s\n",pre);
}
}

int in_mob_ks(struct t9 * root,char val,int o)
{

int a[]={0,3,6,9,12,15,19,22,26};
/* 2=>0 1 2
3=>3 4 5
4=>6 7 8
5=>9 10 11
6=>12 13 14
7=>15 16 17 18
8=>19 20 21
9=>22 23 24 25
*/
if(o && o>=a[val+1]) return -1;


int s=o?o:a[val];
int e=a[val+1];
//printf("From %d-%d",s,e);
for(;s<e;s++)
if(root->node[s])
return s;
return -1;
}

void t9_search_mob(char *pre, struct t9 * root,int depth,char *val)
{

if(*(val+depth)==0)
{
pre[depth]=0;
t9_print(pre,root,depth);
return;
}

int i=in_mob_ks(root,*(val+depth)-'2',0);
if(i==-1)
{
pre[depth]=0;
//printf("%s\n",pre);
}
while(i>=0)
{
pre[depth]=i+'a';
t9_search_mob(pre,root->node[i],depth+1,val);
pre[depth]=0;
i=in_mob_ks(root,*(val+depth)-'2',i+1);
}
}


struct t9 * t9_search(struct t9 * root, char *val)
{
while(*val)
{
if(root->node[*val-'a'])
{
root = root->node[*val-'a'];
val++;
}
else return NULL;
}
return root;
}

int main()
{
struct t9 * root = (struct t9 *) 0;
char a[100],b[100];int i;
FILE *fp = fopen("t9.dic","r");
while(!feof(fp))
{
fscanf(fp,"%s",&a);
if(a[0]=='0')break;
root=t9_insert(root,a);
}

i=0;
while((a[i]=getch()) != 'q')
{
if(a[i]=='0'){i=0;continue;}
if(a[i] >= '2' && a[i] <= '9')
{
i++;
a[i]=0;
maxdepth = i;
printf("%s:\n",a);
t9_search_mob(b,root,0,a);
fflush(stdout);
}
}
t9_free(root);
}


t9.dic

T9 Dictionary sample file

Now in BASH!

#!/bin/bash
# bash script does something outrageous.
# It attempts to reproduce the T9 capability of the Mobile Phones !

# And does it in fewer commands than before!
# Adapted from Rahul's Original T9.sh

umask 077
NUMN=/tmp/numn.$$
trap "exit 1" HUP INT PIPE QUIT TERM
trap "rm -f $DICTN $NUMN" EXIT

cat t9.dic | tr a-z 22233344455566677778889999 > $NUMN

if [ $# -eq 0 ] ; then
echo "Usage : t9.sh "
exit 1;
else
paste -d: $NUMN t9.dic | grep "^$1" | cut -d":" -f2 | sort
fi

Sunday, July 20, 2008

Server Not Found, Fix DNS Problems.

Sometimes wierd things happen,
Server Not Found www.google.com
Or you can get www.kitiyo.com but not rgb.kitiyo.com
Or you cannot get www.somesite.com but your friend can!
Silly DNS Problems.

When we browser and enter a url in the browser's address bar, one of the first step is to resolve the domain name. ie convert the www.server-name.com to the IP address.

If our dns server settings are wrong or if the dns server does not respond, we get the familiar
Server Not Found page.

There are some ways to resolve this.

  1. Get the correcet DNS IP address from the ISP, and get more than one.
  2. Get some free DNS IP address, some of which are given below
    67.138.54.100
    207.225.209.66
    208.67.220.220
    208.67.222.222
  3. Install a local caching dns server that caches servernames and ip address so that subsequent visits can be made faster since resolving is done locally.
    like Ubuntu debian package dnsmasq


Adding name servers
Windows :

  • Click TCP/IP and then click Properties.
  • Add Primary and Secondary DNS Servers.


Linux:
Add the lines to /etc/resolv.conf
nameserver IP.ADD.RES.SSS
nameserver 67.138.54.100


Any more ideas ?

Wednesday, July 16, 2008

Fix the Brightness up/down Button on ubuntu 8.04 running on Compaq Presario V3000

Replace the contents in the following files given by the code given below.

Replace /etc/acpi/video_brightnessup.sh with the following code


#!/bin/bash

CURRENT=$(grep "current:" /proc/acpi/video/VGA/LCD/brightness |awk '{print $2}')


case "$CURRENT" in

100)
echo -n 100 > /proc/acpi/video/VGA/LCD/brightness;
;;
92)
echo -n 100 > /proc/acpi/video/VGA/LCD/brightness;
;;
84)
echo -n 92 > /proc/acpi/video/VGA/LCD/brightness;
;;
76)
echo -n 84 > /proc/acpi/video/VGA/LCD/brightness;
;;
68)
echo -n 76 > /proc/acpi/video/VGA/LCD/brightness;
;;
60)
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness;
;;
52)
echo -n 60 > /proc/acpi/video/VGA/LCD/brightness;
;;
44)
echo -n 52 > /proc/acpi/video/VGA/LCD/brightness;
;;
36)
echo -n 44 > /proc/acpi/video/VGA/LCD/brightness;
;;
28)
echo -n 36 > /proc/acpi/video/VGA/LCD/brightness;
;;
20)
echo -n 28 > /proc/acpi/video/VGA/LCD/brightness;
;;

*) #default case
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness ;
;;
esac


Replace /etc/acpi/video_brightnessdown.sh with

#!/bin/bash

CURRENT=$(grep "current:" /proc/acpi/video/VGA/LCD/brightness |awk '{print $2}')


case "$CURRENT" in

100)
echo -n 92 > /proc/acpi/video/VGA/LCD/brightness;
;;
92)
echo -n 84 > /proc/acpi/video/VGA/LCD/brightness;
;;
84)
echo -n 76 > /proc/acpi/video/VGA/LCD/brightness;
;;
76)
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness;
;;
68)
echo -n 60 > /proc/acpi/video/VGA/LCD/brightness;
;;
60)
echo -n 52 > /proc/acpi/video/VGA/LCD/brightness;
;;
52)
echo -n 44 > /proc/acpi/video/VGA/LCD/brightness;
;;
44)
echo -n 36 > /proc/acpi/video/VGA/LCD/brightness;
;;
36)
echo -n 28 > /proc/acpi/video/VGA/LCD/brightness;
;;
28)
echo -n 20 > /proc/acpi/video/VGA/LCD/brightness;
;;
20)
echo -n 20 > /proc/acpi/video/VGA/LCD/brightness;
;;

*) #default case
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness ;
;;
esac


for other laptops
run as root
 grep "levels:" /proc/acpi/video/VGA/LCD/brightness


And replace the brightness values in the files above.

:)

Monday, July 7, 2008

Hosting a Site at your Home using Dataone

Intro

This is just a timepass for anyone who would want to try making their home PC to a server. The details are for my BSNL Dataone Router WA300XXX, But you can do it on any router provided your ISP supports, it works for BSNL (Bharath Sanchar Nigam Limited, INDIA) (Hurray!) .

So the first step is to setup apache, HTTP Server. I have covered this topic in my earlier post and doesnt want to repeat

Quick install for Linux/Debian way :

sudo apt-get install apache2


On the router..
Once having done that next step is to open a PORT in the router and forward the port to our PORT 80 on your computer. Port 80 is the default HTTP port. You can open up any port in the router, say 2345.

I did it using telnet and the way to open up a port differs from router to router.
Most modem hosts a site and runs a server internally at port 80, so you can try http://192.168.1.1
or the IP address of the router.

It will ask for a username and password.
The default username and password for the router is admin

Find out NAT
Here is my screen shot of the page


Add an entry similar to that

Name : http # Whats in a name ?
External Port : 2345 #You choose, 80 may not work
Protocol : TCP
Internal Port : 80
Server IP : 192.168.1.232 #thts me


Ok I guess thats it!

Restart your modem
Find your IP
and suppose your ip is AAA.BBB.CCC.DDD

People outside can access your site http://AAA.BBB.CCC.DDD:2345/
(as long as your ip is valid and your computer is on)

What abt something like www.yourname.com?

For that you gotta pay, Since remebering numbers is not so good when compared to memorizing a name a DNS system is used. And to get into a DNS you will need a static IP and pay to point a www.yourname.com to your static IP. There are workarounds for everything, if anyone is generous to comment on this, please help. :)

One more thing
You cant access the site from http://AAA.BBB.CCC.DDD:2345/, for that http://localhost is better.

Try it out...

Sunday, June 29, 2008

Dataone Account Usage Checker in PERL

The following Script in PERL is a Dataone account usage checker.


#!/usr/bin/perl
# http://digitalpbk.blogspot.com/2008/06/free-dataone-account-usage-checker-perl.html

use WWW::Mechanize;
use HTTP::Cookies;
use HTTP::Request::Common;

my $verbose = 0;
my $username;
my $password;
my $url="http://10.240.64.195/weblogin.jsp";

for(my $i=0;$i<=$#ARGV;$i++)
{
if($ARGV[$i] eq "-v" or $ARGV[$i] eq "--verbose"){ $verbose = 1; }
elsif($ARGV[$i] eq "-u" or $ARGV[$i] eq "--user"){ $username = $ARGV[++$i]; }
elsif($ARGV[$i] eq "-p" or $ARGV[$i] eq "--pass"){ $password = $ARGV[++$i]; }
elsif($ARGV[$i] eq "-i" or $ARGV[$i] eq "--url"){ $url = $ARGV[++$i]; }
}
unless($username)
{
print "Username : ";chomp($username = <STDIN>);
}
unless($password)
{
print "Password : ";
`stty -echo`;
chomp($password = <STDIN>);
`stty echo`;
print "\n";
}
$cj = HTTP::Cookies->new(file => "cookie.jar",autosave=>1);
$mech=WWW::Mechanize->new(cookie_jar=>$cj);

print "GET $url\n" if($verbose);
$mech->get($url);
exit unless($mech->success());

my $cnt = $mech->response->as_string;

$cnt =~ s[action="../(.*?)"][action="$1"]is;
$mech->update_html($cnt);

$mech->form_number(1);
$mech->field("username",$username);
$mech->field("password",$password);
print "LOGIN\n" if($verbose);
$mech->submit();

exit unless($mech->success());
$cnt = $mech->response->as_string;

$|=1;
my $uri;my $maxre=0;
while($cnt =~ m/location.replace\('(.*?)'\)/is)
{
print "FOLLOWING .. " if($verbose);

$uri = $1;
if($uri =~ m/loginerr/g)
{
print "\nLOGIN Failed !\n";
exit;
}

$mech->get($uri);
exit unless($mech->success());
print $uri,"\n" if($verbose);
$cnt = $mech->response->as_string;
last if($maxre++ > 4);
}

exit if($maxre > 4);
print "GET Service Records\n" if($verbose);
$mech->get("serviceRecords.jsp");
exit unless($mech->success());
$cnt = $mech->response->as_string;

$mech->form_number(1);
$mech->submit();
print "POST Form\n" if($verbose);

$cnt = $mech->response->content;
$cnt = $1 if($cnt =~ m:<body[^>]*>(.*?)</body>:sig);

$cnt =~ s/<[^>]+>//sig;
$cnt =~ s/&nbsp;/ /sig;
$cnt =~ s/([\n\r\t ]){2,}/;/sig;

$cnt = $1 if($cnt =~ m/(Total Send Volume([^;]+;){10})/);

@sl = split /;/,$cnt;

$sl[4] = "Excluding Night";
for($i=0;$i<=($#sl/2);$i++)
{
printf("%25s : %s\n",$sl[$i],$sl[$i+5]);
}

$mech->get("../logout.jsp");



Installation

On Linux
Copy paste to a new file data1.pl
Install WWW::Mechanize if not already installed.

chmod 755 data1.pl


On Windows
Copy paste to a new file data1.pl
Get Active Perl and install if PERL is not installed.
Install Module WWW::Mechanize.

Usage
Linux
./data1.pl Options


Windows, not TESTED
perl data1.pl Options

PS : Comment `stty` lines when using on windows or ignore the errors
perl data1.pl -u username -p password


Options
No need any if your not good at the Command line.
-v to turn on Verbose, describe what is being done.
-u username to specify username
-p password to specify password

...
Any more doubts ?
Use the link that says comment
;)


100th

Post

Tuesday, June 24, 2008

500 I won't open a connection to 192.168.1.232 (only to 59.93.9.97)

FTP Problem

It says it wont open a connection to the host !!
Dont know what the problem is .

Solution is to use Passive mode


ftp> passive
Passive mode on.



Not of much of a post.
But just felt it might be useful to me atleast :D

Solved TV in Black and White Problem in Ubuntu 8.04 with Compaq Laptop

?
Finally after a lot of tweakin with the xorg.conf got Full Colour on S-Video Out on my Compaq Presario V3155(3000) AU, with an nVidia GeForce 6150 GPU on Ubuntu 8.04. The notable sections in the xorg.conf are the device section where you have to put the Option's right. You have to choose the right output SVIDEO or COMPOSITE and the TV Format,and in the Monitor section VertRefresh to 50hz also helped.

Please check your TV Manual for the correct VertRefresh Rate.
And the following table for the format






PAL-B

Australia, Belgium, Denmark, Finland, Germany, Guinea, Hong Kong, India, Indonesia, Italy, Malaysia, The Netherlands, Norway, Portugal, Singapore, Spain, Sweden, and Switzerland

PAL-D

China and North Korea

PAL-G

Denmark, Finland, Germany, Italy, Malaysia, The Netherlands, Norway, Portugal, Spain, Sweden, and Switzerland

PAL-H

Belgium

PAL-I

Hong Kong, Ireland, and United Kingdom

PAL-K1

Guinea


PAL-M

Brazil

PAL-N


France, Paraguay, and Uruguay

PAL-NC

Argentina

NTSC-J

Japan

NTSC-M

Canada, Chile, Colombia, Costa Rica, Ecuador, Haiti, Honduras, Mexico, Panama, Puerto Rico, South Korea, Taiwan, United States of America, and Venezuela

HD480i

480 line interlaced

HD480p

480 line progressive

HD720p

720 line progressive

HD1080i

1080 line interlaced

HD1080p

1080 line rogressive

HD576i

576 line interlace


HD576p

576 line progressive



Here is the whole xorg.conf, I guess you can find out the relevant parts from it, else just comment .. I will help you.

Xorg.conf


# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder26) Thu Feb 14 18:13:41 PST 2008

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@yellow) Tue Mar 4 20:28:57 UTC 2008
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Generic Keyboard" "CoreKeyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
EndSection

Section "Module"
Load "glx"
EndSection

Section "ServerFlags"
Option "Xinerama" "0"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Nvidia Default Flat Panel"
HorizSync 29.0 - 49.0
VertRefresh 0.0 - 61.0
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "TV-0"
HorizSync 28.0 - 33.0
VertRefresh 50.0
Option "dpms"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce Go 6150"
BusID "PCI:0:5:0"
Screen 0
EndSection

Section "Device"
Identifier "Videocard1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce Go 6150"
BusID "PCI:0:5:0"
Screen 1
Option "TVOutFormat" "SVIDEO"
Option "TVStandard" "PAL-B"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
DefaultDepth 24
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "DFP: nvidia-auto-select +0+0"


SubSection "Display"
Depth 24
Modes "nvidia-auto-select"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Videocard1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "TV: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
Modes "nvidia-auto-select"
EndSubSection
EndSection



Update
Enable xinerema to use extended monitors that span across screens

Those in the dark follow the light jump out of the windows!

Saturday, June 14, 2008

Perl Download Manager

Intro
This is my PERL downloader program, with resume.
Only works if SERVER has Parts enabled.
Well pretty much thats it



#!/usr/bin/perl

use strict;
use threads;
use threads::shared;
use HTTP::Request;
use HTTP::Response;
use Math::Round qw(nearest);
use LWP;



exit unless(defined $ARGV[0] && -e $ARGV[0]);

open HND,$ARGV[0];
NEXT:
while(my $url = <HND>)
{
my $file = substr($url,rindex($url,"/")+1);
$file =~ s/%20/_/g;

chomp $url;

exit if($url eq "" || $file eq "");

print "Downloading $url \n to $file \n";


our @stats:shared = (0,0,0,0,0,0,0,0,0,0,0,0,0,0);
our $exit:shared = 0;
our $tdl:shared = 0;
our $tgl:shared = 0;

our $lastime:shared = time();
our $lasdl:shared = 0;

my $folder = "/home/arun/download/";

select STDOUT; $| = 1;

sub catchintr()
{
my $who = shift;
print "\n$who is Bugging me\nDownload Paused\nExit message dispatched";
$exit = 1;
}

$SIG{INT} = \&catchintr;
$SIG{HUP} = \&catchintr;

sub dloader
{
select STDOUT; $| = 1;

my ($inx,$url,$localfile,$blockstart,$blockend) = @_;

my $length = $blockend - $blockstart + 1;

my $stbit = 0;
if(-f $localfile)
{
open HND, $localfile or die $!;
binmode HND;
seek HND,0,2;
$stbit = tell HND;
close HND;
$tdl += $stbit;
}
else
{
open HND,">$localfile" or die $!;
print HND "";
close HND;
}

my $ua = LWP::UserAgent->new;

my $pcksize = 1024*64;

my $enbit = $stbit+$pcksize-1;
my $parts = int($length / $pcksize)+1;
$enbit = $length - 1 if($enbit > $length);
my $err =0;
my $i = int($stbit / $pcksize);

my $req = HTTP::Request->new('GET',$url);

if($stbit >= $length)
{
print "$localfile Part Complete! $length <=> $stbit\n";
$stats[$inx] = 1;
return;
}
while($stbit < ($length-1) && $err < 100)
{
my $stbit2 = $stbit + $blockstart;
my $enbit2 = $enbit + $blockstart;

my $range = "bytes=$stbit2-$enbit2";
$req->header('Range' => $range);

$i++;

print "\n $inx ... $i / $parts ";
my $res = $ua->request($req);

threads->yield();

if($res->code == 206)
{

open HND, ">>$localfile";
binmode HND;
print HND $res->content;
close HND;

$stbit = $stbit + $pcksize;
$enbit = $stbit + $pcksize - 1;
$enbit = $length - 1 if($enbit > $length);

$tdl += $pcksize;


if($tdl < 1024)
{
print "[$tdl] bytes";
}
elsif($tdl < 1024 * 1024)
{
print "[".nearest(0.01,$tdl/1024,)." KB]";
}
else
{
print "[".nearest(0.01,$tdl/1048576)." MB]";
}

if((time()-$lastime) > 0)
{
print " [ ".nearest(0.01,($tdl-$lasdl) / (1024 * (time() - $lastime) ) ). " kB/s ] ";
$lasdl = $tdl;
$lastime = time();
}

}
elsif($res->code == 416)
{
print "\n\nSeems complete";
exit;
}
else
{
print "\nGlitch $err : ";
print $res->code;
print "\nResuming...\n";
sleep 1;
$i--;
$err++;
}

if($exit)
{
print "\n$inx is exiting ";
$stats[$inx] = 1;
return 0;
}

}
if($err == 100)
{
print "\nToo many errors in $inx, killing everyone\n";
$exit = 1;
}

$stats[$inx] = 1;
return $err;
}
my $errls = 0;

REDO:
my $req = HTTP::Request->new('HEAD',$url);
print $req->as_string;
my $ua = LWP::UserAgent->new;

my $res = $ua->request($req);

print $res->as_string;
if($res->code != 200)
{
print "\n\n";
goto REDO if($errls++ < 10);
}


my $length = $res->header('Content-Length');
$tgl = $length;
my $req = HTTP::Request->new('HEAD',$url);
$req->header('Range' => 'bytes=0-99');
my $res = $ua->request($req);
print $res->as_string;
if($res->code != 206)
{
print "Parts cant be used!\n:(\n";
goto NEXT;
}

if(!defined $length)
{
$length=-1;
print "Missing Length
Any Idea? : ";
$length = <>;
print "\n";
}
my $blocks = 8;
my $blocksize = ($length + $blocks - $length % $blocks) / $blocks;
if($blocksize < 1024 * 512)
{
$blocks = 4;
$blocksize = ($length + $blocks - $length % $blocks) / $blocks;
}
#print $blocksize," ",$blocksize*$blocks," ",$length;

my $blockstart = 0;

my @thread = ();

print "\nthreading Gatherers ...\n";

my ($blockend);
for(my $i=1;$i<=$blocks;$i++)
{
$blockend = $blockstart + $blocksize;
$blockend = $length if($blockend > $length);
$thread[$i] = threads->new(sub{dloader($i,$url,$folder."$file.$i.part",$blockstart,$blockend)});
$blockstart = $blockend + 1;
}


my $flag = 0;

do
{
$flag = 0;
for(my $i=1;$i<=$blocks;$i++)
{
$flag = 1 if($stats[$i] == 0);
}
sleep 1;
}
while($flag);

if($exit)
{
open STAT,">>$folder"."$file.stat";
print STAT "".localtime;
print STAT " : Downloaded $tdl / $tgl bytes ".($tdl*100/$tgl)."%\n";
close STAT;
exit;
}

print "\n\ngathering Gatherers...\n";


print "\nMerging ... ";

open OUT,">$file";
binmode OUT;
for(my $i=1;$i<=$blocks;$i++)
{
print "\n+ ".$folder."$file.$i.part";
open IN, $folder."$file.$i.part";
binmode IN;
my $buffer;
print OUT $buffer while(read(IN,$buffer,65536));
close IN;

unlink $folder."$file.$i.part";
}
close OUT;
print "\nDone :)\n";
open STAT,">>$folder$file.stat";
print STAT "".localtime;
print STAT " : Finished Downloading $tdl / $tgl bytes \n";
close STAT;
}

close HND;

Thursday, May 29, 2008

BASH Playlist handler and mpg123 interface

My First "somewhat" USeful BASH script
This small script scans your / directory and generates a playlist of mp3 files, and you can play your file by ./juke . You will get a list of songs matching your criteria.

Installation
Copy the source code,given below, to a new file named juke


# apt-get install mpg123
$ chmod 755 juke
$ ./juke west


Sample output and Controls

arun@XiO3:~/bash$ ./juke happy
1 happy birthday
2 Avril Lavigne - My Happy Ending
3 07_-_Happy_Days_-_Happy_Days
4 manasinu marayilla
Enter song number [MAX 4]: 2
./juke: line 13: [: -g: binary operator expected
Playing /media/disk/Songs/English/avril lavigne/Avril Lavigne - My Happy Ending.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 0.67; written and copyright by Michael Hipp and others
free software (LGPL/GPL) without any warranty but with best wishes

Directory: /media/disk/Songs/English/avril lavigne/
Playing MPEG stream 1 of 1: Avril Lavigne - My Happy Ending.mp3 ...
Title: My Happy Ending Artist: Avril Lavigne
Comment: Album: Under My Skin
Year: 2004 Genre: Rock
MPEG 1.0, Layer: III, Freq: 44100, mode: Stereo, modext: 0, BPF : 626
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0.
Bitrate: 192 kbits/s Extension value: 0
Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
Frame# 520 [ 8762], Time: 00:13.58 [03:48.88], RVA: off, Vol: 100(100)

-= terminal control keys =-
[s] or space bar interrupt/restart playback (i.e. 'pause')
[f] next track
[b] back to beginning of track
[p] pause while looping current sound chunk
[.] forward
[,] rewind
[:] fast forward
[;] fast rewind
[>] fine forward
[<] fine rewind
[+] volume up
[-] volume down
[r] RVA switch
[v] verbose switch
[h] this help
[q] quit



v1.2
Usage
./juke <keywords separated by , (comma)>
input indexes separated by space

Source

#!/bin/bash
if [ ! -e mp3list.txt ]; then
echo "Listing all mp3 on your / "
find / -name *.mp3 > mp3list.txt
fi

echo -n > tpl.tmp
i=1
while true; do
l=`echo $1, | cut -d"," -f$i`
let i=i+1
if [[ -z "$l" ]]; then
break
fi
`cat mp3list.txt | grep -i $l >> tpl.tmp`
done



sed = tpl.tmp | sed 'N;s/\n/\t/;s/\/.*\///g;s/.mp3//' | more # number lines and strip of directories and extensions.
line=1;
max=`wc -l tpl.tmp | cut -s -d" " -f1`
if [ ! "$max" -eq 0 ] && [ ! "$max" -eq 1 ]
then
echo -n "Enter song number [MAX $max]: ";
read line
elif [ "$max" -eq 0 ]; then
exit 0
fi

for i in `seq 1 10`;
do
l=`echo "$line 0" | cut -s -d" " -f$i`
echo "Playin : $l";
if [ -z "$l" ] || [ "$l" -le 0 ]; then
exit 0 #Exit here
fi

filename=`more +$l tpl.tmp | head -n 1`
#echo "$filename"
if [ "$l" -gt "$max" ]; then
echo "Out of bounds $max "
else echo "Playing $filename"
mpg123 -Cv "$filename"
fi

done

echo "OveR"; #doesnt reach


Updates
+ Added multiple search and concatenation
+ Queue more than one mp3

v1.1
Source


#!/bin/bash
# v 1.1
if [ ! -e mp3list.txt ]; then
echo "Listing all mp3 on your / "
find / -name *.mp3 > mp3list.txt
fi
`cat mp3list.txt | grep -i $1 > tpl.tmp`
sed = tpl.tmp | sed 'N;s/\n/\t/;s/\/.*\///g;s/.mp3//' | more # number lines and strip of directories and extensions.
max=`wc -l tpl.tmp | cut -d" " -f1`
if [ ! "$max" -eq 0 ] && [ ! "$max" -eq 1]
then
echo -n "Enter song number [MAX $max]: ";
read line
elif [ "$max" -eq 0 ]; then
exit 0
fi

filename=`more +$line tpl.tmp | head -n 1`

if [ $line -gt $max ]; then echo "Out of bounds $max "
else echo "Playing $filename"
mpg123 -Cv "$filename" -E like.eq
fi

echo "OveR";


Equalizer Sample like.eq

2.5 2.5
2.0 2.0
2.0 2.0
2.0 2.0
2.0 2.0
2.0 2.0
2.0 2.0
1.9 1.9
1.9 1.9
1.9 1.9
1.9 1.9
1.9 1.9
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
1.0 1.0
2.4 2.4
2.5 2.5
2.5 2.5
2.5 2.5
2.5 2.5
2.6 2.6
2.7 2.7
2.7 2.7
2.8 2.8
2.9 2.9
3.0 3.0
3.0 3.0


Updates


  • 1.1 :
    + Added equalizer file "like.eq"
    + Removed input if only 1 selection
    + Exits automatically if no matches

  • 1.0 : Everything new

Sunday, May 4, 2008

Win32.Vundo adware manual removal

Intro

This is yet another adware that spies your computer and should be removed!
The AOL Active Virus Shield license has expired and sadly AOL isn't continuing the service. So its left to me to defend my sys against the world of viruses trojans and adwares or in short all other malwares.

Win32.Vundo as experts call it,
Symptoms

  • Often get popups

  • Microsoft Internet Explorer: Work Offline , Cancel window even when not browsing


  • Strange tabs on Firefox like
    http://82.98.235.210/go//?cmp=nm_firefox_rn
    &uid=565E335C0FAF11DD8105F67908CFFFFF&rid=ggthnks
    &guid=3CF72C3808684EFABBDA369C4C32ABAF&affid=67908
    &lid=http&url=http:%2F%2Fwww.kitiyo.com%2F



Apparently this virus is a spy, it sends information on sites you are visiting to the suspicious IP address.

Removal
The virus resides in the famous folder %SYSTEM_ROOT%\system32 (,for example C:\windows\System32). There are so many files in this folder, so the makers find it easier to hide'em in the system32 folder.

As usually you would need the help of regedit to get rid of the virus.
run regedit and go to the usual location

HKLM\Software\Microsoft\Windows\CurrentVersion\Run

Check for any anomalies in names like wierd combination of letters which doesn't mean anything. The virus names itself randomly for example (jmmjqusl.dll) a combination of 8 letters. Look for the RunDll32.exe XXXXXXXX.dll,X.
Thats where the virus is and XXXXXXXX is its name.

  • Now navigate to the System32 folder rename the virus to something say DELETEME.

  • Reboot your system.

  • Now a popup must appearing saying Rundll32: Cannot find XXXXXXX.dll

  • Now goto the regedit as before and delete the entry.

  • Repeat for the same in RunOnce in regedit.
    HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce


Now you must be free.
:)

Delete this registry folder
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IProxyProvider
if it contains an entry to one of the malware dll. Don't know what it stands for, but its better to be deleted.

Waiting for more viruses ...

Someone do something about 82.98.235.210

Related Pages
Vundo Removal Tool

Wednesday, April 30, 2008

0x80070002-A problem is preventing Windows from accurately checking the license for this computer

A problem is preventing Windows from accurately checking the license for this computer.
Error Code: 0x80070002


When Windows XP boots up, after the Welcome Screen a message comes that shows the above message, and it does not allow you to login.
Solution!

Boot into Safemode


Press F8 While booting just after the BIOS screen or during the OS Selection menu.


Then do the following in the command promt.

cd %system root% \ system32
regsvr32 licwmi.dll
regsvr32 regwizc.dll
regsvr32 licdll.dll
regsvr32 jscript.dll
regsvr32 vbscript.dll
regsvr32 msxml.dll
regsvr32 shdocvw.dll
regsvr32 softpub.dll
regsvr32 wintrust.dll
regsvr32 initpki.dll
regsvr32 dssenh.dll
regsvr32 rsaenh.dll
regsvr32 gpkcsp.dll
regsvr32 sccbase.dll
regsvr32 slbcsp.dll
regsvr32 cryptdlg.dll


Reboot and check if the problem persists.

If not check if the following files are present in the System32 Folder

%SystemRoot%\System32\secupd.dat
%SystemRoot%\System32\oembios.dat
%SystemRoot%\System32\oembios.bin

If any of these files are missing, restore these files, from the setup disk, I386 folder or from another system.

To restore from a setup disk, put the CD in, and browse to the I386 folder copy the file with extension XXXXX.XX_ where XXXX.XX is the file name with first 2 letters of the extension. Rename it to a .cab file and extract the file to system32.

Reboot the system and now try again.

Your problem must be solved.

If still your problem persists try the following from Microsoft knowledge base.

Reset the default security provider in Windows XP
To reset the default security provider in Windows XP, delete the relevant registry keys in the Windows registry. To do this, follow these steps:
1. Start the computer. Press the F8 key during startup to start the computer in Safe mode.
2. Start Registry Editor (Regedt32.exe).
3. Delete the following registry keys in the Windows registry:
HKEY_USERS\.DEFAULT\Software\Microsoft\Cryptography\Providers
HKEY_USERS\S-1-5-20\Software\Microsoft\Cryptography\Providers
4. Quit Registry Editor.
5. Restart the computer.

Reset the drive letter of the system drive
Use Registry Editor to change the drive letter of the system drive back to its original value. Edit the following registry key to change the value of the system drive:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Best of luck...
:)

Sunday, April 20, 2008

Official Gmail Blog: 9 reasons to archive

Guess GMail wants all its users to archive their mail often.


We hear reports that many users don't archive their email. If you don't regularly click on the "archive" button or never even thought about it, here are some reasons you might want to get in the habit. Archiving just means moving mail out of your inbox and storing it for safekeeping. Your messages will be waiting for you when you click All Mail or search for them.

9. Phone numbers and addresses
You never know when you'll need a phone number someone emailed you or an address that was in a signature.

8. Procrastination
Sometimes you want to get a message out of your inbox, but you don't want to deal with organization, and you don't want to trash it.

7. Posterity
Just because you’re not famous now doesn’t mean that in forty years (or fifteen minutes) you won’t want to write your memoir.

6. Winning arguments
“But on May 5, 2005 at 8:43pm EDT you said….”

5. Mailing lists
Do you really need to know what Clintobamccain is doing every day? Auto-archive* their messages until you want to donate again.

4. Birthdays
Search for “grandma birthday” and voila, find the message you sent her last April. Aren't you glad you archived instead of deleted?

3. That guy
Remember that guy you thought you’d never need to get in touch with ever again?

2. Because you can
May as well use the free storage space. Plus, clean inbox = clean mind.

1. Fate-tempting is bad. You just never know
Thirty-one days after you send that message to the Trash and it gets permanently deleted, you're going to need it. Don't tempt the fates.


Guess Mails are filling up the harddrives, archiving might zip the contents and store it so that they take less space. Does gmail really have enough HardDrive space to give everyone 6GB+ of free email space ?

What do you think?

Thursday, April 17, 2008

microsoftpowerpoint.exe win32 usb worm manual removal

MicrosoftPowerPoint.exe

MicrosoftPowerPoint.exe is a worm that spreads throught the USB Memory Sticks/Pen Drives from computer to computer. It slows down all usb operations.

Manual Removal
Since the virus automatically hides all the files, you cant easily find it.
First run msconfig, and look at the start up values to find the location of the virus.
Remove that entry by unchecking the tick mark.
Reboot the system.
Do the steps given below in the registry to unhide hidden files.


HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer searchidden en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer searchsystemdirs en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced hidden en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced showsuperhiden en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced superhiden en 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN CheckedValue 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN DefaultValue 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL CheckedValue 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL DefaultValue 1


Find the location where it resides, from msconfig and delete the contents of the folder. Usually in /Documents and Settings/User/Local Settings/Temp/.

Now the system must be free of the virus.
Disable the autorun
to prevent further infections.

To prevent infections again to the usb, delete the contents of MicrosoftPowerPoint.exe and place a 0byte file with the same name.

Thats all
:)

Saturday, March 29, 2008

Repair Windows with Linux

Intro


Invalid System File
Corurpt or missing : C:\WINDOWS\SYSTM32\CONFIG\SYSTEM
Put Windows CD Press r blaah!


Warning: Do it carefully or you might end up in reinstalling :)

Pre Requisites
Any Linux OS, Live CD might work as well.

What to do?
Boot into the linux OS, and run as root dosfsck -a /dev/sdaX
where /dev/sdaX is the Drive windows is installed on.
This should fix a corrupt file system.
(Applicable only for vFAT, NTFS no idea :)

Reboot the system
If it doesn't work again

Boot into linux
and do the following as root

Mount the drive windows is installed on to say "/mnt/c"

# cd /mnt/c/windows/system32
# cp -r config /home/some/directory
# cp ../Repair/system config/system

NOTE: Copy other files such as software from Repair to config only if they are shown as corrupt.

Reboot the system

Now it should boot into windows and show your desktop.
Now use system restore to get back to your initial state.

Any doubts ?

Sunday, March 23, 2008

tracert Program (path to the source)

Command Line :

C:\Documents and Settings\User10>tracert

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name

Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list.
-w timeout Wait timeout milliseconds for each reply.


What?
Trace route is a handy little program that shows the networks / servers your request goes through to finally get you to the destination server.
To try it out just do
tracert
any_site_here

You will get a response similar to the one given below:

C:\Documents and Settings\User10>tracert digitalpbk.blogspot.com

Tracing route to blogspot.l.google.com [72.14.207.191]
over a maximum of 30 hops:

1 * 2597 ms 8 ms 192.168.1.1
2 17 ms 18 ms 14 ms 59.93.0.1
3 * * * Request timed out.
4 * * * Request timed out.
5 * 56 ms 59 ms 125.16.156.37
6 135 ms 63 ms 63 ms 125.21.167.25
7 3559 ms 316 ms 284 ms sl-gw39-nyc-10-2.sprintlink.net [144.223.157.149]
8 1040 ms 288 ms 286 ms sl-bb21-nyc-3-0-0.sprintlink.net [144.232.13.57]
9 593 ms 285 ms 290 ms sl-bb22-nyc-14-0.sprintlink.net [144.232.7.102]
10 371 ms 283 ms 535 ms sl-crs1-nyc-0-8-0-0.sprintlink.net [144.232.7.107]
11 287 ms 286 ms 287 ms sl-bb23-pen-4-0-0.sprintlink.net [144.232.20.123]
12 291 ms 292 ms 328 ms sl-bb24-rly-4-0.sprintlink.net [144.232.20.210]
13 715 ms 299 ms * sl-st22-ash-6-0.sprintlink.net [144.232.20.189]
14 318 ms 303 ms 1538 ms 144.223.246.18
15 * 773 ms 307 ms 209.85.130.18
16 1151 ms 407 ms 409 ms 72.14.238.232
17 432 ms * 378 ms 209.85.250.110
18 2107 ms 747 ms * 66.249.94.90
19 * * * Request timed out.
20 * * 2829 ms eh-in-f191.google.com [72.14.207.191]

Trace complete.


It shows that the request went through 19 systems to reach google.. phew!! :)

Have fun :)

Linux should also have one ?
can anyone comment on that ?

Wednesday, February 13, 2008

Getting Wifi to Work with Fedora 8 on V3000

So far...

Downloaded NDISWrapper.
Tried make. Got


[root@localhost ndiswrapper-1.52]# make
make -C driver
make[1]: Entering directory `/home/arun/ndiswrapper-1.52/driver'
Makefile:24: *** Kernel tree not found - please set KBUILD to configured kernel. Stop.
make[1]: Leaving directory `/home/arun/ndiswrapper-1.52/driver'
make: *** [all] Error 2


Problem was I dint have the source, downloading source. But what is the kernel number ?

uname -r


I knew I had a source downloaded somewhere...

find | grep '2\.6'

Saturday, February 2, 2008

amvo.exe Virus Manual Removal Steps

Intro

This is a nasty virus, dont know who dropped it on me. It spreads via USB Memory Sticks. It cannot be seen in the process list, hides itself and hides all files. And my antivirus doesn't seem to find a problem! :(

Some Symptoms


  • Cannot show hidden files

  • Slows down USB devices

  • Adds infections to plugged in USB devices

  • Drives open in new windows from My Computer



How to get rid off?
Step 1
The usual way is to Format the system, but it is not a permanent solution. To get rid run regedit, find all keys related to amvo.exe or the name of the virus.
Run msconfig in the Start Up Tab you can find the amvo.exe or its variants.
Remove all occurrence of the name from regedit.
Reboot the System.

Step 2
Reboot and do the following changes to the Registry using regedit

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer searchidden en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer searchsystemdirs en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced hidden en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced showsuperhiden en 1

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced superhiden en 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN CheckedValue 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN DefaultValue 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL CheckedValue 1

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL DefaultValue 1


HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Policies\Explorer NoDriveTypeAutoRun 0x00000091 (145)



-- OR --

Reboot into a different OS and do the following

Step 3
From all the drives delete the autorun.inf using command line (if on windows) or from a linux OS. Do not open the drive from the explorer as it would spread the virus again to this OS. If you have linux installed and can access all partitions on the disk, go delete the files and clear the trash on all drives.

Step 4
Reboot the system.
Do necessary changes as in Step 2, if you have not done those.

I hope that will do it
Install a good antivirus update it.
Prevent Autorun from USBs.

To disable Autoplay of all drives
Start > Run > gpedit.msc

Enable : Computer Configuration > Administrative Templates > System > Turn Off Autoplay



Anything more ?

Related Pages
Amvo Removal Tool

Friday, January 11, 2008

Fedora 8 - Werewolf on Compaq Presario V3000



The Beginning
Fedora 8, after tackling for about a week with my perl download manager, downloaded Fedora8 Werwolf, (Fedora8.iso 3.18 GiB). Phew! As expected the SHA1SUM did not match the expected one.
What to do? Redownloading the 3.18 GiB is silly. So...
BitTorrent : Torrent files contain SHA signatures of all the pieces of information, so downloaded the fedora8.torrent file, checked for SHA1 mismatches in all the pieces in the download.
Figured out that just around 12MB of the download is corrupted. Easily replaced the portion and voilla finished Fedora8.iso!! Learned a lot thank you fedora ;)

First Impressions
Well to start with it detected my Video Card, nVidia GeForce Go 6150, all of my hard drives and partitions, including NTFS drives without any additional software install. It looks classy not much fuzz.
But
as usually there is the problem of mouse disappearing, and desktop-effects cannot be enabled!
- the Mouse Disappearing can be fixed as shown in my previous post.
- MP3 doesn't play right out of the box :(

More views yet to come ...
Do you have one ?
Share ...