I’ve been a code junkie recently.

So, recently I have been doing a lot of coding, both bash and php/html. The other day I was at work and a co-worker of mine who handles abuse complaints mentioned he had to process over 100 domains for something he was working on. I instantly thought about writing code to accomplish it, I asked what he needed off of the domains, to which he responded IP and who owns it.

At first I started with a pretty simple script, with two domains hard coded into the script for testing purposes, which worked decently. 

Here is the original script.

<?php
$x=array(“domain.tld”,”domain.tld”);
foreach($x as $host){
$ip = gethostbyname($host);

echo “$host – $ip”;
echo “<br />”;

}

?>

While this works, it was missing a few things, it would be really difficult to enter all 100 domains, each needing to be separated by a comma and wrapped in quotes, just a little too much work for me. Plus it doesn’t have the whois information. So, onward I go.

 

My second incarnation of the script allows for user entry of the domains, the only thing that’s needed is a comma separated list.

Here is the second script.

<html>
<form name=”list” action”” method=”post”>
<input type=”text” name=”list”>
<input type=”submit” name=”submit” value=”Submit”>
</form>
</html>
<?php
if(isset($_POST[‘submit’])){
$list = $_POST[‘list’];

$listreturn = explode(‘,’, $list);
foreach($listreturn as $host){
$ip = gethostbyname($host);

$whois = shell_exec(‘whois -h whois.arin.net ‘ . $ip);
$result = preg_match(‘/^OrgName:s*(.+)$/m’, $whois, $matches);
$org = $matches[1];
echo “$host – $ip – <b>$org</b>”;
echo “<br />”;
}
}

?>

This script offers the ability to have a list of comma separated domains and it does all the work for you. It takes the domains, gets the IP address of the domain and then does a whois on that IP address to determine who owns the IP and then presents a nice list of information.

Within an hour I had the second version up and running and about 5 minutes later the list of domains that my co-worker had compiled, was processed and done.

 

“Off The Grid” Cloud File Hosting

I have used Google Drive and Dropbox for quite sometime without any encryption, and thought nothing of it. That is until this whole N.S.A. thing cropped up.

I had previously installed and played with OwnCloud and found it be quite nice. It doesn’t have all of the options that Dropbox or Google Drive have, but for off the grid cloud hosting, it’s pretty damn nice!

One thing I wanted to have with my OwnCloud was encryption to all my files. I found that OwnCloud has an app for that! So I’ve enabled it and got it all working.

That got me thinking, even though there are a lot of services out there offering encrypted cloud file hosting, I still don’t entirely trust them.. So, what I’ve decided to do is offer 5GB of free Cloud file hosting. I have limited it to just 15 people though. Mainly because, unlike the big guys, I don’t have endless amounts of Data Storage. Just email dwalker at merval dot org asking for a cloud hosting account.

Corey Moulton

So, it’s that season again, it’s beginning to heat up outside and it’s nearing the 4th of July. Naturally, people are going to shoot off fireworks, whether it’s for the amusement of their children or themselves.

I can relate to the frustrations of fireworks going off until the wee hours of the next day, and having a sleepless night because of it, but what Corey A. Moulton did, is absolutely uncalled for.

Corey A. Moulton is our second inductee into the Dumbass Files, this 25 year old moron decided that pulling out a gun and screaming “You want to blow (expletive) up?, I’ll blow you up.” and then proceeding to open fire towards a group of people who had been lighting off fireworks.

His excuse for shooting towards them? He told the court that he shot his weapon “as a show of force”.

You have got to be kidding me, it is absolutely absurd to fire a weapon upon people simply for lighting off fireworks. The correct action would have been to walk over to the adult(s) in the group and explaining they have several nights to light off fireworks and you would greatly appreciate them quieting down.

Here’s to hoping this dumbass spends some quality time in jail for A. discharging his weapon within city limits, B. firing upon an unarmed group of people and C. Threatening the lives of those in the group.

