Windows Screen Saver Password Decoder
Tells you the Windows screen saver password
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned char matrix[256+2];
unsigned char matgut[256+2];
unsigned char mystery[4]={ 0xb2, 0xdc, 0x90, 0x8f };
unsigned char h1;
unsigned char pa[79], passwd[80];
unsigned char tofind[30];
int h2=4;
unsigned int lentofind;
int len;
void fixmatrix()
{
unsigned char orig, mys, help1, last;
int i,j, help2;
for(i=0; i<256; i++)
matrix[i]=i;
matrix[256]=0; matrix[256+1]=0;
h1=0; last=0;
for(j=0;j<256;j++) {
orig=matrix[j];
mys=mystery[h1];
help2=(mys+last+matrix[j]) & 0xff;
help1=matrix[help2];
matrix[j]=help1;
matrix[help2]=orig;
last=help2;
h1++; h1=h1%4;
}
memcpy(matgut, matrix, sizeof(matrix));
}
void check(char *test)
{
unsigned char help1, oldh2;
int i;
strcpy(passwd, test);
strcpy(pa, passwd);
len=strlen(pa);
memcpy(matrix, matgut, sizeof(matrix));
h1=0; h2=0;
for(i=0;i<len;i++)
{
h1++; h1=h1&0xff;
oldh2=matrix[h1];
h2=(h2+matrix[h1]) & 0xff;
help1=matrix[h1];
matrix[h1]=matrix[h2];
matrix[h2]=help1;
help1=(matrix[h1]+oldh2) & 0xff;
help1=matrix[help1];
pa[i]^=help1;
}
}
int is_ok(char a)
{
if ((a<='9') && (a>='0'))
return 1;
else if ((a<='F') && (a>='A'))
return 1;
else
return 0;
}
int nibble(char c)
{
if((c>='A') && (c<='F'))
return (10+c-'A');
else if((c>='0') && (c<='9'))
return (c-'0');
}
void parse(char *inpt)
{
char *tok;
char num[2];
lentofind=0;
tok=strtok(inpt, "\t ,\n");
while(tok!=NULL) {
num[0]=tok[0]; num[1]=tok[1];
if ((!is_ok(num[0])) || (!is_ok(num[1])))
{
puts("Please input strings like: b2,a1,03");
exit(0);
}
tofind[lentofind++]=16*nibble(num[0])+nibble(num[1]);
tok=strtok(NULL, "\t ,\n");
}
tofind[lentofind]=0;
}
int hex(char *str)
{
return (str[0]-'0')*16+(str[1]-'0');
}
void main()
{
unsigned int i;
int j,n=0,odd=0;
unsigned char tst[80];
char inpt[120];
char ascii[120];
char temp[3];
char ans;
fixmatrix();
printf("All ascii codes are from der RegEdit and hex codes are from ein text editor\n\n");
do
{
printf("Are der codes hex or ascii [h/a]?");
ans = getchar();
getchar();
} while(tolower(ans) != 'h' && tolower(ans) != 'a');
tolower(ans) == 'a';
if(tolower(ans) == 'a')
{
printf("Give me the codes, separated by commas (in ascii):\n >");
gets(ascii);
i=0;
do
{
temp[0]=ascii[i];
temp[1]=ascii[i+1];
temp[2]=NULL;
inpt[n]=hex(temp);
n++;
odd++;
if(odd % 2 == 0 && i+3<=strlen(ascii))
{
inpt[n]=',';
n++;
}
i+=3;
}while(i<=strlen(ascii));
inpt[n]=NULL;
printf("Der hex codes fur der password are: %s\n", inpt);
}
else
{
printf("What are der codes, separated by commas, in hex?:\n >");
gets(inpt);
}
for(i=0;i<strlen(inpt);i++)
inpt[i]=toupper(inpt[i]);
parse(inpt);
for(i=0; i<lentofind; i++)
tst[i]='A';
tst[lentofind]=0;
for(i=0; i<lentofind; i++)
{
for(j=' '; j<='Z'; j++)
{
tst[i]=j;
check(tst);
if(pa[i]==tofind[i])
break;
}
}
printf("Password is: %s\n", tst);
exit(0);
}
Upload
<p><br><br>
<p>Web Controls are server-side elements used to create
"smart forms" in ASP.NET. These Web controls actually turn into
html elements when they are processed on the server. In this article, I am
going to explain how to use the label control. My goal is to teach you
step-by-step by keeping it simple. Instead of throwing all web controls together in one
article, I am going to break it down so you don't get too much at one time.
Ready? Let's begin!</p>
<p><b>The "label" Control</b></p>
<p>Adding static content to your page has always been easy.
But what if you want to dynamically change what will be displayed? You
could use the "label" control. Here is the code:</p>
<p><font color="#0000FF"><asp:Label id="lblexample" runat="server"
/></font></p>
<p>This is the minimal amount of code you need to create a
label. If you wanted to set a default text value in the label, you would
do something like this:</p>
<p><font color="#0000FF"><asp:Label id="lblexample" text="This is my first label"
runat="server" /></font></p>
<p>Lets break some of this down for a minute. The "<font color="#0000FF">asp:Label</font>"
part is the start of the control. The "id" parameter is going to be the
name of your label control. You can name yours whatever you want. In the
text parameter, it set a default text value to "This is my first label."
Do not forget the "runat=server" part. When you execute your page, it
will display "This is my first label." </p>
<p>If you wanted to change the text dynamically in a subroutine, you would
call the following:</p>
<p><font color="#0000FF">lblexample.text = "New text would go here!"</font></p>
<p>Remember, if you did not call your label "lblexample" then
you would have to change the tag to the appropriate name. </p>
<p>Are you ready for your first example? Of course you are!
</p>
<p><font color="#0000FF"><script runat="server"></font></p>
<p><font color="#0000FF">Sub page_load<br>
lblexample.text = "Welcome to my site!"<br>
End Sub</font></p>
<p><font color="#0000FF"></script></font></p>
<p><font color="#0000FF"><html><br>
<head><br>
<title>My first label</title><br>
</head><br>
<body><br>
<asp:Label id="lblexample" runat="server" /><br>
</body><br>
</html></font></p>
<p>Let me explain this now. We started off the script
by using "<font color="#0000FF"><script runat="server"></font>." This starts are
server-side scripting section. We will hide our subroutines in there. In
the next line, we declare our first (and only) subroutine. This subroutine
is called "page_load." This subroutine will always be executed when the page
begins to load. For your own reference, you can always use the "page_load"
sub in any of your pages. It will always execute first. The "page_load"
subroutine is a good place to declare and store variables which you will use
throughout the script.</p>
<p>In the next line, we called "lblexample.text." This will
change the text value in the control named "lblexample" to "Welcome to my
site!".</p>
<p>After that, we just clean up by ending the "page_load" sub
and closing the script tag. This allows us to start developing what the
user will see when he/she comes to the page. Notice, the rest is all HTML
tags except for the one label control entitled "lblexample." This is the spot
where the "Welcome to my site!" text will be placed. Simple isn't it?</p>
<p>I hope you found that somewhat helpful. I tried to
keep it as simple as possible but still not making it boring. Please vote
and leave your comments! If you have any problems or you get stuck, please email
me at <a href="mailto:webmaster@sourcecode-central.com">
webmaster@sourcecode-central.com</a>. I will be glad to help you!</p>
<p> </p>
Original Comments (3)
Recovered from Wayback Machine