Another snippet that converts a binary string into decimal.
These are mostly done for practice purposes.
<?php
$input = "100 0000 0100 0000 0100"; // d263172
$input = str_replace(' ', '', $input); // convert spaces to blank. (e.g.: 1000000010000000100)
echo "Converting {$input} into decimal...\n\n";
$exp = 1;
$total = 0;
for($i = (strlen($input) - 1); $i > -1; $i--) { // start from the back of the string, and work our way to the left.
if($input[$i] == "1") $total += $exp; // if current position is 1, increase our total by the current power value
$exp *= 2; // increase to next power of 2.
}
echo number_format($total); // output in a formatted string (e.g.: 263,172)
?>
Quick Snippet of code to generate “free whopper” coupon codes for Burger King.
<?php
$months = array("BB","LS","JH","PL","BK",
"WH","FF","BF","CF","CK","CB","VM");
$code = $months[(int)date('m')-1];
for($i=0; $i < 5; $i++) $code .= rand(0, 9);
echo $code."\n";
?>
My DeVry campus recently integrated a new system for the wireless networks.
It’s a very controversial application; it scans everything on your computer to verify that you aren’t using any torrent/p2p software, as well as ensuring that you have a virus scanner that has been approved.
If you fail to meet any of the requirements, or the system simply finds something it doesn’t like: you are not getting online.
That is, until a workaround was found.
Read More…
So, I’m studying to earn my CCNA and I had to learn subnetting again.
I felt like I should share this with you guys, seeing how I learnt some neat tricks that I’ve never seen before (allowing me to solve subnet based problems very quickly.)
So let’s jump right to it!
Read More…
Quick little post…
Many of you may remember the “hidden whitepages screen” from a while back.
Today I was fooling around and decided to grab the latest copy of the Whitepages app ($7, why not?) and I noticed the “415″ trick no longer worked.
Took a quick look around, and discovered their new method of accessing the hidden screen.
Two taps on the “Whitepages” logo, and two taps on the “developer” logo and it’ll pan you right over to the hidden screen.
Enjoy!
Oh, and happy fourth of July everyone :)
I am a soon-to-be student at DeVry University.
I chose the school (mostly) because of its guaranteed job placement. My friend, who also graduated recently from DeVry, is currently a network administrator at a Hard Rock Hotel & Casino in South Florida thanks to DeVry.
But that’s besides the point.
DeVry, like few other colleges, has chosen to use an online system called “MyScribe” (owned by the site CafeScribe.com ["Fourteen40, Inc."])
The charges for the EBook are automatic, and the online classes even tell you that the books are available online “for portability.”
The problem? It’s all DRMed.
You can’t view the books anywhere other than a windows-based environment with MyScribe installed (or using it’s portable client).
But this can easily be bypassed.
Read More…
In today’s lesson I’m going to go over hacking a “binary bomb.”
I found this bomb on the ubuntu forums, although a copy can be downloaded off my server (for archiving purposes, etc)
So let’s get to it!
Read More…
I noticed a post today on lifehacker/gizmodo about how to “completely erase your hard drives, ssds, and thumb drives.” (link here)
The sad part was that they took a very simple process and complicated it- 10 fold.
The following procedure will insure that your data will be wiped from existence, and uses nothing more than the power of open source tools. (both for wiping, and checking)
Read More…
Hello, again, everyone! I’m going to give blogging one last shot.
This time I think it’s going to work a little different around here. If anyone has any good graphical skills (which as a right brained person, I lack completely) and would like to throw together a little something-something for me, please try and get in touch me.
Read More…