Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




(Winsock) Logging Into A Website


hey guys, im not really sure how to code this. how can i make a program login to this website? www.buzzen.com using winsock.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Logging In To A Website With Vb!
Cause this mod doesn't feel like helping noobs

Logging Into A Website Automatically
Hello all,

I have this certain website that I goto fairly often that requires me to login with a username and password every time I go. The site does not accept cookies, and I don't like using the windows password cache. What I am looking for is a way to execute some HTML code and automatically hand it the username and password so that I don't have to log in every time. Does anyone have any ideas??

Thanks.

Winsock Syntax? (To Request A Website With The Winsock Control)
Ok, I don't know very much about Winsock and am just now starting to use it. I'm making an anonymity program that modifies referer and user agent data. I managed to find an example of how its done on planetsourcecode.com but there's a few things that aren't working.

Anyway, when this string is sent, it sends the headers and a request for index.html from the connected host (winsock1.connect domain.com 80).

GET index.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-comet, */*
Accept-Language: en
Accept-Encoding: gzip , deflate
Cache-Control: no-cache
Proxy-Connection: Keep-Alive
User-Agent: Whatever
Referer: www.whatever.com

But when I used the website http://ipid.shat.net/ as the domain to see if code mdified the headers or not, it directed me instead to just www.shat.net. How would a browser request information to ipid.shat.net?

Also, I noticed that by sending just that information, cookies don't work properly. What other tags do I have to add onto that for it to recieve my session information? Thanks a lot.

Logging In Using Winsock
He everyone,
I am trying to connect to a server to download a file,
(just if it exists), using winsock control in a visual basic program.
To do this, I must provide userid and password to the server.
As I did not use winsock before , I looked to lot of
tutorials, but no one teach how to send userid and password
from a visual basic application.
Could pleae someone help me ?
Thanks in advance.

Help Logging Into A Site Using Winsock
can someone help me login to this site www.buzzen.net. Please note, the user has already registered, all that is needed is to login using winsock. can someone code this loging into the website for me using winsock? registering for that site is free.

Winsock Data Sent Logging
Heya,

I'm just wondering if it's possible to record all data SENT through a winsock control...

Without making a specific bit of code for every sub that sends data..

any ideas?

Thanks

Winsock, Website Data
I have a scenario, where:

1. I can get the login information sent via get method in the url – But im not that keen on that because it shows up in history.

2. I can make VB enter the information into the website, but I am really clueless about winsock, any help would be helpful


Scenario 1 - I would like to know if it is possible to delete that certain url from history (Or even clear it all)

Scenario 2 – I really am unsure how to enter data into a online form (post)

But even after that I need to be able to read the html, then display certain parts of the information, I know in other information/scripts you are able to slect the line, then char that you want to read, I just cant seem to grab the html.

Any help would be useful.

Thanks.

How To Know When Winsock Is Done Getting Data?[tcp-website]
Im connecting with a website and recieving data through the winsock control[TCP]. On my getdata, I will get sometimes 2-3 dataarival events because the winsock cannot fit as many chars as the website contains. Is there any way to know when the end of the website comes?

Check If Website Is Down Using Winsock
im making a program that visits a site using winsock. how would i know if the website im visiting is down using the winsock control?

Send Website Informations Via Winsock To Someone Else
I'm playing a massive-multiplayer-online-game. that means i have go online 5 times aday for about 3min. the game is programmed by a friend of mine. Now the computer-manager in school forced my friend to programm a IP lock, so we can't game from school.
I now want to programm 2 programms. a server and a client. the server would run 24/7 at my home PC and have to go and get the homepage and send the informations to the client. and the server has to click on a button in the website, but i want to say where to click, while working on the client.

How to get all the informations form the website, that I can send them with Winsock?

And how to make a click on the website at the server application, while sitting behind the client?

Just tell me how and what commands to use, I can try out and programming Winsock is no problem.

Winsock And Multi-Host Website, Where Is The Problem ?
Hi

I'm trying to make a program to work as an internet browser using winsock, I made some kind of success at the beginning with some famous sites (such as Yahoo!) but I failed to load some other sites, the server is replying with a page that tell me it is a multi-host website, while it can be opened normally using Internet Explorer, Where is the problem ? I'm using winsock command: "GET / HTTP1.1", but is there any other command can fix the problem ?

thanks

Loggin To A Website POST Method And DOM Or Inet Or Winsock HELP!!
Hi well what im trying to accomplish is succesfully load to a site that to login requires POST Method here's a little bit of the souce
-------------------------------------------------------------------------------
<form method="POST" action="membersarea.php">
<tr>
<td width="100%" colspan="2"><font color="#FFFFFF"><b><font size="1" face="Verdana">
EMAIL:</font></b><br>
<input type="text" size="17" name="email"></font></td>
</tr>
<tr>
<td width="100%" colspan="2"><font color="#FFFFFF"><b><font face="Verdana" size="1">
PASSWORD:</font></b><br>
<input type="password" size="17" name="password"></font></td>
</tr>
<tr>
<td width="100%" colspan="2">
<input type="checkbox" value="1" name="remember" CHECKED><font size="1"><b>Remember
Me</b></font>
</td>
</tr>
<tr>
<td><font size="1" face="Arial Narrow"><a href="lostpass.php">
Forgot Password?</a></font></td>
<td><input type="submit" value="Login" name="submit">
<input type="hidden" value="1" name="login_submit"></td>
</tr>
</form>
------------------------------------------------------------------------------

ok i need to login i have tried to do it with the DOM and this is what i got so far


VB Code:
Private Sub Command1_Click()With WB.Document.getElementById("email").Value = Text1.Text.getElementById("password").Value = Text2.Text.getElementById("remember").Value = "1".getElementById("submit").Value = "Login".getElementById("login_submit").Value = "1".Forms(0).Login.ClickEnd With End Sub Private Sub Form_Load()    WB.Navigate "http://www.domain.com"    Do While WB.ReadyState <> READYSTATE_COMPLETE        DoEvents    LoopEnd Sub


ok i get an error 'object doesnt support this method'
highlights this line

.Forms(0).Login.Click

anyway i can succesfully login to the page Thanks ALOT!!!

P.S. also there's anyway i can do it with INET control and winsock i would like to learn all of them 3 using POST method... thanks

regards,

EJ

Help Logging
hi all, im trying to connect to my PhpMyadmin remote server. now it requires username password

here is the source code of my http://IP/phpmyadmin/index.php:


HTML Code:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin 2.7.0-pl2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://212.227.132.70/phpmyadmin/" />
<link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?lang=en-utf-8&amp;server=1&amp;js_frame=right" />
<link rel="stylesheet" type="text/css" href="./css/print.css?lang=en-utf-8&amp;server=1" media="print" />
<script language="javascript" type="text/javascript">
<!--
// show login form in top frame
if (top != self) {
window.top.location.href=location;
}
//-->
</script>
</head>

<body bgcolor="#F5F5F5">


<center>
<a href="http://www.phpmyadmin.net" target="_blank"><img src="./themes/original/img/logo_right.png" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" /></a>
<h2>Welcome to phpMyAdmin 2.7.0-pl2</h2>

<!-- Language selection -->
<form method="post" action="index.php" target="_top">
<input type="hidden" name="server" value="1" />
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td><b>Language:&nbsp;</b></td>

<td>
<select name="lang" dir="ltr" onchange="this.form.submit();">


<option value="en-iso-8859-1">English (en-iso-8859-1)</option>
<option value="en-iso-8859-15">English (en-iso-8859-15)</option>
<option value="en-utf-8" selected="selected">English (en-utf-8)</option>
<option value="he-iso-8859-8-i">Hebrew (he-iso-8859-8-i)</option>
<option value="he-utf-8">Hebrew (he-utf-8)</option>
<option value="mn-utf-8">Mongolian (mn-utf-8)</option>
<option value="ru-cp-866">Russian (ru-cp-866)</option>
<option value="ru-koi8-r">Russian (ru-koi8-r)</option>
<option value="ru-utf-8">Russian (ru-utf-8)</option>
<option value="ru-win1251">Russian (ru-win1251)</option>
<option value="tr-iso-8859-9">Turkish (tr-iso-8859-9)</option>
<option value="tr-utf-8">Turkish (tr-utf-8)</option>
<option value="uk-utf-8">Ukrainian (uk-utf-8)</option>
<option value="uk-win1251">Ukrainian (uk-win1251)</option>
</select>
<input type="submit" value="Go" />
</td>

</tr>


</table>
</form>
</table>
</form>
<br />
<!-- Login form -->
<form method="post" action="index.php" name="login_form" target="_top">
<table cellpadding="3" cellspacing="0">
<tr>
<th align="left" colspan="2" class="tblHeaders" style="font-size: 14px; font-weight: bold;">Log in</th>

</tr>
<tr>
<td align="center" colspan="2" bgcolor="#E5E5E5">(Cookies must be enabled past this point.)</td>
</tr>
<tr>
<td align="right" bgcolor="#E5E5E5"><b>Username:&nbsp;</b></td>
<td align="left" bgcolor="#E5E5E5">
<input type="text" name="pma_username" value="root" size="24" class="textfield" onfocus="this.select()" />

</td>
</tr>
<tr>
<td align="right" bgcolor="#E5E5E5"><b>Password:&nbsp;</b></td>
<td align="left" bgcolor="#E5E5E5">
<input type="password" name="pma_password" value="" size="24" class="textfield" onfocus="this.select()" />
</td>
</tr>


<tr>
<td colspan="2" align="right">
<input type="hidden" name="server" value="1" />
<input type="hidden" name="lang" value="en-utf-8" />
<input type="hidden" name="convcharset" value="iso-8859-1" />
<input type="submit" value="Log in" id="buttonYes" />
</td>
</tr>
</table>

</form>
</center>

<script type="text/javascript" language="javascript">
<!--
var uname = document.forms['login_form'].elements['pma_username'];
var pword = document.forms['login_form'].elements['pma_password'];
if (uname.value == '') {
uname.focus();
} else {
pword.focus();
}
//-->
</script>


</body>

</html>
ive tried to login with Winsock with this:


Code:
Function Login(ByVal lUsername As String, lPassword As String)
wnslogin.RemoteHost = "212.227.132.70"
wnslogin.RemotePort = 80
strPost = "pma_username=" & "root" & "&pma_password=" & """"
strHTTP = "POST /phpmyadmin/index.php HTTP/1.0" & vbCrLf
strHTTP = strHTTP & "Host: " & "212.227.132.70" & vbCrLf
strHTTP = strHTTP & "Content-Type: application/x-www-form-urlencoded" & vbCrLf & "Content-Length: " & Len(strPost) & vbCrLf
strHTTP = strHTTP & "User-Agent: MyAgent" & vbCrLf
strHTTP = strHTTP & vbCrLf
strHTTP = strHTTP & strPost
wnslogin.Connect
Do While wnslogin.State <> sckConnected
DoEvents
Loop
wnslogin.SendData strHTTP
End Function

Private Sub wnslogin_DataArrival(ByVal bytesTotal As Long)
wnslogin.GetData Data, vbString
Debug.Print Data
End Sub
but no luck here
and the same is with the INET

Code:
Call Inet1.Execute(Inet1.URL, "POST", "pma_username=Root")
Call Inet1.Execute(Inet1.URL, "POST", "pma_password=""""")
Call Inet1.Execute(Inet1.URL, "POST", "Log in")
Text = Inet1.GetChunk(65535, icString)
no luck here too.
can anyone please help me, how do i login to my server?

Logging In With VB
I am creating a program for school in Visual Basic 6. The first screen that comes up is a login screen. I have created an access database to store these values. I have created an Adodc to link access to VB. I created a login button that when I click it I want it to check if the username and password is in the database, if not a msgbox will appear.

I am not new at programming in VB but I am new with database in VB

Any help with be appreciated. Thanks

Help Logging In
I'm trying to log into my AdminCP via VB6, but I can't seem to get it to work. Here's the HTML


HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<link rel="shortcut icon" href="/favicon.ico">
<title>Plesk</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script language="javascript" type="text/javascript" src="/javascript/common.js?plesk_version=psa-7.5.4-75060618.12"></script>
<script language="javascript" type="text/javascript" src="/javascript/chk.js.php"></script>

<link rel="stylesheet" type="text/css" href="/skins/winxp.new.compact/css/general.css">
<link rel="stylesheet" type="text/css" href="/skins/winxp.new.compact/css/main/custom.css">
<link rel="stylesheet" type="text/css" href="/skins/winxp.new.compact/css/main/layout.css">
<link rel="stylesheet" type="text/nonsense" href="/skins/winxp.new.compact/css/misc.css">


<script type="text/javascript">
<!--
function _body_onload()
{
loff();
SetContext('login_up');

setFocus();
}

function _body_onunload()
{
lon();

}


var opt_no_frames = false;
var opt_integrated_mode = false;

function locale_oC(f1, f2)
{
if ("default" == f2.locale.value)
return;
f2.login_name.value = f1.login_name.value;
f2.submit();
}

function login_oC(f1, f2)
{
if ((f1.login_name.value == "") || (f2.passwd.value == "")) {
alert("Enter your login name and password.");
f1.login_name.focus();
f1.login_name.select();
return false;
}
f2.login_name.value = f1.login_name.value;
f2.submit();
return false;
}

function setFocus()
{
if (o = document.forms[0].login_name) {
o.focus();
o.select();
}
}

function get_password_oC(f1, f2)
{
f1.login_name.value = f2.login_name.value;
f1.submit();
}

//-->
</script>
</head>
<body onLoad="_body_onload();" onUnload="_body_onunload();" id="mainCP" class="">
<a href="#" name="top" id="top"></a>
<table border="0" cellspacing="0" cellpadding="0" id="loaderContainer" onClick="return false;"><tr><td id="loaderContainerWH"><div id="loader"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><p><img src="/skins/winxp.new.compact/icons/loading.gif" height="32" width="32" alt=""/><strong>Please
wait.<br>Loading ...</strong></p></td></tr></table></div></td></tr></table>
<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td id="screenWH">
<div class="screenBody" id="login">
<div class="formArea">
<table cellspacing="0" cellpadding="0">

<tr><td id="loginTitle">Login To Plesk 7.5 Reloaded</td></tr>

<tr><td id="loginForm">

<p>Enter the login name into &quot;Login&quot; and password into the &quot;Password&quot;
fields respectively. Then click &quot;Login&quot;.</p>

<form name="form1" action="/login_up.php3" method="post" onSubmit="if ((document.forms[1]) && (!document.forms[1].passwd.value)) document.forms[1].passwd.focus(); return false;">
<table class="formFields" cellspacing="0" width="100%">
<tr>
<td class="name"><label for="login_name"> Login</label></td>
<td><input type="text" name="login_name" id="login_name" value="" size="25" maxlength="501" tabindex="1"></td>
</tr>
</table>
</form>

<form name="form2" action="/login_up.php3" method="post" onSubmit="return login_oC(document.forms[0], document.forms[1])">
<table class="formFields" cellspacing="0" width="100%">
<tr>
<td class="name"><label for="passwd"> Password</label></td>
<td><input type="password" name="passwd" id="passwd" size="25" maxlength="14" tabindex="2"></td>
</tr>

<tr>
<td class="name"><label for="fid-locale">Interface language</label></td>
<td><select name="locale" id="fid-locale" onChange="locale_oC(document.forms[0], document.forms[1])"><option value="default" SELECTED>
User default</option>
<option value="en-US">ENGLISH (United States)</option>
</select>
</td>
</tr>
</table>

<input type="hidden" name="login_name" value="">
</form>

<div class="formButtons">
<form name="form3" action="/get_password.php" method="post">
<table width="100%" cellspacing="0"><tr>
<td class="main" id="get_password">
<input type="hidden" name="login_name" value=""><a href="#" onClick="return get_password_oC(document.forms[2], document.forms[0]);">
Forgot your password?</a>
</td>
<td class="misc"><div class="commonButton" id="bid-login" title="Login" onclick="return login_oC(document.forms[0], document.forms[1]);return false" onmouseover="mouse_move('b_login')" onmouseout="mouse_move()"><button name="bname_login" tabindex="3">
Login</button><span>Login</span></div></td>
</tr></table>
</form>
</div>

</td></tr>
</table>
</div>

</div>
</td></tr></table>
</div>
</body>

<script type="text/javascript">
try {
lsetup();
} catch (e) {
}
</script>
</html>

This is the code I'm using:


Code:
Private Sub Command1_Click()

wb2.Document.All("login_name").Value = "user"
wb2.Document.All("psswd").Value = "pass"
wb2.Document.Forms(0).Submit
End Sub

Logging
Hello,
i have the following problem :

i have a winsock connection established to a game server, now at some point it will recieve the command 'Login' from the game server.. after it recieves that , i want it to log the next 5 packets the winsock sends to the game server ( its a proxy, so no , i have to READ what the program is gonna send )..
so in short :

1. Wait till it recieves 'Login' from the connected game server.

2. Log the next 5 packets the WINSOCK is going to send TO the game server.

3. Save those 5 packets in 1 variable

If theres anything im unclear about, please tell me..
Thanks for your help ,
Jeroen van Vierzen

PS:
I know it contains the word WINSOCK a lot, but in fact the basic problem fits more in general then in Winsock ( since communications section is more spend to the Connecting type of questions )
:P thx

Logging Off
I am doing a login form and use this code



Code:
Me.Hide
Timez = Format(Now, "hh:mm:ss AM/PM")
Monthz = Month(Now) & "/" & Day(Now)
dashz = "-------------------------------------"

Open App.Path & "login.txt" For Append As #1
Write #1, Timez
Close #1
Open App.Path & "login.txt" For Append As #2
Write #2, Monthz
Close #2
Open App.Path & "login.txt" For Append As #2
Write #2, dashz
Close #2

But i also wanted a log off from, how do i do it? I added


Code:
private sub form_unload (Cancel as integer)

but it seems cannot. How>

Logging In
apologise, I know this is a very simple question, but I am only a beginner!
Take the following code:

Do
mSQL = "Select UserName from Employees where UserName = '" & strUserName & "'"
Set RS = Conn.Execute(mSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter Username", vbExclamation, "Invalid Username")
End If
Loop Until strUserName <> ""




If strUserName <> "" Then
Form6.Show
Form1.Hide
End If


'ensuring password is correct
sSQL = "Select Password from Employees where Password = '" & strPassword & "' AND UserName = '" & strUserName & "'"

Do
Set RS = Conn.Execute(sSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter password", vbExclamation, "Invalid Password")
End If
Loop Until strPassword <> ""

If strPassword <> "" Then
Form6.Show
Form1.Hide
End If

The result is that the system logs me on regardless, yet still displays the warning message boxes!
What am i doing wrong?
Thank you!

Key Logging
In my program i need to log the keys of a user, but the tricky part is, i need to log the keys when is typing caracters in an other application. E.G A user is typing a thing in Word then my program has to log the keys the user is pressing, i hope u all understand my question.

Anyway i give u all my regards.

Xp Logging
I was to make a program that is going to run every time somebody logs on. Im using windows Xp home edition. How do I retrieve the information of who is currently logged on, and at what time. Is this name in the registry? If so, how do I get it with vb?

Thanks in advanced!

Logging On
I am new to Visual Basic, how do you compare a value entered in a text field (eg password) and a value held in a field of a table in an Access DB to ensure they are the same?
Thank you!
m

Logging In With API
Hi People!

I am having trouble finding a decent login API for win95 or winNT. It should check the domain and let them login if they are a registered user. Does anyone know of an API that does some or all of this? If not is there any other way of doing it?
Thanks.

Logging..
Does anyone have or know of a code that will take all of your VB actions or what VB does at all and will log it to a text file? Everytime something happens, it will append the data to the file, just keep adding to the log?

I ask because a team and I built a Master Control system for a TV station in VB and we are required by Government Regulation to keep a log of everything that happens with Master Control.

VB6 Logging
Hello everyone,im currently working on a program for monitoring cpu usage,bandwith,current processes open etc.It's for monitoring servers.I got a simple logging system going but im wondering how i would get it to not overwrite the already existing line.Hope you understand me.Thank you for your time.

Logging In Help?
Ok, so I'm trying to create a program that will login into a site via vb. Now i was trying to use this post: http://www.vbforums.com/showpost.php...0&postcount=11 as a refrenece, I got everything to work, except I found out that the page I'm logging into has two login forms. So i think the program is " confused" in which form to fill out and which form to submit.

The url I'm tryting to login in would be: http://my.gamebattles.com/login

If you could help, that would be awesome

Logging
hi there


first off kinda new to vb, taken my time to read around the forum so i hope im posting in the right place!

Im wondering is it possible to write abit of vb script to log specifically other vb programs?

so for example xxx program logged at date/time to a txt file


alternatively log a program based on size i.e 5.678 bytes acessed on etc etc date/time dumped again to a txt file.?


if theres already a simliar script about that someone knows of could u point me in the direction


many thnxs guys

Logging In
gud day ^_^

just want to ask how can i prevent a user account to be login multiple times at the same time? ex. if the user admin is currently log in the system, no other user in the network can use that account as long as that account is still log.

im thinking of making a column in my database named status and through that, the status of the user will be checked if the user is currently log in or not.

any other idea?

Need Help With Logging.
I have an error handler put into my code and that logs just fine but how do I just log stuff normally?

For example, I just copied a bunch of files to a directory so I want to log all the ones that I just copied.

Logging On To Web
hi I am trying to log on to a web page through my program using this code:

Private Sub Command1_Click()

'WebBrowser1.Navigate
WebBrowser1.Navigate ("http://www.mysite.com/")
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
WebBrowser1.Document.Forms(0).uname.Value = Text1.Text
WebBrowser1.Document.Forms(0).uemail.Value = Text2.Text
WebBrowser1.Document.Forms(0).psword.Value = Text3.Text
WebBrowser1.Document.Form(0).submit

End Sub

but I am getting error at this line: WebBrowser1.Document.Form(0).submit

it just wont submit, the ollowing code is from the we page source:
<td align="center"><font color="black">Username:</font></td>
</tr>
<tr>
<td align="center"><input class="login_input" type="text" name="uname" value=""></td>
</tr>
<tr>
<td align="center"><font color="black">Email:</font></td>
</tr>
<tr>
<td align="center"><input class="login_input" type="text" name="uemail" value=""></td>
</tr>
<tr>
<td align="center"><font color="black">Password:</font></td>
</tr>
<tr>
<td align="center"><input class="login_input" type="password" name="psword"></td>
</tr>
<tr>
<td align="center" style="padding-top: 5px;"><input class="login_input" type="submit" value="Login" style="width: 50px;"></td>
</tr>
</table>
<input type="hidden" name="hash" value="e97be0c74dd6e21be069e57c7fe40c9a">

Logging In
im trying to do a log in for for my vb system. there will be a choice of two usernames from a combo box and the password is created else where. Unfortunatley it wont work for me it keeps producing the final msgbox (i.e unauthorised login).
Here is the code i have, i am probably missing something easy.
Private cn1 As New ADODB.Connection
Private rs As New ADODB.Recordset
Private cmd As New ADODB.Command

Private Sub cmdenter_Click()

cn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=H:Development
ooney.mdb"
cn1.Open
rs.Open "select * from users", cn1, adCmdTable
cn1.CursorLocation = adUseClient
cmd.ActiveConnection = cn1

Dim pass As String
Dim username As String
Dim correctlogin As Integer

username = Combouser.Text
pass = txtpass.Text

rs.MoveFirst
Do While rs.EOF = False

If username = rs("Username") And pass = Trim(rs("Password")) Then
correctlogin = 0
Exit Do
ElseIf (username = "") Or (pass = "") Then
correctlogin = 1
Exit Do
Else: correctlogin = 2

End If

rs.MoveNext
Loop

If correctlogin = 0 Then
Login.Hide
Main.Show
ElseIf correctlogin = 1 Then
Login.Show
MsgBox "Please Enter A UserName And A Password", vbOKOnly, "Information"
ElseIf correctlogin = 2 Then
Login.Show
MsgBox "You Must Be An Authorised User To Login To The System. Please Check Your Details", , "Unsuccessful Login"
End If

cn1.Close
End Sub

can anyone help me, thanks

Logging
Hi im making a program and was wondering if someone here could post an example or source of how to create a log file when a command button is clicked.So everytime a command button is clicked it will make a log file.Thx for the help its very much appreciated

Logging In
I apologise, I know this is a very simple question, but I am only a beginner!
Take the following code:

Do
mSQL = "Select UserName from Employees where UserName = '" & strUserName & "'"
Set RS = Conn.Execute(mSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter Username", vbExclamation, "Invalid Username")
End If
Loop Until strUserName <> ""




If strUserName <> "" Then
Form6.Show
Form1.Hide
End If


'ensuring password is correct
sSQL = "Select Password from Employees where Password = '" & strPassword & "' AND UserName = '" & strUserName & "'"

Do
Set RS = Conn.Execute(sSQL)
If RS.EOF Then
iResponse = MsgBox("Please re-enter password", vbExclamation, "Invalid Password")
End If
Loop Until strPassword <> ""

If strPassword <> "" Then
Form6.Show
Form1.Hide
End If

The result is that the system logs me on regardless, yet still displays the warning message boxes!
What am i doing wrong?
Thank you!

Logging IP
Does anyone know how to log a user's IP address via Visual Basic Script?

Thanks

Logging
Please somebody answer this question ( my last 3 nobody's said anything about)

How can I let my client application know the IPs of my server application?

Key Logging
How could I make an app that, even when it doesn't have focus, catches all keys pressed? For example, when the user is playing a game like Counter Strike, he presses the A button on the keyboard, and in the app, Text1.SelText = KeyPressed... get it? Thanks.

Logging
i need some help with the following questions for my security program, thank you.




I need this program to start logging all activities when it is ran, including keypress, mouse click, etc.

It also needs to record the time and date the program was run, and for how long it was run for.

please help.......

Logging Uses
ok first i need a path or something to the file that it stores history information but if i have a timer set for like interval 500 than every 500 miliseconds it will check for if any programs have been opened, if so it will add the name of the program to a list along with the time it was opened, now i'm guessing windows stores that in a file or something but i'm not sure can you help

Maybe some way to record files that have been opened

Logging Uses
ok first i need a path or something to the file that it stores history information but if i have a timer set for like interval 500 than every 500 miliseconds it will check for if any programs have been opened, if so it will add the name of the program to a list along with the time it was opened, now i'm guessing windows stores that in a file or something but i'm not sure can you help

Logging
ok how do you log the use of the computer when it turns on and off and all the times that files and programs that are opened

Logging OFF
Code from Alan777
for question "rebooting a network computer remotely "
------------------------------------
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4

Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, ByVal dwReserved _
As Long) As Long

Public Sub Reboot()
ExitWindowsEx EWX_FORCE Or EWX_REBOOT, 0
End Sub

Public Sub Shutdown()
ExitWindowsEx EWX_SHUTDOWN, 0
End Sub
-------------------------------------

What about logging off?

Exe Logging
I'm writing a program which logs the amount of time applications are running. So far I have to start the applications which exe's I've added to a database from the program itself. What I want however, is to have the program run in the background and monitor which exe is running, so I don't have to start the applications from my program but with the normal shortcut from the Start-menu.

Thanks in advance.

Harmough.

Logging
Here's a part of my code. What I'm trying to do is put checkpoints at certain stages of my code that will Print a line of text to my log file stating that the code has at that particular point has executed correctly. Do I have to reopen the log file each time I want to do a check. I've only started VB this week and am still a bit lost. Any help would be greatly appreciated.

Thanks a lot.





Sub ComOK_Click ()
On Error GoTo ChangePW_ComOK_Click_Err
'Code by JK to investigate Password Errors
'Creates a log file called DebugJK.log
filenum = FreeFile
Open "C: empDebugJK.log" For Append As #filenum
Print #filenum, "____Purpose of Logfile____: To determine any errors in the CHANGEPW.FRM "
Print #filenum, "Last modified: "; Now
'End JK
If TextOldPassword.Text <> "" Then
25 : UserSS.FindFirst ("[User Name] = '" + who.Name + "'")
enc$ = encode(CStr(who.Name), CStr(TextOldPassword.Text))
If (enc$ <> UserSS!Password) Or (who.Name <> UserSS![User Name]) Then Error 99
'Added JK
Print #filenum, "The oldPasswordCheck has been run successfully"
Close #filenum
' End JK
If Len(TextNewPassword.Text) < 6 Then
Text = messageList(30) ' Password must have at least 6 characters
MsgBox Text, MB_ICONEXCLAMATION, "Password Change"
TextNewPassword.Text = ""
TextConfirm.Text = ""
TextNewPassword.SetFocus
Exit Sub
End If

Logging
I'am working with the NT application log
and i don't know where I can find the resource file that has the information for the eventID
The following message is raised in the log:
"The description for Event ID ( 100 ) in Source ( fdsgsdg ) could not be found"
How can I solve this?

Logging
this may sound like a stupid question, but, I am writing a small math quiz program and was wondering if there was a way to get vb to log scores from the quiz along with the name of the person taking the quiz to a file like a word document or an excel spreadsheet in order to save the results?
Thanks in advance for any replies, as this is for a college assignment and I'm just looking to go for those extra few marks.

Logging Out Of App
Hi all,

I would like to allow the user to log out of app. IE/ Close all forms,
reset all variables and go back to displaying the splash screen with the
login dialog box. The way it's being done right now is all forms are
unloaded and set to nothing and all global variable are reset IE/
...
frmSelection.Hide
Set frmSelection = Nothing
gcUserLogin = ""
loginfrm.Show...

There are some major bugs with this. When try and log back in for second
time app pauses in debugger...

I used this code for the exit but cannot apply it to a log out. Can anyone
help me?

Dim i As Integer

'Loop through the forms collection and unload
'each form
For i = Forms.Count - 1 To 0 Step -1
Unload Forms(i)
Next

Logging In Using WA
Hi,

I am trying to connect to a SQL Server using VB6.
I have put in name of server and the initial catalog (the name of database I wish to use - this is right isnt it???)

But I am having trouble logging in.
Is there a way I can instruct it to login using my Windows authentication, without actually hardocding these details?

Thanks for the help!

I Need Help Wif A Logging
I NEED A LOGGING FOR 3 PEPOLL CAN U HELP ?

I NEED 3 Password AND 3 User Name

BUT 3 DFRINT 3 Password AND 3 User Name

IN 1 FORM

ok ?

CODE:
Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
    Form4.Show
    Me.Hide
End Sub

Private Sub cmdOK_Click()
    'check for correct password
    If txtPassword = "1" Then
        'place code to here to pass the
        'success to the calling sub
        'setting a global var is the easiest
        LoginSucceeded = True
        Form5.Show
        Me.Hide
    Else
        MsgBox "Invalid Password, try again!", , "1"
        txtPassword.SetFocus
        Form4.Show
        SendKeys "{Home}+{End}"
    End If
End Sub

Private Sub Form_Load()

End Sub




Edited by - richard4311 on 6/27/2005 7:24:07 PM

Logging In!
Help Me!

Ok I Just Learned How To Do Login Programs In VB

I Put It Where It Already Has A Login Name

I Already Know How To Make It If user.text <> Blah

I Try Logging In What I Put In My Code Admin Pass:X

But When I Place It It Doesnt Do Anything!

But When I Place Anything Besides Admin Pass:X It Logs In!

I Want It To Login Of What I Told It To!

Copyright © 2005-08 www.BigResource.com, All rights reserved