iPod Security
Thursday, July 19, 2007 - 4:01 PMEver had your iPod stolen or "Pod Jacked"? Well my 30G black iPod was stolen out of an MGM Grand hotel room a few weeks ago. I didn't notice it missing from my bag until I had gotten home. To late to do anything about it! I went searching for iPod security products, but found nothing.
Enter Hide A Pod! This was passed along to me today. It is the ultimate product to secure your iPod or new iPhone. I am still trying to get mine ordered, but there appears to be issues with the Microsoft servers. I will keep trying. I wish I would have found this a month ago, I would have saved a few hundred bucks!
Technorati Tags: microsoft, iphone, security, ipod, theft, zune
Ping Technorati from your Django App
Saturday, July 14, 2007 - 9:39 AMThere are other articles written about this, but I felt the need to write a better one. Ahem.
Meat and potatoes time.
In your settings.py file, set 2 new variables:
# 'PING' blog indexing sites.
PING_BLOG_INDEX = True# List of blog index ping URL's
BLOG_INDEX = ['http://rpc.technorati.com/rpc/ping',
'http://blogsearch.google.com/ping/RPC2',
'http://rpc.weblogs.com/RPC2']
PING_BLOG_INDEX is self explanatory. BLOG_INDEX is a list of blog XMLRPC url's that this application is going to use to notify the remote website (blog indexer) that your blog has been updated.
Let's create a new file in your blog application directory and name it ping.py. This file will hold the code that actually pings the blog indexers. Here it is:
from django.conf import settingsdef pingSites(entry, blog_name):
for site in settings.BLOG_INDEX:
try:
rpc = xmlrpclib.Server(site)
try:
p = rpc.weblogUpdates.extendedPing(blog_name,
settings.SITE_URL,
entry.get_absolute_url(),
settings.SITE_URL + '/feeds/rss2'
)
except:
# May not support extendedPing()
# Try normal ping
p = rpc.weblogUpdates.ping(blog_name,
settings.SITE_URL)if p.has_key('flerror') and p['flerror'] == True:
errlog(p['message'])
except:
errlog('pingSites: %s, exception!' % (site))
A few notes on the above code:
- errlog() is a function I have that just logs errors via syslog for my review. If you don't want to track the errors then a simple "pass" will do. I am just anal about errors and like to follow them. Heh, I said anal.
- This code assumes 2 things. One is that you have a "SITE_URL" option in your settings.py file. It should just be something like "SITE_URL = 'http://www.petersanchez.com'". And two is that your "Entry" model (the model that stores your blog posts) has a "get_absolute_url()" method. If it currently doesn't, I have to ask: What's wrong with you? Add one!
- You probably need to change the '/feeds/rss2' line to match the URL for your own RSS feed. Don't have an RSS feed on your blog yet? Write one, its super simple. Doc's are here.
Now lets edit your blogs models.py file be sure to import the pingSites() function that we just created in ping.py.
from your_project.blog.ping import pingSites
In your "Entry" model (mine is named "Entry", your mileage may vary) create a custom save() function.
def save(self):
# Save first, ping second (if configured)
super(Entry, self).save()
if settings.PING_BLOG_INDEX:
blog = Blog.objects.all()[0]
pingSites(self, blog.name)
Notes on above code:
- The 'blog' variable used in my example is because the software I wrote supports multiple blogs from a single installation. If you don't have a similar setup, just remove the "blog = Blog...." line and replace "blog.name" with the name of your blog. For example: pingSites(self, 'Joe Blow Blog')
That's it. You should be good to go. Next time you update your blog the blogosphere will immediately know about it via the blog indexers.
Technorati Tags: blog, development, django, geek, python
Facebook Privacy and Policies
Friday, June 22, 2007 - 9:29 AMLike a whole lot of other people, I have a Facebook account. I don't use it very often, but it is a nice site and I prefer it over MySpace any day of the week. I ran across this video that was posted on GNUCitizen blog this morning. It claims that Facebook has ties to the CIA, DoD and the IAO. It asks the question:
Does what happens in the Facebook stay in the Facebook?
GNUCitizen posting is here
Technorati Tags: business, facebook, privacy, cia
MacBook Woes
Wednesday, June 20, 2007 - 7:46 PMAfter years of defending Apple products, my 6 month old MacBook has decided to take a dump on me. Take that last part any way you please... Anything for humor. Anyways, the battery would no longer charge. The status light on the magna plug no longer gave any indication either. No more amber or green colors for me to let me know what the hell was going on! I tried resetting the "PMU" as well as some other tricks, but nothing worked.
In the end, the Genius at the Genius Bar took a shot and got no further than I did. Locked up the MacBook on a 3-5 day sentence. Hopefully when I get it back I can continue to boast about the quality of Apple gear. Honestly, it would take a lot to get me to give up OS X and go back to a FreeBSD workstation.
Technorati Tags: apple, macbook, os x, genius bar
Black Hat Hackers Own Us!
Wednesday, June 13, 2007 - 5:16 PMThe Register has an interesting article about black hat hackers. It contains a list of 10 reasons why the black hats have us "outgunned" Snippet:
1. The Black Hats form a well integrated community that shares knowledge effectively.Should you, after months of research and effort, create an exploit that allows you to hack Windows or any other frequently used software product, you can auction the exploit on the internet in a well organised manner. Yes, the hackers have their own auction sites (it's true). And if you're looking to write a virus, say, well, there are hundreds of sites out there that can provide you with source code to help you construct something really fiendish. Different modules for setting up a mail server or planting a specific Trojan or whatever. Open source is all the rage, even among hacker
5. There's a market for your data"OK, I go out onto the net and try an exploit here or there and I hit pay dirt - a whole file of thousands of credit card details. What do I do now?" My advice to you dear boy, is forget about trying to buy stuff on eBay or Amazon with all that stolen data. Simply sell the data and leave it to someone else to do all the dirty work. How much to sell for? Well it depends, but you should be able to get $30 per credit card as an absolute minimum and if you've got really lucky and managed to get the PIN number of the card (a difficult data item to get your hands on) then it should be close to $500 per card. Yes, there are markets out in cyberspace where you can sell data - not just credit card data, but Social Security Card data (for US citizens), birth certificate data, billing data, and driving license data (all of which can be used to set up bogus bank accounts).
6. There are botnets to rentDon't tell me, let me guess. You've got a great scheme in mind to flood the world with a particular kind of spam and it's bound to pay off. But you just don't have the computer power you need. Let me introduce you to an Asian friend of mind who's been established in the Black Hat trade for a year or two. He repeatedly floods the internet with Trojan viruses to continuously assemble and grow a botnet. He has to keep on doing it because every now and then PCs get cleaned and fall out of the net and anyway the bigger the botnet the more the commercial opportunity. My friend will rent you a portion of his botnet for 20 cents per PC per day (roughly current rates) and he'll throw in a whole database of email addresses too. He thinks of himself as an Internet Service Provider.
10. Not all businessmen are entirely averse to the odd hack (on a competitor)As you seem determined to embark on a life of cybercrime I have one last piece of advice for you. Don't ignore the business world as a lucrative source of income. I know what you're thinking. Those guys are my prey. Well it's true that some of them are, but some of them could become your customers - if you make the right contacts and do the right kind of marketing. I mean, which businessman could fail to be pleased when his major competitor suffers a big data hack or loses a few days web business because of a DOS attack. Which businessman doesn't think, "hey what if I arranged for something like that to happen?" And which businessman having formulated a good competitive tactic doesn't put it into practice. There's good money to be made in focused hacks, theft of intellectual property, denial of service and large scale data theft. You might even get paid twice - by the customer and the victim.
Apparently, it's the end of the world as we know it. The sky is falling... No really!
Seriously, identify theft has become such a major threat to the average consumer. Dealing with it can take years to straighten out and your credit may never be the same. E-Tailers need to take more precautions when dealing with customer data. I have worked at companies that retain quite a bit of user information and while their practices were decent, most needed to do more. I pointed it out, and usually action was taken... But not always!
Tsk Tsk.
Technorati Tags: black hat, e-commerce, hackers, security, software
Django, metaWeblog and Amazon S3
Wednesday, June 6, 2007 - 11:11 AMThis is a quick write up about adding support for Amazon S3 to your Django weblog. I added support for metaWeblog API by using the this write up from All Your Pixel. Most, if not all, blogging clients support the metaWeblog API so I think it was a good choice.
Why use Amazon S3?
- It's super cheap (probably cost you less than $1/mo)
- Performance is improved by moving static media away from your Django/Apache instance.
- Amazon worries about managing and scaling the storage back end.
First off, let's edit the settings.py that is in your Django project's directory. We will want to add your Amazon access information. Note: You can get your access information by signing up for S3 at the Amazon site. Add the following to your settings.py file:
AWS_ACCESS_KEY = 'Your Key'
AWS_SECRET_ACCESS_KEY = 'Your Secret Key'
BUCKET_NAME = 'Your Bucket Name'
AWS_S3_URL = 'http://s3.amazonaws.com'
So, I am going to assume you are using the xmlrpc.py and metaweblog.py that was provided in the All Your Pixel posting (linked above). Be sure you are importing the Django project settings file by using:
from django.conf import settings
This will also require the Python S3 module that is provided by Amazon. Get this file and add it to your project, or your Python path. Import that module, and the mimetypes module which is used to guess the type of the file being uploaded.
from yourproject import S3
import mimetypes
Now we will create, or edit, the metaWeblog_newMediaObject method. This is what is called when your blogging client attaches, or uploads, a media file to your blog post.
def metaWeblog_newMediaObject(user, blogid, struct):
ret = {}
fext = os.path.splitext(struct['name'])[1].lower()
fname = generate_fname() + fext
try:
conn = S3.AWSAuthConnection(settings.AWS_ACCESS_KEY,
settings.AWS_SECRET_ACCESS_KEY)
buckets = conn.list_all_my_buckets()
if not settings.BUCKET_NAME in [b.name for b in buckets.entries]:
# BUCKET_NAME doesn't exist, create it!
res = conn.create_bucket(settings.BUCKET_NAME)
if res.http_response.status != 200:
raise
filename = 'uploads/' + fname
res = conn.get(settings.BUCKET_NAME, filename)
while res.http_response.status == 200:
# File exists, generate new filename
fname = generate_fname() + fext
filename = 'uploads/' + fname
res = conn.get(settings.BUCKET_NAME, filename)
content_type = mimetypes.guess_type(filename)[0]
if not content_type:
content_type = 'text/plain'
res = conn.put(settings.BUCKET_NAME,
filename,
S3.S3Object(struct['bits'].__str__()),
{'x-amz-acl': 'public-read',
'Content-Type': content_type}
)
if res.http_response.status == 200:
ret['url'] = '%s/%s/%s' % (settings.AWS_S3_URL,
settings.BUCKET_NAME,
filename)
except:
pass
return ret
I should mention that the method generate_fname(), which is used above, is just a function to generate a MD5 hash which will be used as a file name of the new file being added. It is not required, but you may want to use something similar. A quick run down of what this code does:
1 - Generates a file name to use.
2 - Creates an S3 instance.
3 - Gets a list of all your S3 buckets.
4 - Checks to see that the bucket you want to use exists. If not, it creates it.
5 - Checks to see if the file already exists. If so, it generates a new file name.
6 - Guesses the file type.
7 - Uploads the file to S3.
8 - Returns the file URL to your blogging client.
That's it! There are a few other articles written about this. Check them out as well!
Technorati Tags: amazon s3, blog, development, django, geek, python
The iPhones Are Coming!
Tuesday, June 5, 2007 - 8:50 AMSince the announcement of the Apple iPhone, the tech community has been a buzz with chatter. I saw one of the TV Ads the other day and got a little excited (read into that what you will). The phones are set to be available on June 29th, a mere 24 days away! I have to think that this will change the mobile phone business in some form. Probably not in the way that the iPod effected the music business, but I am sure it will change for the better.
There are drawbacks however. Mainly that the phone will be limited to use with the AT&T wireless service. A lot of people currently tied to contracts with other services will be wondering if it's worth it. Is it worth the cost of the current termination penalty? I think I pay $150 with T-Mobile, PER LINE (I have 3 lines!) Maybe I can finagle the deal to leave my wife & daughter on T-Mobile while I head over to iPhone bliss? Even if that's possible, the low end model of the iPhone is $499. That's a lot of green backs! Plus general service costs, etc. I can be looking at nearly $1000 to make the move.
Let's see... Overhaul my motorcycle... Or new iPhone??? Which one will turn more heads? Probably the iPhone.
When they do come out, I will probably sit and wait a few months so that any glitches, and there will be glitches, can hopefully get worked out. If you are one of the wild ones, and feel like sharing, please let me know how you like the phone. I am very interested to see how this one turns out!
Technorati Tags: cell phone, geek, iphone, ipod, apple, t-mobile
New Django CMS System Is Live!
Friday, May 18, 2007 - 4:48 PMWell, here it is. My Django blog/cms software is alive and kicking. I spent about 3 weeks getting this together, off and on. I finally decided to bring it live, even though there is a small list of features I want to add. It currently has all the basic features a normal blog should support. Here is a TODO of what I would like to add.
- Trackback/Ping Support
- Better Post Tagging
- Multiple Client Blogging API's
I also have to give credit where it's due. The template was a free design from NodeThirtyThree. I altered it where I wanted to get the look you see today. I used code snippets and examples from various places as guidelines for creating this app. Many articles and blog entries related to various specific Django functions were used, etc. Small list of thanks.
- Django Docs (obviously)
- All Your Pixel
- Jerakeen.org
- B-List
So have a look around and let me know what you think, if you spot any errors or if you have any suggestions.
[Update] I got around to adding Trackback support last night, according to the MovableType trackback specs.
Technorati Tags: blog, development, django, geek, python, software
Django CMS
Friday, May 11, 2007 - 12:01 PMI have been taking the time to learn Django the last few weeks. Hour here, hour there. I started working on a "real" project a few days ago and it's coming along nicely. Given the little time I've had for this, I am really surprised how much I have completed.
The idea is to replace serendipity as the blog software I use for this website. It's been fine, but has a few things I find pretty annoying. Bottom line is, I want something I have complete control over. So, with that was born "pscom". Which is what I called my personal CMS written in Django. Highly original! I have all the basic blog functionality working fine, even got the XMLRPC stuff working thanks to an awesome write up over at All Your Pixel.
Most of my time has actually gone into the "design" of it. I am by no means a web designer, and my creativity in that sense is not even on the charts! So it's tough for me to get something together that I think looks nice. We will see what you all think soon.
Anyways, I have been pretty busy with other things, so I will update when I can! I hope to have this site replaced with the new one in a few weeks.
Technorati Tags: development, django, geek, python
Mac Mini iRouters!
Friday, May 4, 2007 - 10 AMI stumbled across a pretty clever use of Mac Mini's today. There is a pair of mini's being used as redundant BGP4 routers on the London INternet eXchange (LINX), by the Fubra network. They apparently installed Ubuntu Linux and used the Quagga Routing Suite for the BGP communications.
The mini's were perfect as they are very compact and draw very little power. Apparently, London data centers have power shortages *shrugs*
Technorati Tags: bgp, geek, networking, OS X, technology
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Wednesday, May 2, 2007 - 1:25 PMOK, I jumped on the f'n band wagon!
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Technorati Tags: geek, hd-dvd, news
Blackberry Pearl
Tuesday, April 17, 2007 - 8:53 PMSaturday, I picked up a new Blackberry Pearl which is replacing my old Blackberry 8700g. At first, the smaller phone and especially keyboard was annoying to me. The more I use it, the more I like the interface. Nothing can replace the full keyboard imho, but the rest of the phones navigation is superior. I especially like the roll ball navigation, as opposed to the scroll wheel on the 8700. Again, the biggest adjustment is the keyboard but I am getting the hang of it. The word prediction on this phone is much better than any other device I have used.
Another great feature is the camera! It may be the nicest camera phone I have ever seen. The camera is a 1.3 megapixel and the photos are very nice (considering, it's a phone!) I have a few of them on my Groovr profile.
I will post an update on my feelings on the pearl in a week or so, once I've had more time to play.
Technorati Tags: blackberry, cell phone, pearl
eChores - Flickr
Saturday, April 7, 2007 - 7:11 AMKeeping the various services, that we all use, up to date can be a pain! I haven't updated my Flickr account in some time. It is so out of date in fact that I simply deleted all my photos and started over from scratch. I am slowly adding "rolls" from my iPhoto into "sets" on Flickr. I have to admit, Flickr is very cool these days. Their newer utilities and geo tagging are awesome features. I know they might not be that new, but it literally has been a year since I used my account. heh.
So I am making an effort to ditch my current gallery install and use my Flickr account for all my photo sharing. I purchased the FlickrExport plugin for iPhoto. Now keeping it up to date is extremely easy. Just add them to Flickr as I import them from my camera. I can worry about organizing them later, when I have the time, via the Flickr website.
Currently I have about 3 sets up on the site, with more to come. I will spend another hour on this today (hopefully) and move on to something that doesn't involve a keyboard. Anything, as long as it doesn't involve a keyboard!
Anyways, check out my Flickr photos here.
Technorati Tags: flickr, life, photos
Starting with Django
Thursday, March 22, 2007 - 3:37 PMDjango (pronounced: 'zhang-go') is a web application framework written in Python. I have read about it for some time but never got the time to start messing with it. I wish I had as it would have made my previous development for some sites much easier. Anyone who knows me will say that I love to preach Python. So when I started learning Django it was a very easy transition. I obviously still have a lot to learn (in Python and Django) but as I continue to learn the framework the more impressed I am with it.
There are other great frameworks available. TurboGears is one of them. I feel like the momentum is behind Django and has a larger community. To be fair, I honestly haven't tried TurboGears yet. I don't plan to any time soon as Django has given me what I need, in a way that fits my style.
I am working on a new project, which I don't want to give many details about yet. Hopefully I can have a private beta together in a few months, depending on the time I have available. I will say that it will be a social environment (I know, not another one!) and I believe it will be useful and unique. I will keep this blog updated with my progress.
If you are interested in a comparison of Django with other frameworks (Ruby on Rails, TurboGears, etc.) then Google is a good place to start. I did enjoy this post on the topic.
Technorati Tags: development, django, python, software
Windows Vista Activation Flaw
Sunday, March 4, 2007 - 12:26 PMApparently there is a method to bypass the MS Windows Vista activation process. It is done using the Paradox OEM Bios Emulation Toolkit. I stumbled across this while browsing My Digital Life. Read the full article here.
I wish I could test this, but the only PC hardware I have is running FreeBSD and I have no Vista discs. Have fun with this one.
Technorati Tags: microsoft, news, windows vista
T-Mobile + BlackBerry 8700 = MMS Message Issues
Thursday, February 22, 2007 - 3:56 PM"You have been sent a picture message. View your message at http://www.t-mobilepictures.com"
For months I was annoyed with that. The whole point of receiving MMS (picture) messages is to get a quick glance without having to use your desktop! I finally got tired of it and investigated why I was having this trouble. I use the Blackberry 8700g device with T-Mobile cellular service.
Apparently, I am not the only person frustrated with this. A quick check of the forums at Pinstack.com shows many, many people with the same issue. These are the steps I found to fix this issue.
- View your service books. Options -> Advanced Options -> Service Book
- Delete every service book except "Provisioning"
- Resend your service books via your device, or the My T-Mobile web site.
- Reboot your device (Pull the battery out, don't use the power button.. Don't ask me why.)
Technorati Tags: blackberry, mms, software, t-mobile
OS X: Safari or Firefox
Saturday, February 10, 2007 - 10:49 AMFor as long as I have been using OS X, about 4 years, I have always used Safari. I never had many complaints with the browser and it is very fast! Recently I have been annoyed with Safari not rendering certain pages correctly. I know that Safari is W3C compliant and the real issue is the code used on the page in question, but still it can be annoying.
Many of my friends are suggesting Firefox. While I am no stranger to Firefox on the PC or even *nix (FreeBSD, Linux) I have yet to try it on OS X. Yea, seriously. So I decided to give it a shot.
I immediately noticed it is slower than Safari. I was willing to live with that since it seemed to render all pages correctly. Even the broken pages that Safari had a bit of trouble with. Everything was all to the good, until I noticed some quirks that made me reconsider.
- Firefox seems to crash at random. Usually after it has been running for a day or so and I have just visited one or two sites with heavy use of Java (read: Web 2.0)
- Sometimes the keyboard doesn't respond in Firefox. For instance, I can't scroll using the space bar or the arrow keys. Another example, if I type in a URL, hitting return does not cause Firefox to load the web page. I have to click the "go" button. As a UNIX geek, I really hate "clicking" when I don't have to ;)
- After a day or so of use Firefox gets very sluggish. Taking 10 seconds or more to just BEGIN loading a web page.
Note: I did try Camino as well. I was impressed with it. It does seem a little behind Safari and even Firefox in some aspects. Also, it appears under developed. Not sure how active the team is over there.
Technorati Tags: firefox, OS X, safari, software
iPod in public == $100 fine
Wednesday, February 7, 2007 - 2:36 PMI found this via Google News...
"That's because Sen. Carl Kruger (D-Brooklyn) plans to introduce legislation that would ban people from listening to music players or using electronic devices that would hamper their awareness of their surroundings while crossing the street, said Jason Joppel, Kruger's chief of staff. The legislation would also apply to pedestrians using iPods and other MP3 players, BlackBerries, cell phones or other devices."
Now, this can get hairy. I routinely use my iPod and BlackBerry in public, so this can't be good news. Luckily I live in Los Angeles and not New York. It's not like anyone walks in LA anyways ;)
Full article is Here
Technorati Tags: blackberry, ipod, news
