Archive for category Internet
How to speak HTTP (test web page via telnet)?
Posted by Roger Brown in Internet, Uncategorized on January 21, 2012
Let’s say you’re debugging a problem and you need to test the home page of a site http://WWW.DOMAIN.NAME/
* From a Terminal or Command prompt, do this:
telnet WWW.DOMAIN.NAME 80
* then type:
GET / HTTP/1.0
* then press the Enter(return) key twice!
* it will then spit back the html for that particular url — in this case the “/” just means the home page.
* if you only want to see the HTTP headers and not the whole html of that page, then:
HEAD / HTTP/1.0
* another example? let’s say you want to test a different page whose URL is http://WWW.DOMAIN.NAME/contact.html. Then:
GET /contact.html
here’s an example session:
++++++++++++++++++++
~/ $ telnet downtownweb.com 80 Trying 96.44.179.35... Connected to downtownweb.com (96.44.179.35). Escape character is '^]'. HEAD /contact.html HTTP/1.0 HTTP/1.1 200 OK Server: nginx/1.0.11 Date: Sun, 22 Jan 2012 06:16:28 GMT Content-Type: text/html Connection: close Cache-Control: max-age=3600 Expires: Sun, 22 Jan 2012 07:16:28 GMT Vary: Accept-Encoding,User-Agent
++++++++++++++++++++
P.S. that’s it for now. i’ll try to show advanced stuff later.
P.P.S. If you’re familiar with the cURL utility — using the HEAD method is the same as running:
curl -I http://WWW.DOMAIN.NAME
How to speak IMAP? (for testing/debugging problems)
Posted by Roger Brown in Internet on December 13, 2011
Sometimes you’re not sure where the problem lies with checking email via IMAP in your favorite program such as Thunderbird or Apple Mail or Outlook.
So to see whether it’s a problem with the software you need to speak IMAP directly to your server.
Open a Terminal or Command prompt and run these commands. **Replace the parts with []‘s with your info AND leave out the brackets!**
+++++++++
telnet [IMAP SERVER NAME] 143
a login [EMAIL@DOMAIN] [PASSWORD]
a list “” “*”
a select inbox
a logout
+++++++++
here’s an example:
~~~~~~~~~~~~~~~~~
~/www/ $ telnet mail.sciencefun.net 143
Trying 67.20.121.71…
Connected to sciencefun.net (67.20.121.71).
Escape character is ‘^]’.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a login test@sciencefun.net dr0wss@p!
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA] Logged in
a list “” “*”
* LIST (\HasChildren) “.” “INBOX”
* LIST (\HasNoChildren) “.” “INBOX.Sent”
* LIST (\HasNoChildren) “.” “INBOX.Junk”
* LIST (\HasNoChildren) “.” “INBOX.Drafts”
* LIST (\HasNoChildren) “.” “INBOX.Trash”
a OK List completed.
a select INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Junk NonJunk $label1 $label4 $label2 $NotJunk)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $Junk NonJunk $label1 $label4 $label2 $NotJunk \*)] Flags permitted.
* 289 EXISTS
* 0 RECENT
* OK [UNSEEN 170] First unseen.
* OK [UIDVALIDITY 1278944964] UIDs valid
* OK [UIDNEXT 305] Predicted next UID
* OK [HIGHESTMODSEQ 283] Highest
a OK [READ-WRITE] Select completed.
a logout
* BYE Logging out
a OK Logout completed.
Connection closed by foreign host.
~~~~~~~~~~~~~~~~~
P.S. I must research how to retrieve a list of emails and how to retrieve a single email. Reply if you know how already!
How to speak SMTP?
Posted by Roger Brown in computers, Internet, Uncategorized on December 10, 2011
Sometimes when you’re having trouble sending email and none of your troubleshooting has worked so far, you need to connect to your outgoing email server and speak the language to it that your email program speaks when it sends an email:
To test outgoing SMTP email, you first need to “base64 encode” these two things:
#1 – your full email address
#2 – your email password
SMTP authentication uses base64 encoding.
Here’s one tool to do that at:
http://www.opinionatedgeek.com/dotnet/tools/base64encode/
Go ahead and do that for both the full email address and the email password and save the output.
Then open up a terminal or a command prompt on your computer.
+++Below is what you will type from it.
Anywhere it has words in all CAPS you will replace that with your domain name for example.
And you will press the Enter key after each line
NOTE also — the lines or words below that are inside of brackets []‘s are just instructions; you do not type those. But you type everything else. +++++++++++
telnet mail.DOMAIN.COM 25
ehlo DOMAIN.COM
auth login
[paste in your email address encoded in base64. Below is an example]
ZW1pbHlAY29tbMNuaXR5Y2h1cmZoZ3JvdXAuY29t
[paste in your password encoded in base64. Below is an example]
YmBzZAJhbCd=
mail from: YOURADDRESS@DOMAIN.COM
rcpt to: OTHERADDRESS@DOMAIN2.COM
data
From: YOURADDRESS@DOMAIN.COM
To: OTHERADDRESS@DOMAIN2.COM
Subject: test of SMTP
this is a test message
. [type a single dot and then press enter]
quit
+++ end of telnet commands +++
P.S. some outgoing servers will have you use a different port number such as 587 or 26. Above we used port 25.
How to stop links from opening a new window?
Posted by Roger Brown in good ideas, Internet on November 10, 2011
- in Firefox, type in the URL of about:config
- If it gives you a little warning click yes or “I’ll be careful” or whatever it says.
- Search for “browser.link.open”
- You’ll see 2 lines that start with that.
- Double click “browser.link.open_newwindow” and change it’s number to 3 if it is not already. Then click Ok.
- Double click “browser.link.open_newwindow.restriction” and change it’s number to 0 if it is not already. Then click Ok.
That’s it. 60 second fix!
No more annoying windows popping up cluttering your taskbar/list of windows. Only tabs to see all at once — much more efficient! ![]()
Are any of your friends/acquaintances relatives?
Posted by Roger Brown in Internet, LDS, science on August 27, 2011
Check it out via https://apps.facebook.com/relativefinder/
Don’t know what I’m talkin’ bout?!!! See http://news.byu.edu/archive11-aug-relativefinder.aspx
Hurricane charts / maps?
Posted by Roger Brown in environment, Internet, Uncategorized on August 27, 2011
For my peeps along the east coast, get the latest from the NOAA(National Oceanic and Atmospheric Administration)’s NHC(National Hurricane Center):
How to rename a MySQL database?
Posted by Roger Brown in Internet on June 16, 2011
You used to be able to run the RENAME command from a mysql command-line prompt. There is an ALTER command through which you can rename a database but it’s kind of complex.
Now, the only easy way I know to do it is via phpMyAdmin:
- Select the database.
- Click the “Operations” tab up top.
- On that page, down below you’ll see “Rename database to:”
- Type in the new name and click Go.
That will do it!
P.S. You’ll see on that same Operations page that you can clone your database — you can make a copy of it with a different name. That’s the “Copy database to:” section.
Use WordPress? Vote to show only compatible plugins on Install page!!!
Posted by Roger Brown in Internet on June 10, 2011
Hey, everybody that uses WordPress!
Are you ever searching for a Plugin to extend the functionality of your website, and you don’t like having to wade through lots of old plugins that aren’t compatible with your version of WordPress? (the latest is 3.1.3) There are over 10,000 free plugins for WordPress.
Wouldn’t it be nice on the list of search results to check a checkbox to have it only show plugins that are compatible with the version of WordPress that you’re running?
Please vote for this new feature to be added by going here:
It would be a serious time saver! 5 stars please?! ![]()
Thanks,
Roger
How to reset your password for Joomla, WordPress, phpBB, etc.
Posted by Roger Brown in Internet on May 19, 2011
If you’re an admin of a website and you forgot your password and the “forgot your password” email isn’t getting to you — let me show you how to change it manually.
Joomla, WordPress, and phpBB all use what is called MD5 encryption to store the password in the MySQL database for the website. To update it, run something like this from your mysql command prompt or from the SQL box in your phpMyAdmin:
For WordPress, if my username is “admin” and I want my new password to be “hello1980*” then I run this:
update wp_users set user_pass=MD5('hello1980*') where user_login="admin";
or for example with phpBB, if my username is “Roger” and i want my new password to be “new#12345″ then I run:
update phpbb_users set user_password=MD5('new#12345') where username="Roger";
I hope that helps!
geeks|programmers — How to convert from/to epoch dates
Posted by Roger Brown in computers, Internet, Mac on April 26, 2011
If you use a Unix system(BSD,Linux,etc.), sometimes you’ll have log files that don’t create the timestamp in regular format such as Apr. 25, 2011 1:10pm but instead it saves the date as the number of seconds since midnight of January 1, 1970 (the date chosen after the fact for the beginning of the Unix epoch).
How to convert from epoch seconds to regular date?
If you’re on any of the BSD systems (such as Mac OS X or FreeBSD), run “date -r SECONDS” from a Terminal:
$ date -r 1302972510
Sat Apr 16 10:48:30 MDT 2011
If you’re using Linux, run “date -d @SECONDS” from a terminal — here’s an example:
$ date -d @1302972510
Sat Apr 16 10:48:30 MDT 2011
Convert from regular date to seconds?
On Linux, here’s an example:
$ date -d “Apr 25, 2011 12:12:12″ +%s
1303755132
For the BSD’s/OS X, here’s an example:
$ date -j -f ‘%Y-%m-%d %H:%M:%S’ ’2011-04-25 12:12:12′ +%s
1303755132
(I’ve had to look this up enough times over the years that I thought i’d finally publish it!
)