Code Infinity

SAVE THE EARTH.............

Sunday, September 28, 2008

Cannot find key or serial of software on internet?

let's pretend you need a serial number for windows xp pro.

in the search bar type in just like this - "Windows XP Professional" 94FBR

the key is the 94FBR code.. it was included with many MS Office registration codes so this will help you dramatically reduce the amount of 'fake' porn sites that trick you.

or if you want to find the serial for winzip 8.1 - "Winzip 8.1" 94FBR

just try it out, it's very quick and it works nicely..

-----------------------------------------------------------

here is another trick that works fairly decent for finding mp3's on the web (which is hard to do normally, to say the least)

say you want to get, for example, a Garth Brooks song. type this in the search bar - "index of/" "garth brooks" .mp3 the ones you want to check out first are the ones that say "Index of/" in the title of the search result. this technique allows you to easily pull up web folders with direct downloads. it will look the same as if you were logging into a ftp url.. i'm sure you can be pretty flexible on how you type that in, so long as you include "index of/"

i'm sure you can use this for more than just mp3's (it's not perfect but it has worked for me on a few occasions)

always make sure to use the quotations where i placed them. they help pinpoint the correct search results more accurately. just try it out, also if you want to learn how to do more with google look up "google hacks" 

Friday, September 26, 2008

How to tackle pen-drive viruses?

Pen drives are really the boon for the computer industry. Its usefullness are not a matter to talk of. But all those usefullness gone in the pits if they are a easy carriers for viruses. But u don't need to be worried about that, because if you follow me, then you can prevent about 95% of pendrive viruses form infecting your computer.

Firstly I would like talk about some precautions u should take,

> Never double click any pendrive. Try to access it by exlporing it.

> show the hidden files along with system files. If viruses are there, then now u can see thm. Sometimes it does happens(because of a virues) it disables you show hidden file option. Then in this case use folowing dos commands,
enter in your pendrive,then write
dir /ah
this will display the hidden files in this directory.

Now how to tackle those viruses,
open your task manager, and see whether any unidentified processes are running. You could see some like wscript.exe ,driveguard.exe
now next step, open msconfig from run & click on startup tab. This includes the list of applications which are started at the startup. Try to see whether any unidentified program is running or not. If there is something, then uncheck it.


Thursday, September 25, 2008

download applications from pay-pal sites without spending a paisa.......

I think you all must have come across something great, but due to money associated with it u have to drop ur idea. But believe me it will not be the case now. But Here on, you can easily access those inaccessible appliations.

Its very easy. All you require is common-sense(i suppose you have!!!) & a bit knowledge of HTML.

Before starting anything, I want you to hide your ip only for security purpose. you can click here to hide your ip

1) Rightclick your mouse (ctrl+click) viewsource and open the source of the site in an a texteditor
2) Search for the word "return"
3) Next to it you can find the url for the thank you page
4) Copy the url and paste it in your browser and you will see the download link

But, this works only if you download it immediatly, it wont work if try to send its link via email.

Want to hide your drives?

Hey guys, do you want to hide your drives because they might contain something personel. Then you should try this windows hack,

start > run > type gpedit.msc , then a dialog box named 'Group policy' will be opened. Now, Under  User configuration > administrative templates >windows components > windows explorer ,press double click 'Hide these specified drives in my computer' , to undo the changes you can do these steps again & disable this feature.

Actually, there are all more fun stuffs there. It is very easy, safe and a-lot more hassle-free as compared registry editing, where you have to remember those long registries. 

So, explore on your own, and experience a new windows made for you........

Wednesday, September 17, 2008

program to remove spaces from any string

Hey, this a small code snippet for removing spaces from any string,


void remove_space(char *main) //accepts a string as argument
{

char ch[100];
strcpy(ch,main); // copies string main to ch
int i,j=0;
for(i=0;main[i]!='\0';i++)
{ if(ch[i]==' ') //  if any space is encountered then,
{
for(j=i;ch[j]!='\0';j++)
ch[j]=ch[j+1]; // decrements the string.
if(main[i+1]==' ')
i--;
}
}
printf(ch);
}

