Hot off the heels of ROFLcon in NYC the crew kicks some in studio technolust. Darren shares with you his custom twitter tamagotchi bot written in PHP with some sweet RSS parsing, VLC controlling, curl loving nested goodness. Plus guest Jim Louderback, gadget lover and Revision3 stage hand, joins us to talk about all things new media.

Download HD Download MP4 Download XviD Download WMV

Watch

Show Notes

When we were first approached to attend ROFLthing in NYC we were asked if we could put together some sort of interactive media installation for the after party. My first thought was a web controlled paintball gun similar to the USB Missile launcher but, well, the lawyers didn’t think it was a good idea.

So I started thinking about the whole ROFLthing concept, it’s a congregation of Internet celebrities and web 2.0 kids. And what better way to showcase the usefulness of a service like twitter with the uselessness of that clever little electronic pet the tamagotchi.

The project is split up into three parts. First a directory full of videos that we’ll control from the web using VLC, PHP and Curl. I made my tamagotchi videos using photoshop and vegas.

Second we need to be able to control VLC from the command line so fire up VLC and point it at your directory of videos with the –intf=http, –fullscreen and –repeat parameters. Now we can browse to http://127.0.0.1:8080 to hit the local http interface. Check out the /old/ directory to get the old interface. Here we find the parameters to post to the http server using curl. Try changing the item number from the command line with curl 127.0.0.1:8080/old/ -d control=play -d item=5 –G. Adjust accordingly.

Now that we’ve got VLC playing a directory of videos fullscreen and we can control it from the command line its time to duct tape together some PHP. In order to easily query Twitter for input I’m using the MagpieRSS class to parse the feed of a search query from search.twitter.com. A case and switch statement within a while loop does all of the magic, checking the input and making a system call to curl.

It may not be beautiful code but it works and for a few hours of hacking I’m somewhat proud of it. Especially considering how rusty my code is. Now I’m sure it could be replaced with 8 lines of perl so I welcome your constructive criticism on the forums where you’ll find the full source code.

I’m sure now that you’re loaded with these techniques you can find all sorts of uses for parts of this project.

Thanks for downloading. Remember you can find subscription links and our new iTunes HD feed at hak5.org.

Keep the constructive feedbacks coming, we’ve seen a lot of great stuff lately on the forums so thanks for that.

Don’t forget we’ve got brand new sticker packs as thanks for your donations at www.hak5.org/stickers. We really appreciate your support!

February 6-8 we’ll be in DC for Shmoocon

If you’re in the area we’ll be attending the anual podcasters meetup come out meet the crew and lots of other great podcasters from PaulDotCom, Securabit, Sploitcast, Cyber Speak, Security Justice and more.

Get all the details at podcastersmeetup.com

Special shout out to the hacker hound from Hoboken, Brandi, and her pet Jon for all the generosity in NYC this weekend.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

14 Comments

  • Brian 5 years ago

    This is awsome.Do you guys know how to make a javascript box appear to enter alink then make that url a link on a web page to save. if so send me the code at brianmagicr@gmail.com

    thanks

  • LuiLui 5 years ago

    Nice Polo Darren!

  • So which did you guys decide on and why? Premiere or Final Cut Pro? I’m partial to Final Cut Pro but mostly because that is what I first learned on and Premiere didn’t look to be as good.

  • We’re going to go with Premiere Pro CS4 because it’s cross platform, and it’s a lot easier to fix our audio sync issues in it because it’s self contained.

    In Final Cut, we had to send to Soundtrack Pro, then save, then see if it was right, it was a real pain in the ass.

    Beyond the fact that we’ve got the exact export profile we need, it’s a really nice piece of software, and is just a little closer to Vegas so it makes it that much easier.

    Matt

  • So you guys don’t do live to tape anymore?

    Or do you capture the whole show, then edit it?

    Fred

  • @Fred.

    Most of the show is shot live to tape. Some segments, like my more recent ones with the hacking and the cooking, are shot to AVCHD on SDHC and more heavily edited.

    But we always edit to pop the lower thirds, full screen graphics, bug, open title, credits and end slate in.

  • @Brian
    try this

    var link1 = prompt(“Please enter a link:”,”");
    document.write(‘‘+link1+’‘);

  • sry for double post

    that should be put in and in the body section

  • Dmichel 5 years ago

    Hi guys

    For those of us that don’t use iTunes, would it be possible to have a nice HD RSS feed … using torrents if bandwidth is a problem (Miro handles rss/torrent feeds pretty well) ? Please :)

    Denis (from Europe)

  • we’ll go ahead and get the HD RSS feed up as soon as we can.
    Look for it either today or tomorrow.

    Thanks for reminding us Dmichel :)

    Matt

  • @Darren

    Do you find that AVCHD is evil? I have a camcorder that records in that format, and often times I find myself using the SD setting, just to avoid the conversion. :(

  • We used to think that, before we started using an editer that supported AVCHD natively. We just drag the .mts files int our timeline and let it do it’s thing.

    Final Cut, Premiere CS4, and Sony Vegas 8.0c all have native support for AVCHD

    Matt

  • Yozick 5 years ago

    Wow i feel special I am of the 6%. lawl

  • Alexei Tetenov 5 years ago

    Darren, good job on the roflcon bot. I think that this is really creative.
    -Alexei