http://www.columbian.com/news/2013/jul/01/minnehaha-man-allegedly-goes-berserk-over-firework/

Open Source, Why it’s good for business.

There has been a lot of buzz recently about Windows XP’s End of Life next year, and a lot of people think of Hackers when they think of, or hear about Linux. What a lot of people fail to understand is, not all hackers are bad, the primary definition of a hacker is, “An enthusiastic and skillful computer programmer or user.”

Most hackers are people who take something and use it in a manner it wasn’t intended, or build their own version of something. This is where open source comes in, the theory behind open source is free information for all. Which is essentially what the “bad” hackers are doing, taking information and making it free to the public. But the difference is, one is perfectly legal and the other is not. Can you guess which is which?

So, What is Open Source? It’s free software/hardware that you are free to use and modify however you wish, and you can redistribute it after you’ve made your changes. Almost all versions of Linux are Open Source, there are a few out there that are Enterprise and really all you’re paying for there is the support and the name, it’s kinda like buying a pair of Nike’s, they are like every other pair of shoes, except there is a brand name attached to them.

Without giving you a crazy long history of Linux, Prior to October 5th 1991, Linux didn’t exist, Linus Torvalds wrote the original Linux kernel and still to this day, any additions must have his final say. Prior to that there was Unix which is a closed source operating system that only a few companies have the ability to modify, which is why Linus created the Linux Kernel, to provide a free open source system that anybody can modify. Since it’s inception in 1991 Linux has grown like a wildfire. More than 90% of today’s 500 fastest supercomputers run some variant of Linux, including the 10 fastest.

Why is Linux and Open Source such a good thing? Imagine that you create something, that to you is awesome and works great, but then someone else see’s where it can be improved and made even better. Now imagine that happening with thousands of volunteers all at once, across several different versions of what you created. That is what Open Source is, and it’s so great because it provides not only multiple options for people, but what you created is constantly getting better. All at no cost to you.

Which is why Open Source is so great for business, when you buy a computer with Windows or Mac on it, you get updates and security patches but when the next version comes out, you have to fork over whatever amount of money their asking for that version. Unless of course you use Linux, then it’s absolutely Free.

So every time a new upgrade comes out for your version of Linux, you can upgrade and not pay a dime for the operating system. Thanks for thousands of volunteers who tirelessly fix issues and add new features.

Did You Know!?
Linux is a leading operating system on servers and other big iron systems such as mainframe computers and supercomputers?

So, the next time you have a computer that is a little old and doesn’t run Windows or Mac as well anymore, instead of tossing it out, either donate it, or put Linux on it and give some new life to that old machine!

Punk Vs Jericho – How it should have been.

You might be able to sense the sarcasm in this statement but, I just love how creative the WWE is being. Let’s take a match from Wrestlemania XXVIII (28) and do it all over again at “Payback” this Sunday. CM Punk has been MIA since he walked off Monday Night Raw, 8 days after losing to the Undertaker at Wrestlemania 29. The way they are bringing him back is absolutely stupid, he hasn’t been on TV at all during the build up to the match, not even “via satellite”, not to mention they are putting him a match he’s already done, not making it any different than before.

CM Punk has stated on many occasions that he is a very goal oriented guy, once he does something he moves on to the next thing. He has also said that he gets bored quickly once he’s accomplished what he set out to do, so what does the WWE do to bring him back from his leave of absence? Put him into a story line that he’s already done. One of Chris Jericho’s catch phrases is “I am the best in the world at what I do”, while CM Punk says, “I am the Best in the world”. At Wrestlemania 28 they had a “Best in the world” Vs “Best in the world” match, to determine who the best really was. CM Punk ultimately won the match to become “The Best In The World”

There was a lot of build up to the match between Punk and Jericho, which made the match interesting and must see, but this time around, Punk isn’t on Raw at all, he’s usually sitting in a ball park during Raw, and Paul Heyman fills in for him. Which takes away all the magic that goes into building a match like this.

