UrFix's Blog

A geek without a cause

  • Watch Star Wars From Command Line With telnet

    by

    Blinkenlights’ ASCII Star Wars animation which has been around since the Dark Ages (well, since 2000). But it’s still cool. you can try it on Linux or Windows. From any command line, type:

    telnet towel.blinkenlights.nl

    I t i s a p e r i o d o f c i v i l w a r.
    R e b e l s p a c e s h i p s , s t r i k i n g
    f r o m a h i d d e n b a s e , h a v e w o n
    t h e i r f i r s t v i c t o r y a g a i n s t
    t h e e v i l G a l a c t i c E m p i r e.
    D u r i n g t h e b a t t l e , R e b e l
    s p i e s m a n a g e d to s t e a l s e c r e t
    p l a n s t o t h e E m p i r e ‘ s
    u l t i m a t e w e a p o n , t h e D E A T H
    S T A R , a n a r m o r e d s p a c e
    s t a t i o n w i t h e n o u g h p o w e r to
    d e s t r o y a n e n t i r e p l a n e t.

    P u r s u e d b y t h e E m p i r e ‘ s
    s i n i s t e r a g e n t s , P r i n c e s s
    L e i a r a c e s h o m e a b o a r d h e r
    s t a r s h i p , c u s t o d i a n o f t h e
    s t o l e n p l a n s t h a t c a n s a v e
    h e r p e o p l e a n d r e s t o r e
    f r e e d o m t o t h e g a l a x y. . . .

    “You can’t win, Darth. Strike me down, and I will become more powerful than you could possibly imagine.”

  • My favorite WordPress Plugins

    by

    Here are the plugins I am using on this website, powered by wordpress.

    AddToAny: Share/Bookmark/Email Button Help people share, bookmark, and email your posts & pages using any service, such as Facebook, Twitter, Google Buzz, Digg and many more.

    After The Deadline Adds a contextual spell, style, and grammar checker to WordPress. Write better and spend less time editing.  See the Proofreading Support page for help.

    Google XML Sitemaps This plugin will generate a special XML sitemap which will help search engines like Google, Yahoo, Bing and Ask.com to better index your blog.

    Hyper Cache Hyper Cache is a cache system for WordPress to improve it’s perfomances and save resources. Before update read the version changes. To manually upgrade remeber the sequence: deactivate, update, activate.

    Ozh’ Admin Drop Down Menu All admin links available in a neat horizontal drop down menu. Saves lots of screen real estate! For WordPress 3.0+

    SEO Ultimate This all-in-one SEO plugin gives you control over title tags, noindex/nofollow, meta tags, rich snippets, slugs, canonical tags, autolinks, 404 errors, rich snippets, and more.

    Simple Facebook Like Adds “Facebook Like Button” after or before your post content. This plugin has an admin page so you can easily configure it.

    TweetMeme Retweet Button Adds a button which easily lets you retweet your blog posts.

    Tweet This Popular Twitter plugin inserts “Tweet This” links so your readers can share posts with one click. Automatically tweets new posts via OAuth.

    Twitter Widget Pro A widget that properly handles twitter feeds, including @username, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.

    WP-DBManager Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.

    WP-reCAPTCHA Integrates reCAPTCHA anti-spam solutions with wordpress

    WP File Cache File Cache for WordPress – replacement for the standard WP Object Cache>

  • Referrer Spam Script And How To Protect Yourself From It

    by

    What is Referrer Spam?

    According to Wikipedia: Referrer spam (also known as log spam or referrer bombing) is a kind of spamdexing (spamming aimed at search engines). The technique involves making repeated web site requests using a fake referrer url that points to the site the spammer wishes to advertise. Sites that publicize their access logs, including referrer statistics, will then end up linking to the spammer’s site, which will in turn be indexed by the search engines as they crawl the access logs.

    This benefits the spammer because of the free link, and also gives the spammer’s site improved search engine ranking due to link-counting algorithms that search engines use.

    What Does a Referrer Spam script look like?

    Here is a example of a referrer spam script.

    count=0
    for i in `cat list`
    do
    count=`expr $count + 1`
    curl $i -e “https://blog.urfix.com” -A “Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20100107 Fedora/3.5.6-1.fc12 Firefox/3.5.6”
    echo $i
    echo counting
    done
    echo “End of file”
    echo done

    What this script does is it reads urls from a file called list (for i in `cat list`)

    It then sends a request to the first url spooifng the referral making it seem that it is coming from https://blog.urfix.com (-e “https://blog.urfix.com”)

    It also spoofs the Agent and OS to make it seem like a real user and not some curl bot (-A “Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20100107 Fedora/3.5.6-1.fc12 Firefox/3.5.6”)

    the script continues by looping and doing the same with second url the third and so forth until it reaches the bottom of the list.

    Solutions

    Referrer Karma WordPress Plugin
    Referrer Karma is a rather simple script that prevents malicious bots from accessing your pages, flooding your logs and possibly draining your server’s bandwidth. All it does is check that an incoming bot has a valid referrer field URL (i.e. that the page it claims to come from, does exist and does have a link to your site). If RK thinks the incoming visitor is a malicious bot, it displays a 403 error page (which will not be counted as a visit by log analyzer tools) and uses HTML redirecting to the original URL to avoid blocking legitimate visitors (See site for details).

    stop-spam-referer-php-script

    • Really easy install – two minuts
    • Stop bad referers ( domains list )
    • Stop domains by keywords
    • Bandwidth safe
    • and much more

    With this simple php script you can stop all your referer spam easily :)

    .htaccess

    Use an .htaccess file to block requests from whatever you have managed to identify as either a crawler designed to find URLs to spam or a spamming URL. This is a relatively simple blacklist, and though it cannot work as a long term solution to this problem, it should keep you happy for now.

    Conclusion

    There are plenty of techniques available for blocking referrer spam, and everyone has their favorite. Personally, I use a combination the three techniques mentioned in this article.

    Good luck with getting rid of your spam referrals.

  • aria2 The Next Generation Download Utility

    by

    Most people’s downloads are done via an FTP client, a Web browser, or a file-sharing program like BitTorrent. These means of downloading files will probably never change, but the tools to do the downloading, and how they download, will.

    One program that changes how files are downloaded is Aria2. Aria2 is a lightweight multiprotocol and multisource download utility that offers some very compelling reasons for its use over traditional “single thread” downloading such as with an FTP or HTTP client.

    Being a multiprotocol client, Aria2 can download via HTTP, via FTP, and via BitTorrent. What makes Aria2 unique is that it can download the same file at the same time utilizing different protocols. It can also open multiple connections to the same, or different, URLs to download the file even faster. By default, Aria2 uses five connections to download a file.

    aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, BitTorrent and Metalink.

    aria2 has built-in XML-RPC interface. You can manipulate aria2 via XML-RPC interface.

    Features

    Multi-Connection Download

    aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. Really speeds up your download experience.

    Lightweight

    aria2 doesn’t require much memory and CPU time. The physical memory usage is typically 4MiB (normal HTTP/FTP downloads) to 9MiB (BitTorrent downloads). CPU usage in BitTorrent with download speed of 2.8MiB/sec is around 6%.

    Fully Featured BitTorrent Client

    All features you want in BitTorrent client are available: DHT, PEX, Encryption, Magnet URI, Web-Seeding, Selective Downloads and Local Peer Discovery.

    Metalink Enabled

    aria2 supports The Metalink Download Description Format(aka Metalink v4). Old Metalink v3 is also supported. Metalink offers File verification, HTTP/FTP/BitTorrent integration and Configuration for language, location, OS, etc

    Usage

    Command-line scares you off? No, aria2 is really easy to use!!

    Download from WEB

    $ aria2c http://example.org/mylinux.iso

    Download from 2 sources

    $ aria2c http://a/f.iso ftp://b/f.iso

    BitTorrent

    $ aria2c http://example.org/mylinux.torrent

    BitTorrent Magnet URI

    $ aria2c ‘magnet:?xt=urn:btih:248D0A1CD08284299D
    E78D5C1ED359BB46717D8C’

    Metalink

    $ aria2c http://example.org/mylinux.metalink

    Download URIs found in text file

    $ aria2c -i uris.txt

    The speed gains of Aria2 are incredible. If BitTorrent isn’t your thing,
    imagine finding five different mirrors of your favorite Linux distribution
    and passing the URLs to Aria2. Possibly the longest part of that would be finding
    the URLs and pasting it to the command-line, rather than the actual downloading.

Chat

Hi 👋, how can we help?