Maximum CPU Forums
Welcome,
Guest
. Please
login
or
register
.
May 21, 2012, 06:46:16 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Maximum CPU Forums
General
Off Topic
Bash Style Google
Pages: [
1
]
« previous
next »
Author
Topic: Bash Style Google (Read 2842 times)
acemaverick1381
Extreme Overclocker
Offline
Posts: 352
Bash Style Google
«
on:
March 17, 2005, 09:03:28 AM »
This is what happens when a coder is sick for three days, and is tired of coding everything else. He reads a thread on a forum, and notices that there was a Mac OSX style Google. That gives him the idea, why not a Bash style Google? With nothing better to do at 7 AM in the morning, and his eyes red of sickness, he pulls open VIM, Firefox, and SSH's into his server. And look what happened...
http://www.elvenrealms.net/ace/weeklyscrip.../googlebash.php
(Looks best in Mozilla/Firefox/Netscape)
And of course, the source:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=us-ascii">
<TITLE>
Ace's Bash Google Search
</TITLE>
</HEAD>
<BODY BGCOLOR="black">
<?php
$getSearch = $_POST['search'];
if ($getSearch != "")
{
$searchLen = strlen($getSearch);
$getSearch = str_replace("-l ", "", $getSearch);
if ($searchLen == strlen($getSearch))
{
$searchString = "http://www.google.com/search?hl=en&lr=&q=$getSearch&btnG=Search";
}
if ($searchLen != strlen($getSearch))
{
$searchString = "http://www.google.com/search?hl=en&q=$getSearch&btnI=I%27m+Feeling+Lucky";
}
echo "<script LANGUAGE=\"JavaScript\" TYPE=\"text/javascript\">\n";
echo " document.location = \"$searchString\";\n";
echo "</SCRIPT>\n";
exit;
}
?>
<IMG SRC="tux.png" ALT="tux">
<BR>
<DIV ID="mount">
<FONT COLOR="silver">
<TT><B>
Mounting Browser
</B></TT>
</FONT>
</DIV>
<DIV ID="browser" STYLE="visibility: hidden;">
<FONT COLOR="silver">
<TT><B>
<script LANGUAGE="JavaScript" TYPE="text/javascript">
document.write(navigator.userAgent);
</SCRIPT>
</B></TT>
</FONT>
</DIV>
<DIV ID="dhcp" STYLE="visibility: hidden;">
<FONT COLOR="silver">
<TT><B>
<?php
echo "Broadcasting DHCP Discover " . $_SERVER['REMOTE_ADDR'];
?>
</B></TT>
</FONT>
</DIV>
<DIV ID="loadbash" STYLE="visibility: hidden;">
<FONT COLOR="silver">
<TT><B>
Loading Google Bash
</B></TT>
</FONT>
</DIV>
<DIV ID="blackloadbox" STYLE="height: 10px; width: 150px; background-color: black; border: thin solid Silver; visibility: hidden;">
<DIV ID="greenloadbox" STYLE="height: 10px; width: 0px; background-color: lime;">
</DIV>
</DIV>
<P>
<DIV ID="inputbash" STYLE="visibility: hidden;">
<FORM NAME="searchgoogle" METHOD="post" ACTION="">
<FONT COLOR="silver">
<TT><B>
"-l search query" For I'm Feeling Lucky
<BR>
bash-2.05$
<INPUT TYPE="text" NAME="search" STYLE="color: Silver; font-family: Courier; height: 20px; background-color: black; border: none;">
<INPUT TYPE="submit" VALUE="Search" STYLE="visibility: hidden;">
</B></TT>
</FONT>
</FORM>
</DIV>
<script LANGUAGE="JavaScript" TYPE="text/javascript">
var loadWidth = 0;
var timerFlag = 0;
function ShowBrowser()
{
timeout = setTimeout("ShowBrowser()", 100);
timerFlag++;
if (timerFlag == 10)
{
timerFlag = 0;
clearTimeout(timeout);
document.getElementById('browser').style.visibility = "visible";
ShowDHCP();
}
}
function ShowDHCP()
{
timeout = setTimeout("ShowDHCP()", 100);
timerFlag++;
if (timerFlag == 15)
{
clearTimeout(timeout);
document.getElementById('dhcp').style.visibility = "visible";
document.getElementById('loadbash').style.visibility = "visible";
document.getElementById('blackloadbox').style.visibility = "visible";
LoadBash();
}
}
function LoadBash()
{
timeout = setTimeout("LoadBash()", 50);
loadWidth += 5;
document.getElementById('greenloadbox').style.width = loadWidth;
if (loadWidth == 150)
{
document.getElementById('inputbash').style.visibility = "visible";
document.searchgoogle.search.focus();
clearTimeout(timeout);
}
}
ShowBrowser();
</SCRIPT>
</BODY>
</HTML>
Logged
My Programming Website
neb1211
Administrator
Overclocker Elite
Offline
Posts: 796
Bash Style Google
«
Reply #1 on:
March 17, 2005, 06:27:47 PM »
that is pretty cool but one question. Shouldn't you be sleeping if you are sick ?
Logged
~ Nick
Flying majestically over the digital wasteland, blades chopping at the air at 3.4GHz, the mighty ROFLCOPTER soars.
The ROFLCOPTER is an important part of the defense of LOLrville. Along with the LMAOplane, TTYLnukes, and our troops carrying AFK47s, the ROFLCOPTER is used as a mobile troop carrier, and anti-TTYLTank weapons platform.
acemaverick1381
Extreme Overclocker
Offline
Posts: 352
Bash Style Google
«
Reply #2 on:
March 17, 2005, 07:16:13 PM »
Well, I tried to sleep last night, and I only got 3 hours so I figure if my body wants to sleep, I'm not going to tell it to. I'm just going to have to pass out and fall out of my chair.
Logged
My Programming Website
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Site News & Announcements
=> Off Topic
=> Tech News
=> Maximum CPU Teams
===> Folding @ Home
===> TKC
-----------------------------
Hardware
-----------------------------
=> General Hardware
=> CPU
=> Motherboards
=> Storage
=> Video & Sound
=> Modding
=> Networking & Internet
-----------------------------
Software
-----------------------------
=> General Software
=> Operating Systems
-----------------------------
Gaming
-----------------------------
=> Computer Gaming
=> Console Gaming
=> Lan Partys and events
===> Game Reviews
===> Game Reviews
Loading...