What WWE should have done is, during the Fandango Vs Chris Jericho matches (Which Jericho lost most of) have CM Punk start poking fun at Jericho for not being the best at what he does, and then have Jericho try to attack Punk, only to get beaten down. Then the next week on Raw, have Jericho attack Punk and cut a promo on him about how he’s the best ever. Then later in the same episode of Raw have Punk come out, showing the “battle wounds” and cut a promo on Jericho, about how Punk was the champion for 434 days, the longest in the modern era and having already beat him at mania, then have Jericho come out and challenge Punk to a match at Payback, ending with something like, “You will never, *long stretched out* ever, be the same again”, but have Punk decline the match since he already beat him and have Punk say something about how Jericho is beneath him.

The following week on Raw, have Jericho come out and run down Punk, calling him a coward and go on about how “the best in the world” is scared of losing again. Then start a mini storyline about how his loss to Undertaker is eating Punk alive and is driving him crazy. Jericho would then go through the evening torturing Punk, by placing “signs” of the Undertaker around every corner, finally ending the episode with Punk breaking down mentally.

At the start of the following weeks Raw, have Punk and Paul Heyman come out and have Paul run down Jericho for “breaking” his client, during this rant, have Undertakers music hit, fog and all, but then have all the lights go black, moments later when the lights come back on, have Jericho standing in the ring taunting Punk, they start brawling and moments later the lights go out again and when they come back on Punk is still brawling but Jericho is gone and Heyman is on the mat after Punk at mistakenly attacked him. Punk then grabs a mic and demands a match with Jericho at Payback saying, “You may have thought it was funny to taunt me last week, but Jericho, Payback is a bitch! You want a match with me? You got it!”

And that’s how it’s done. THAT would have been a match I would be absolutely crazy to miss. But I digress, there is no doubt the match between Jericho and Punk will be an awesome match, they are both extremely talented guys and know their way around the ring.

I just wish that WWE would have done a better job building up this match.

Hackers Diet – WordPress Plugin

