Thursday, August 23, 2007

Simple ASP contact form processor

If you have a contact form like this:

First Name

Last Name

Address

City

State

ZIP Code

Age

Your Question Is?

Email Address

Phone Number



you could use a simple ASP script this to send the submissions via email:
<%
dim emailFrom, emailTo, emailSubject, emailBody
dim objMail, iConf
emailFrom = Request.Form("emailAddress")
emailTo = "hross@jmsonline.com"
emailSubject = "JMS Website: Contact Form Submission"
emailBody = "The following information was submitted from the JMS online contact form:" & vbcrlf &vbcrlf
emailBody = emailBody & "First Name: " & (Request.Form("firstName")) &vbcrlf
emailBody = emailBody & "Last Name: " & (Request.Form("lastName")) &vbcrlf
emailBody = emailBody & "Address: " & (Request.Form("address")) &vbcrlf
emailBody = emailBody & "City: " & (Request.Form("city")) &vbcrlf
emailBody = emailBody & "State: " & (Request.Form("state")) &vbcrlf
emailBody = emailBody & "Zip: " & (Request.Form("zip")) &vbcrlf
emailBody = emailBody & "Age: " & (Request.Form("age")) &vbcrlf &vbcrlf
emailBody = emailBody & "Question: " & (Request.Form("question")) &vbcrlf
emailBody = emailBody & "Email Address: " & (Request.Form("emailAddress")) &vbcrlf
emailBody = emailBody & "Phone: " & (Request.Form("p1")) & Request.Form("p2") & Request.Form("p3") &vbcrlf &vbcrlf
emailBody = emailBody & vbcrlf
set objMail = server.CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
With iConf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' CdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Application("EmailServer")
.Update
End With
objMail.From = emailFrom
objMail.To = emailTo
objMail.Subject = emailSubject
objMail.TextBody = EmailBody
objMail.send
Set objMail = Nothing
%>

Monday, August 20, 2007

Easiest way to hack a Windows admin password

Say your pc becomes disconnected from your network and there by your domain where your user accounts are controlled or someone dies it may be necessary to hack a windows Administrator password.

While the Offline NT Password & Registry Editor, Bootdisk / CD seemed like easiest method for resetting windows passwords I had trouble with it and had to find an alternate method.

This alternate method consisted of booting up the machine with Linux distro Knoppix, and copying the system32/config directory which contains the SAM file onto a usb flash drive. The SAM file is the Security Accounts Manager Windows uses to store password "hashes" which amounts to essentially encrypted passwords.

I then copied the necessary files to another windows machine on which I had installed SAMinside. SAMinside was instantly able to tell me all the user names for the locked box and offered the ability to do a brute force / dictionary hybrid attack that tried over 4 million passwords a second. Luckily, the password i was trying to crack was a simple 6 letter dictionary word so it only took about an hour.

Thursday, August 9, 2007

Intro to Windows SharePoint Services (WSS) 3.0

Yesterday I installed the .NET framework, WSS 3.0, the SharePoint Application Template Core and a pre-built application template for a Document Library and Review which included threaded discussion. Out of the box, the whole thing ties into our user accounts so all our actions are linked to our usernames as we move through the app. There are many pre-built app templates available on Microsoft's TechNet

Despite being a M$ product, WSS seems like an excellent, full-featured web app framework. Installation was slightly more complex than normal for M$ products, involving uncompressing files and utilizing the ol' command line, but a cinch coming from a Linux background.