this small function removes all the spaces from any string. This function can come very handy in several situations.

Try to implement it...

Tuesday, September 16, 2008

Learn Assembly with emu8086

I just want to suggest you one thing, i.e. if you want to really learn assembly of our own & want to study how 
assembly workes, then start assembling your program in emu8086. Believe me it is the assembly learning tool
present today. I tell all and every thing that you want to know it.

So, never the late download it from the link given below & realise the power of assembly.

Sunday, September 14, 2008

How to write a file in hexadecimal format?

I have written this post because i personally feet that this particular topic is left is most of the books while studying data file handling. When I was making my assembler "ASM Weaver" I had to work on writing hex files in C++.

So, here we gooooo...

Suppose you want to want a file "hex_file.com" in hex format & are aware of the content before run-time. Then, you can use the following procedure,
If you want to write 1C BA 25 (this is in hexadecimal format) then , 
 
write char(0xc1) to file and similliary the others.

    
Notice that to hexadecimal a number we add prefix 0x before that number. Notice,instead of directly writting the hex-number we have written char(0x1c) because c++ writes a file in decimal format so, by doing this we are actully writing the character equivalent of that hexadecimal number . The numbers are written in a pair because the represent the character.

But what if we don't know what to write in file before compile-time.In this case, you have to convert that number into a hexdecimal number store it in a variable and print the character equivalent as shown above.

Now problem arises how to convert the decimal into hexadecimal number. The solution of this problem can be found in the following code,


 
int len=0;
long a=0;

len = strlen(ch);
// if the number is 8bits then , this code will
//  store that data into a variable 'a'.

if(len<=3)
{
for(i=len;i>=0;--i)
{
if(isdigit(ch[i])) // ch has been defined, so don't confuse.
a += (ch[i]-'0')   *pow(power,j++);
else if(ch[i]>='a'&&ch[i]<='f')
a += (ch[i]-'a'+10)*pow(power,j++);
else if(ch[i]>='A'&&ch[i]<='F')
a += (ch[i]-'A'+10)*pow(power,j++);
}
fout<
}
else     // if the number is more than 8bits then it will do conversion.
{
j=len/2;
if(len==3)
j++;
char *sub;
while(j>=0)
{
int k=0,l=0;
//k=j*2;
long b=0;
sub=&ch[j];
for(i=1;i>=0;--i)
{
if(isdigit(sub[i]))
b += (sub[i]-'0')   *pow(power,l++);
else if(sub[i]>='a'&&sub[i]<='f')
b += (sub[i]-'a'+10)*pow(power,l++);
else if(sub[i]>='A'&&sub[i]<='F')
b += (sub[i]-'A'+10)*pow(power,l++);
}
fout<
j=j-2;
}

}

I have used this code, but if problem persists in its implementation then, you can mail. I will try at my best to sort your problem as early as possible.

code snippet for finding position of any sub-string in a main-string.

Hey guys, here i am with a small but sometimes useful code. This code snippet will find the position of any sub-string in the main-string. So, here we goooooo...........

int find_pos(char *main,char *sub)
{

int count=0;    //initiallizes count with zero.
int len=strlen(sub); //calculates the length of sub-string
int pos=0;  //initiallizes pos with zero.

for(int i=0;main[i]!='\0';i++)
{   //loop to analyse the characters of  main string.

if(sub[0]==main[i])
{   // if the first character of sub matches with the charater of main,THEN
for(int j=0;sub[j]!='\0';j++)
{  //checks the preceeding character of sub & main.
if(sub[j]==main[i+j])
{
count++;   // if TRUE, the adds 1 to count.
if(count==len) //if count is equal to len, THEN saves the values of
{ // 'i' in 'pos'.As this the location of sub-string.
  pos=i;
break;  //After saving, break the loop.
}
}
}
}

if(count==len) //if count is equal to len then break the main loop.
break;
}

return pos; // return position of sub-string.

}

Is it scaring? But i don't thing so. It is a very simple and properly documented program. If you require any help regarding programming in c++ and assembly language you can mail me. I will try to sort you out.