Quite some time ago, a guy named Keith ‘afex’ Thornhill created the WordPress plugin for The Hackers Diet (http://wordpress.org/plugins/the-hackers-diet/) and it appears as though he has abandoned the plugin, I love the plugin and how it works, but you can’t install it on newer versions of WordPress, you have to download the last known version it worked with and then upgrade through the different versions until you’re current. Even then it’s a little shaky. So, in my free time, I will be attempting to make the plugin work with newer versions of WordPress and hopefully get it updated. 🙂

Revolution – Season 2

Revolution airs on NBC, Season 1 just wrapped up, and NBC has ordered a 22 episode Season 2, which will air on Wednesdays at 8PM.

 

 

 

The series takes place in a post-apocalypticdystopian future. All electricity on Earth has been disabled within a single night, ranging from computers and electronics to car and jet engines. Trains and cars stopped where they were, ships went dead in the water and fly-by-wire aircraft fell from the sky and crashed.

People were forced to adapt to a world without electricity over the next fifteen years. Due to the collapse of government and public order, many areas are now ruled by warlords and militias.

The show focuses on the Monroe Republic and it’s power hungry leader Sebastian “Bass” Monroe as well as Miles, Charlie and Rachel Matheson along with Aaron Pittman and several members of Monroe Milita. Randall Flynn, a former DoD officer, is in charge of a place called “The Tower” which has the capability to turn the power back on, and is the only facility left in the world that still has power. Many members of United States Military are guarding The Tower and attempted to block all access to Level 12, which is where the system to turn the power back on is.

In the Season Finale, Charle, Miles, Rachel and Aaron find out that Aaron’s code that he wrote during his time at MIT was sold by the school to the DoD and they are using it to operate The Tower, because of this, Aaron is the only one that knows the backdoor entry into his operating system and they succeed in turning the power back on, although Randall Flynn drops a bomb shell (literally) when he gets into a locked rook and launches ICBM’s on Atlanta and Philly, the two strongest colonies with military. Randall tells them that “a house divided will never stand” and that he’s “a patriot” and then kills himself. During all of this Monroe Militia is attempting to blow up the door between them and Charlie, Miles, Rachel and Aaron, to prevent them from turning on the power.

In Guantanamo Bay, Cuba, the President of The United States was in hiding, as the power comes on an assistant to the President walks in and says, “Sir, Randall Flynn has done it. It’s time to go home Mr. President”

This leads us to Season 2.

With two of the strongest colonies presumably destroyed, the Monroe republic is still intact but under the power of Major Tom Neville, who is also power hungry like Monroe was, and will likely grow in numbers and fight against the now returning U.S.A.

Something that would be interesting to see in Season 2, is how well the return of the U.S.A. goes, people have been without clear leadership for fifteen years, and when the President returns to power, who is going to protect him? there are millions of people and only a single leader, and a lot of people with weapons and bombs. The entire world was without power, it will be interesting to see how the world comes back together from scratch. New leaders will be born and the world will be a completely different place.

Season 2 will start presumably in September with all the other shows, unless NBC changes it mind. When Season 1 was ordered they originally ordered 22 episodes but chopped it down to 20. The show started out strong with 11 million people watching the Pilot episode, it’s averaged around 7-8 Million viewers since, dropping down to 5 and 6 Million on a few episodes. The show itself does have good potential, which is why I think NBC placed it on Wednesday at 8PM, airing it a little earlier might entice some new viewers.

Let’s hope NBC doesn’t screw this up. 🙂

Thanks for reading!

Dan

PBX Stuff

So, awhile back I used an old computer (AMD Duron 900mhz) as a PBX, I used PBX in a Flash to get it all setup, bought a Cisco IP Phone off ebay and was ready to roll. Setup Google Voice within the PBX to allow for inbound and outbound calls, but they’ve since removed the ability to make free calls. I stand corrected, Google has made calls within the U.S. and Canada Free through 2013. 🙂

I used it for awhile and it worked great. I even setup a number for the Occupy Vancouver group to use as a phone tree. But when Google announced they were taking away the free calls, I took the pbx down and it sat unused for a long time. That is until yesterday, I had to find a way to stay up late as my work shift is changing, so i started playing around with the PBX again, I hooked it up and found a lot of issues with it, so I tore it apart and installed the PBX on a slightly newer but still old computer (Intel Duo 2ghz) which has been sitting unused since I upgraded my computer.

The PBX side of things is very interesting to me, I think it’s awesome to have my own phone system that I can control. Through SIP Solutions, you can buy a SIP Trunk for $24 a month with unlimited inbound and outbound calls, then you can buy a DID (the actual phone number) for $1 dollar a month, so basically for $25 dollars a month, you’ve got a full featured phone system. Custom everything if you know how to rig it up. The only downfall is that you need a decent internet connection. There are ways to rigging up an actual phone line into the PBX so you can use a legit phone line from the phone company, but I haven’t played with that side of it yet.

When my wife and I get a house, the first thing I’m doing is wiring the house for Ethernet and setting up a PBX, with 1 phone line from the phone company and a second line from SIP Solutions, that would equal two trunks, meaning two calls at the same time from any phone.

One draw back is you have to buy IP Phones that uses the SIP protocol, which can be a little spendy, but can you imagine the possibilities of what you could do? Tired of a phone number calling you? Blocked. You could even have hold music if you wanted to!

When someone calls and leaves a voice message, you can get an email with the voice message attached, so if you’re not home, you still get the message 😀

The best part is, once you have several IP Phones rigged up (if they have this feature) you can use them as intercoms, to communicate without having to scream across the house.

One really big requirement for all of this though, you need to know how to maintain a PBX and how to handle certain issues.

But aside from that, you’d be in complete control of your own phone system. Just like they do in an office.

http://en.wikipedia.org/wiki/Asterisk_(PBX)

Thanks for reading.

Dan

The state of our education system.

As one of the people that “fell through the cracks” in the education system, I can relate to how Jeff Bliss feels about the education he is getting from teachers.

[youtube https://www.youtube.com/watch?v=98_cmS-M9dQ?rel=0]

Our Education system is severely broken and needs to be fixed! No longer are students educated to provide them with a means to grow a career, students in public education, are taught everything they need to pass a test. A test upon which an overall grade is given to schools and districts. Better scores mean bigger budget for those schools and districts.

When I was in High School, the Washington Assessment of Student Learning (WASL) was the test we were trained to pass, and in 2004, a year after I graduated High School the Vancouver School District required passing the test Sophomore year in order to Graduate. From my understanding, that was cut pretty quick after low Graduation numbers.

During the course of my schooling (1990-2003) I can remember taking 3 or 4 WASL tests. I remember taking a test in 4th, 7th and 10th Grades.

I was diagnosed with Attention Deficit Disorder (A.D.D.) my Sophomore year in high school, and was taking a medication through my Senior year. I always had trouble learning in school because I would get bored easily, and when I was in 1st Grade it became clear to me I had issues learning. I can remember being given a math work sheet and just crying because none of it made sense and I couldn’t work out the problems. The teacher never made it back to me (Last name starts with W, we were seated alphabetically) and I was never given a chance to understand the work. This trend continued for as long as I can remember.

I had a few teachers during this time that realized I had fallen through the cracks and did their very best to help me, one teacher at Discovery Middle School when I was in 6th Grade, Mr. Joseph Balin (who now works at Hudson’s Bay) even took his own personal time to come to my house and help me with my homework! THAT is dedication to a student. He obviously couldn’t do this very often but I remember on a couple of occasions, he would help me with my work. The other teacher that really helped me, was Mr. Burpee who now works at Battle Ground High School as a math teacher. I had him for Math my Junior year (unsure if I had sophomore year too) and he really took the time to make sure I understand what was being taught and I actually started “getting” it and being able to pull a B in Pre-Algebra. Sadly because of my hectic Senior year, I was unable to continue taking math my Senior year, He really wanted me in his Algebra class my Senior year, even saying so directly to me.

I’ve certainly had a few teachers who could really care less about the students and are there to simply collect a paycheck and fill a seat. I have really mixed feelings about Mike Goodpastor who taught my U.S. History class Junior year. I have to admit I did learn a lot from his class, but there were many things I learned after High School that I was shocked weren’t taught in his class. For instance, he was (and probably still is) super against unions (even though he’s part of one…). After my graduation, I learned about Bloody Thursday which was between Longshoremen and San Francisco Police. There was one day, our whole class was listening to “In a Gadda Da Vida” by Iron Butterfly.. Good song, but NOT something that fills an entire class period.

Education shouldn’t be something that is taught strictly to garner a better budget or at the discretion of the teacher. Anymore, High School is more like an advanced day care! It wasn’t made aware to me during my time in High School that places like the Clark County Skills Center existed, or that my credits even mattered. From 1st Grade through 8th Grade, I was under the impression if you just showed up to school and played along with what the teacher was teaching, you’d just move on to the next year of schooling.

So when I got to High School, I was under the impression that none of it mattered. That is until I got to my Sophomore year and my counselor pulled me aside and explained that if I didn’t start passing classes I wouldn’t graduate. Realizing I was in deep shit, I didn’t take any time off from school, buckled down and made up 2 years while keeping grades up for the last two years of High School. Doing 4 years of work in only 2, including two summers of summer school, night school and taking an online class. I found out I was Graduating just days prior to Graduation, when all the seniors were doing our practice walks into the gym and rehearsing everything. I maintained a B or better Junior and Senior year.

Our whole education system needs to be revamped, there needs to be more interactive education, more hands on, more information openly available to students. Being a low income student, I was always given the impression I couldn’t take part in things because I was one of “those” students. Looking back, there were so many things I would have loved to take part in.

Sorry for the long drawn out post.

Thanks for reading!

Dan