Tarsnap frontend released

 

For the better part of the last half year I’ve been working on a Graphical User Interface for the popular Tarsnap online backup service. The frontend enables desktop users to benefit from the same advantages that the Tarsnap service offers, admittedly only at the command line interface. These benefits include:

  • cost effectiveness;
  • flexibility and control of your backup process;
  • total openness on the client side;

While the Tarsnap service is of immense efficiency and conveniency for server and scripted backups thanks to its Unix utility design, that same characteristic makes it a good choice for wrapping a desktop application with a graphical interface on top so that more users can benefit from truly secure and well designed backups as well as to easily define and use more complex backup routines from a comfortable and lean interface.

Tarsnap-v0.5-OSX-Yosemite-Wizard

Tarsnap Setup Wizard

 

The application is cross platform, written in C++ with the help of the Qt SDK and is released under the BSD 2 clause license. It has been tested on OS X Yosemite, FreeBSD and most Linux distributions with a wide audience.

In the present state, the application makes it easy to:

  1. Configure Tarsnap on your system via a Setup Wizard;
  2. Make single shot backups from the Backup tab, for quickly putting some important files and directories at rest on Tarsnap;
  3. List, inspect and manage your backup archives from the Archives tab  ;
  4. Define frequent backups you attend to as a job from the Jobs tab; A job has custom backup paths and settings;
  5. Provides useful customizations and help via the Settings and Help tabs;

The current version is 0.5. There’s so much more to be implemented and ground to cover in both usability as well as Tarsnap options breadth and depth coverage. So stay tuned for further releases and announcements to this blog, @shinn0K, @tarsnap or the tarsnap-users mail list.

Project page and source code is available at GitHub: https://github.com/Tarsnap/tarsnap-gui

Head over to this overview Wiki page for extra details regarding the current release. Also read the announcement e-mail on the tarsnap-users mail list.

As explained in the wiki page and the announcement e-mail, there are no binary redistributable packages for now, mainly because there aren’t any for the Tarsnap command line client either. This might change in the future though.

As with any Open Source project, I encourage you to participate via discussion, feedback, code contributions, bug reports, fixes and platform testing. Basically any type of constructive and informative contribution is very much welcomed.

Tagged with:
 

Blocking ads and trackers using HOSTS

If you’ve stumbled across this post, you’re probably familiar with adblocking extensions such as Adblock and uBlock(seriously recommend the latter for a handful of reasons) and most likely you’re in need of a solution to take back your network and system resources as well as a need for less clutter and more privacy in your daily web ventures, however, this method for blocking ads at the browser level only tends to be quite inefficient and fairly limited. Wouldn’t it be cool to also have ads and trackers blocked at the system level, including but not limited to applications like Skype, uTorrent, IE(seriously?) and other browsers or the many shareware/freeware apps that track your usage via mechanisms like Google Analytics(some use exactly that for tracking).

The solution is fairly simple, we’re going to use a simple hostname based block list to map undesirable domain names to either 0.0.0.0 or 127.0.0.1. In my testing on OS X, I found that 0.0.0.0 works best, that might not be the case on different operating systems. The blocking is done via the ages old hosts(5) unix file, but still very useful mechanism for easy static ip-name mappings at the host level.

The current block list that I use is hosted at hosts.neocities.org. I’m not affiliated with that site and don’t know who is providing it, that being said I use git to track and review changes between updates. The list is quite exhaustive, combining lists from several other sources cited in the header. I’d like to see a couple more lists combined like that from several other places(mainly the ones from uBlock would be useful), but you can then add extra lists by modifying the script fairly easily.

Now the script itself, is hosted on Github. Please read the entire script and what I’ve written bellow before running the script on your system.

Before you go on and use the script on your OS X, I really encourage to start using git in your /etc/ directory. The script won’t even work without a git repo in /etc/, unless you know what you’re doing and you’re going to modify it to bypass that. Having a git repo in your etc directory gives you revisioning, rollback, beta-testing, review and scrutiny abilities to whatever you’re doing to your etc. I do this on my workstations, laptops and servers that I manage. The added git overhead on your daily etc routines is insignificant when compared to the benefits you get when you most need them.

The script is smart enough to not break your current system. What it does as part of the first time run initialization is copy your current /etc/hosts to /etc/hosts.d/hosts.1.head. All your existing localhost rules and custom rules will be maintained there. The adblocking rules will go into /etc/hosts.d/hosts.3.adblock. You can add custom mapping rules(for staging servers, local network mappings) to  hosts.2.custom.

Then each time the script updates it will do the following:

  1. Update hosts.3.adblock with the latest rules from upstream;
  2. Concatenate the rules in /etc/hosts.d in the numeric order to your /etc/hosts;
  3. Show you a git diff of the changes and the option to commit those changes or deny to review, undo or commit yourself using git;

The script also has some pfsense blocking rules from www.emergingthreats.net and some custom ip blocking enabled in /etc/pf.rules/ip-block.pf. This is disabled by default, you can enable it by setting the PFSENSE var to “true” or passing -f as argument. If you know of some other worthy and fresh ad/malware ip lists let me know.

Although my script is OS X only, it’s fairly easy to port it to any other UNIX system(I welcome patches to the main script via Github), having such a solution for the Windows platform would be cool too. Maybe someone reading this can weigh in with their solution or insight? Would it work fair enough, is cygwin the only way for automating this? Nonetheless, stay tuned, since I have a similar router solution(AsusWRT, DD-WRT) coming up soon, that steps up the game a notch and provides blocking for your entire network, though it surely doesn’t deprecate this host level solution (on a laptop for e.g. that is frequently switching networks).

Pros for this setup:

  1. Easy setup and update (when compared to a firewall or a custom dns);
  2. Cross-platform and cross-application solution;
  3. Faster and less intrusive(also no https mitm) than proxy solutions(such as Privoxy);
  4. Easy to temporarily disable: just cp /etc/hosts.d/hosts.1.head /etc/hosts and to restore git checkout /etc/hosts;

Caveats:

  1. On some operating systems hosts files with tens of thousands of rules might slow name resolution up to a certain degree. In my usage with over 50000 rules, OS X and Linux is quite fine in that regard. If you find that such is your case, maybe using a dns server or firewall rules is better for you;
  2. Some blank spaces, containers, divs or unresolved error messages will take the place of the ads themselves in sites and apps that don’t handle failure very well. You can get rid of the browser related blanks at least by using uBlock extension with just the cosmetic rules enabled(in the extension Settings);
  3. Related to the previous one, you might experience some failures in certain web related functionality(fairly limited though). Most of them will be social related or news sites that use ad nag pages before they redirect you to the article content itself. Personally I don’t care about them and as soon as I hit such a road block I close it and move on. The benefit of more resources and network bandwidth for my system as well as the increased privacy and less clutter in general, totally trumps any minor drawback like this;
  4. The script relies on the links(1)(or elinks) tool to parse the html page at hosts.neocities.org and extract only the text. On OS X I use homebrew to install additional tools that I need. If you have a better solid solution that relies only on coreutils or other commonly installed shell utilities let me know;

 

 

Tagged with:
 

Alternative to the finger Unix command

Every once in a while I stumble on this question on yet too many forums and Q&A sites:

Is there an alternative to the finger command?

The simple answer is yes! There is an official replacement for the original finger command and it’s part of the gnu coreutils package, it is called pinky(1) and it’s available on all systems that use the gnu coreutils.

The long answer is, no, there isn’t really a real replacement to the original remote enabled finger protocol along with the fingerd daemon and finger client. While it did make sense and has seen its fair share of usage in the early days of the Internet,  it has been considered obsolete and a security issue for way over a decade now, thus all of the modern Linux distributions and Unix flavors don’t install the service nor the client by default anymore, some don’t even include them in their repositories at all.

So now, most of the replacement tools and commands that one can use instead of finger are going to act on the local machine only and provide logged in user info only for the current host. One such tool is pinky of course and it’s output similar to:

$ pinky
Login Name TTY Idle When Where
shinnok Shinnok pts/0 2013-09-18 07:32 127.0.0.1
andy        Andy pts/1 2013-09-18 07:32 127.0.0.2

As you can see the output is pretty similar to the who(1) command(it was actually ported from who.c), nothing special about it. The other traditional alternatives to the finger command include w(1) and users(1).

Tagged with:
 

It’s about time to call the end on the current poll with 412 votes, Which OS do you currently use the most? , and draw the results:

The best pentesting distribution is?

  • Backtrack (62%, 252 Votes)
  • Other (18%, 74 Votes)
  • nUbuntu (9%, 36 Votes)
  • Network Security Toolkit (2%, 9 Votes)
  • General Knoppix (2%, 8 Votes)
  • Pentoo (2%, 7 Votes)
  • Samurai (2%, 7 Votes)
  • Helix (1%, 4 Votes)
  • STD (1%, 4 Votes)
  • INSERT (1%, 3 Votes)
  • Operator (1%, 3 Votes)

Total Voters: 412

Loading ... Loading ...

The new poll is:

The most useful skills in a pentester's arsenal?

  • Out of the box, unconventional thinking (hacker mindset) (22%, 24 Votes)
  • Constant curiosity (also hacker mindset) (19%, 21 Votes)
  • Social engineering (15%, 16 Votes)
  • Programming and scripting (13%, 14 Votes)
  • Exploit development (8%, 9 Votes)
  • Vulnerability discovery and Fuzzing (7%, 8 Votes)
  • Tool knowledge (6%, 7 Votes)
  • Domain specific knowledge (like Networking, Operating Systems or Scada apps) (6%, 7 Votes)
  • Forensics (2%, 2 Votes)

Total Voters: 70

Loading ... Loading ...

This new poll is multi-choice, with a maximum of 3 selections allowed. So go ahead, and pick the three most useful skills you think a pentester should posses.

Inspired by my previous post on using Qt Creator on non-Qt SDK projects, I went a step further and integrated the Linux Man Pages section 2(system calls) and section 3(library functions) as a context help module in Qt Creator and Qt Assistant. Having documentation on all of the Linux system calls and system libraries at one click away(F1) is a great advantage and boost to productivity when doing system programming on Linux(and not only), especially now that Linux has around 400 system calls and GlibC 1400 functions.

 

The Man pages have been bundled as a Qt Compiled Help module that is easily plugged into Qt Creator or Qt Assistant. The HTML pages used are the official ones available at kernel.org, the online version. I have removed the Google search and StatCounter Code since they are not necessary for this purpose.

The manpages are accessible by context help, when pressing F1 on a declared function like select or printf or by visiting the Help screen and browsing them alphabetically or by searching the index. You can find more information about them right there in the Help screen in the Linux Man pages category.

You can download a gzipped version Qt Compiled Help Linux Manpages from here:

https://trunk.shinnok.com/qt/manpages.qch.gz

Using it is pretty straight straight forward, open up Qt Creator and go to Tools -> Options -> Help screen. Switch over to the Documentation tab and then click on Add, like so:

Browse to your gunzipped manpages.qch location and click Open. You should now see an entry named org.kernel.manpages.1.0 that points to your supplied location:

Remember that if you remove or move the .qch to another location Qt Creator will not be able to find it anymore, since it doesn’t create a copy for itself. It’s best if you put in a place that makes sense in this manner.

If i see demand for this module, I’ll move the instructions on how to import the Linux man pages Qt Compiled Help module, as well as download links, to the main site(shinnok.com) and I will try and update them every so often once I hear of important changes to the man pages. Till then, this will be a blog simple post.

Happy hacking!

Tagged with:
 

[Update1 20-07-2011] As per numerous requests, the games list has been updated with some more cool games that I’ve missed. They have been prepended  to the top of the list and as before, they are in no particular order.

While the popular conception when it comes to games for Linux is that they are almost non-existent, this is only true when it comes to big and popular commercial franchises that are backed up by giant video game studios and publishers like EA Games, Blizzard and Konami. On the other hand, Linux(and other platforms like *BSD) benefits from a myriad of open source and free games, some smaller for casual gaming and others more impressive like MMORPG’s and FPS’s that could compete with some of the commercial games out there in their branch either in the current state or given some fresh amount of contribution. Open source games are a convoluted topic and are somewhat special and unlike a traditional Open Source project because they require much more then code contribution, which foss minded hackers and geeks are eager to contribute anytime during the day. The three major issues with open source games that are apart from a traditional open source project are:

1. Harder to steer and govern – Traditional open source projects usually have a specific purpose and use case, thus there’s not much to argue about why and if a specific tool should do what it does. At most there is a how attached to it, like how to best implement that specific functionality or how to interact with the user better. When it comes to games there’s game behavior and mechanics that are to be settled upon, these are complex and intricate issues that involve ethics, human emotions, economy, public perception and many more aspects that given a set of 10 people to decide upon you’re most likely to come up with 5 different solutions and opinions then a single one. Some open source games have suffered from this and more will in future, because these issues pertain to human aspects and perception rather then technical ones.

There’s not much to argue about whether the best algorithm should be used over an existing crappy implementation, but there’s lots to argue about whether a character class should be more powerful then another or if health and mana potions should be acquirable at the market or at all. In these cases, a more Nazzi, restrained and centralized government would have worked better then the open one as well as more defined game behavior and mechanic in the first place.

So if you’re the master of an open source game, stop paying attention to each and every comment and complaint on the forums and irc channels or even better, stop putting to heart every single argument you stumble upon, you’re doing a great job and you know it, have a plan and stick to it. Ignoring useless flames and rants and random people telling you what to do or what your game should be like is not the right path to take in this case. Of course you should not be an ass(2,3) or take this advice to the extreme since that will hurt your project even more than doing good or even put you in danger of sporks.

2. Games are multifaceted productions – that involve game design, graphic design, media and 3D content, story telling, script planning and development, besides the usual code. When it comes to games, code is not the problem, content is. There are lots of hackers willing to throw some code at a cool open source project, however, there aren’t that many game designers or graphics designers that are willing to contribute in their free time just because it’s fun or intriguing. Just not long ago, the only open source or royalty free media that you could get your hands on were icon packs and wallpapers.

Thus if it happens that your a game designer, graphic designer, media creator or story and script planner and you’re complaining about the lack of games on the Linux platform, remember that you can change that, with minor chunks of your free time applied to the right Open Source game or at least apply to a game studio that ships cross platform games. Stop complaining, take action.

3. Most games nowadays require some form of online interaction – be it either for ranking and competing or multi-player gaming or availability, single player games are not that fun anymore. You have to have some form of online or social interaction within the game for it to last. Zelda, Doom and Duke3D were cool and fun as long as there were no real alternatives. As soon as you get World of Warcraft, Starcraft and  Halo you’ll never look back until melancholy for old times and old school strikes. So what does this online interaction involve? Well it involves data storage, bandwidth, servers, maintenance and web development. These resources don’t come free in anyway, form or shape and they mostly cost money. The guy working on the C/C++ core engine of the game or the shaders/3D guy isn’t likely(or have time) to maintain a web server or do web development either. You need donations  for the hardware and network part as well as contribution for maintenance and web development.

If you’re the CEO or have influence over a hosting or isp company you could help Open Source Gaming by donating resources to those games that need it. If you’re a web developer, designer or sysadmin you can help in building and maintaining the infrastructure that a multiplayer game needs.

So that’s what I think about Open Source Games and why they are a special breed and also tried to appeal to those that could help in changing history and the status quo. Open source games are fun and addictive to contribute to and you should give it a try, be it either code or game content. That’s why I’m going to list some of the coolest and/or popular Open Source games out there to help you make your mind as well as prove to you that, yes, there are great Open Source games:

Xonotic

Xonotic is a free (GPL), fast-paced first-person shooter that works on Microsoft Windows, Mac OSX and Linux. Xonotic is a direct successor of the Nexuiz Project. Xonotic places focus on community involvement as its principal driving force and structures itself to respect that. The aim of Xonotic is to become the best possible open-source FPS (first-person-shooter) of its kind.

https://www.youtube.com/watch?v=5SZgyP-0C0Q

Zero Ballistics

Zero Ballistics is a unique blend of multiplayer first person shooter and tank combat game. Easy to learn, difficult to master was our mantra during the development of the game. Set in lush alpine environments covering all seasons, playing Zero Ballistics is as thrilling as it is relaxing.

https://www.youtube.com/watch?v=xEvaTjxp_bo

Speed Dreams

Speed Dreams is a 3d cross-platform, open source motorsport simulation and racing game. It is released under the GNU General Public License (GPL). Speed Dreams is a fork of the open racing car simulator Torcs, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism.

https://www.youtube.com/watch?v=pRhTv3gaNwA

FreedroidRPG

Freedroid RPG is an RPG with isometric graphics. In it, the player is Tux, who must fight rebelling robots in order to restore peace to humankind. To do so, Tux may take over robots in a minigame based off the classic game Paradroid, or may simply blast them to pieces with a weapon.

S.C.O.U.R.G.E. 2

S.C.O.U.R.G.E. 2 is a cross platform, open source rogue-like game in the fine tradition of NetHack and Moria It sports a graphical front-end, similar to glHack or the Falcon’s eye.The design of the 3D UI is an attempt at the best of both worlds from old to new: It lets you rotate the view, zoom in/out, view special effects, and more with the feeling of the old-school isometric games like Exult or Woodward.

Secret Maryo Chronicles

Secret Maryo Chronicles is an Open Source two-dimensional platform game with a design similar to classic computer games. SMC has computer support to a great degree by using an accelerated Open Graphics Library for the best possible graphic design and stock performance.

Danger from the Deep

 Danger from the Deep is an open-source World War II German U-boat simulation, striving for technical and historical accuracy.

Red Eclipse

The game is a single-player and multi-player first-person ego-shooter, built as a total conversion of Cube Engine 2, which lends itself toward a balanced gameplay, completely at the control of map makers, while maintaining a general theme of agility in a variety of environments.

https://www.youtube.com/watch?v=mjHVb3z72tM

Widelands   

Widelands is an open source (GPLed) real-time strategy game. It is built upon the SDL and other open source libraries and is (and will always be) under heavy development. If you knew Settlers I & II™ (© Bluebyte), then you already have a rough idea what Widelands is all about because widelands is heavily inspired by those two games.

Unknown Horizons

Unknown Horizons is a 2D realtime strategy simulation with an emphasis on economy and city building. Expand your small settlement to a strong and wealthy colony, collect taxes and supply your inhabitants with valuable goods. Increase your power with a well balanced economy and with strategic trade and diplomacy.

FreeCol

FreeCol is a turn-based strategy game based on the old gameColonization, and similar to Civilization. The objective of the game is to create an independent nation.  You start with only a few colonists defying the stormy seas in their search for new land. Will you guide them on the Colonization of a New World?

PrBoom

PrBoom, the purest Doom-Port? Aims to be the most stable Doom port with the highest compatibility to the major Doom versions. Highres software and nice OpenGL rendering. Full Boom and most if not all MBF features.

EDuke32

EDuke32 is an awesome, free homebrew game engine and source port of the classic PC first person shooterDuke Nukem 3D— Duke3D for short—to Windows, Linux, Mac OS X, FreeBSD, several handhelds, your family toaster, and to your girlfriend’s vibrator. We’ve added thousands of cool and useful features and upgrades for regular players and additional editing capabilities and scripting extensions for homebrew developers and mod creators. EDuke32 is completely free, open source software.

https://www.youtube.com/watch?v=Al7i_v1a0m0

VCMI

VCMI Project – Heroes 3: WoG recreated -We want to rewrite the entire H3 engine (VCMI is NOT another mod) giving it new possibilities. Few years of intensive work resulted in creating application with impressive amount of features.

ioquake3

This project, ioquake3 (or ioq3 for short,) aims to build upon id Software’s Quake 3 source code release. The source code was released on August 20, 2005 under the GPLv2. Since then, we have been cleaning up, fixing bugs, and adding features.

OpenArena

OpenArena is a community-produced deathmatch FPS based on GPL idTech3 technology. There are many game types supported including Free For All, Capture The Flag, Domination, Overload, Harvester, and more. There are 17 unique player models to choose from and 12 weapons. OpenArena is based on the ioquake3 engine mentioned above.

Planeshift

PlaneShift is a Role Playing Game immersed into a 3D virtual fantasy world which is to play. Fully free means you will have no surprises of premium content which will limit your gameplay or unbalance the game. There are no limitations in skills, ranks, abilities, items you can gain with your free account. There are no time limits or additional constraints. Servers and bandwidth will be donated by sponsors. PlaneShift is made by a group of RPG enthusiasts and not by a commercial company. This allows us to expand the game without any constraint or limitation. PlaneShift is Open Source for the client and server code, so everyone can contribute to its development!

https://www.youtube.com/watch?v=S6v-sPejxdo

XMoto

X-Moto is a challenging 2D motocross platform game, where physics plays an all important role in the gameplay. You need to control your bike to its limits, if you want to have a chance to finish the most difficult challenges.

WorldForge

The WorldForge project is about building tools to allow the construction of online role-playing games. The original community came together over a decade ago, out of a desire to create a game that was better and freer than Ultima Online. But as the aims of the project evolved and became more ambitious, the overall goal changed. Instead of one game, we instead decided build a flexible framework that would allow everyone to contribute their own unique ideas and goals to the Worldforge project, allowing a multitude of games to be created.

Vega Strike

Vega Strike is an Open Source 3D Action-Space-Sim that lets you trade, fight, and explore in a vast universe. Vega Strike is built on top of OpenGL and runs on Win/Lin/Mac platforms. Vega Strike (the game) is currently in a playable state, but both game engine and dataset are under continued development.

Warsow

Warsow is a completely free fastpaced first-person shooter (FPS) set in a futuristic cartoon-like world for Windows, Linux and Mac OS X.

https://www.youtube.com/watch?v=vtJKrIngTIs

The Ur-Quan Masters

 

The project started in August 2002, when Toys For Bob released the partially ported sources of Star Control 2 3DO version to the fan community. Our goal is to port this wonderful game to current personal computers and operating systems. It is and will remain 100% free of charge, and anyone can contribute to the project and thus help make it even better.

Spring

Spring is a project aiming to create a new and versatile RTS Engine. Spring is not actually a game, but a powerful free cross-platform RTS engine.

OpenTTD

OpenTTD is an open source simulation game based upon the popular Microprose game “Transport Tycoon Deluxe”, written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.

Warzone 2100 

In Warzone 2100, you command the forces of The Project in a battle to rebuild the world after mankind has almost been destroyed by nuclear missiles. The game offers campaign, multi-player, and single-player skirmish modes. An extensive tech tree with over 400 different technologies, combined with the unit design system, allows for a wide variety of possible units and tactics.

0 A.D.

0 A.D. (pronounced “zero ey-dee”) is a free, open-source, cross-platform real-time strategy (RTS) game of ancient warfare. In short, it is a historically-based war/economy game that allows players to relive or rewrite the history of Western civilizations, focusing on the years between 500 B.C. and 500 A.D. The project is highly ambitious, involving state-of-the-art 3D graphics, detailed artwork, sound, and a flexible and powerful custom-built game engine. This is an Age of Empires clone.

FreeCiv

Freeciv is a Free and Open Source empire-building strategy game inspired by the history of human civilization. The game commences in prehistory and your mission is to lead your tribe from the stone age to the space age.

LinCity

LinCity-NG is a city simulation game. It is a polished and improved version of the classicLinCity game. In the game, you are required to build and maintain a city. You can win the game either by building a sustainable economy or by evacuating all citizens with spaceships.

Simutrans 

Simutrans is a freeware and open-source transportation simulation game.Your goal is to establish a successful transport company. Transport passengers, mail and goods by rail, road, ship and air. Interconnect cities, districts, public buildings, industries and tourist attractions by buiding a transport network you always dreamed of. Control and watch your finances and the traffic of your vehicles and goods. Start in 1880 and finish in 2050. There will be new vehicles and buildings throughout this time.

Hedgewars

Hedgewars is a turn based strategy, artillery, action and comedy game, featuring the antics of pink hedgehogs with attitude as they battle from the depths of hell to the depths of space.

CUBE 2: Sauerbraten

Cube 2: Sauerbraten is a free multiplayer/singleplayer first person shooter, built as a major redesign of theCube FPS. Much like the original Cube, the aim of this game is not necessarily to produce the most features & eyecandy possible, but rather to allow map/geometry editing to be done dynamically in-game, to create fun gameplay and an elegant engine.The engine supporting the game is entirely original in code & design, and its code is Open Source (ZLIB license, read the docs for more on how you can use the engine). While you’re at it, you should check AssaultCube too.

The Battle for Wesnoth is a Free, turn-based tactical strategy game with a high fantasy theme, featuring both single-player, and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, or take hand in any number of other adventures.

Glest

Glest is a free 3D real-time strategy game, where you control the armies of two different factions: Tech, which is mainly composed of warriors and mechanical devices, and Magic, that prefers mages and summoned creatures in the battlefield. Glest is not just a game, but also an engine to make strategy games, based on XML and a set of tools. A few mods already exist.

UFO: Alien Invasion

It is the year 2084. You control a secret organisation charged with defending Earth from a brutal alien enemy. Build up your bases, prepare your team, and dive head-first into the fast and flowing turn-based combat. UFO: Alien Invasion is a squad-based tactical strategy game in the tradition of the old X-COM PC games, but with a twist. Our game combines military realism with hard science-fiction and the weirdness of an alien invasion. The carefully constructed turn-based system gives you pin-point control of your squad while maintaining a sense of pace and danger.

Extreme Tux Racer

Extreme Tux Racer is an open-source downhill racing game starring Tux, the Linux mascot. It follows in the path of Tux Racer and its derivatives.

 

This list is not set in stone and I’ll try and update it with some personal comments for each game that I’ve played and possibly more media and links, as well as add games that should definitely make this list but I somehow missed them, thus, if you have any notable mentions that you feel I shouldn’t have left out please feel free to let me know with a comment.

Tagged with:
 

 

Qt Creator

Leading rant:

Inspired by this post(read it because I am going to reference it) on the Wikitech mailing list I was inspired to write about Qt Creator, the IDE that I use for about an year now for almost any kind of C/C++ project and which I think it is pretty close to being a type 1 Integrated Development Environment, as written by Paul in that e-mail, which is a real and useful IDE, at least for my use cases. Qt Creator is a powerful and flexible IDE most useful for C/C++ code and especially when used in combination with the Qt SDK. However, due it’s extreme flexibility, Qt Creator can be tweaked to work with almost any kind of C/C++ source project, from the default qmake project files to CMake, GNU Autotools(the GNU Build System), standalone Makefiles or even custom commands for direct access command line steps for direct compiler and linkage directives.

While I prefer type 2 IDE’s for most of the day, which are powerful text editors like Vim for casual hacking or minor code modifications, which VIM excels at, especially with its modal mode, delving into an entirely unknown code base(especially a big one) or using new libraries and apis or for long coding sessions, in a simple text editor, even as powerfull as Vim or Emacs, things start to get inconvenient pretty easily and you will notice a slow down, mainly because of the poor code browsing, syntax highlighting(C++) and code completion capabilities that they posses. They are not to be blamed though and there’s also nothing wrong with them, they are simply text editors and not IDE’s. Since Vim is my favorite text editor, I tried various combinations of Ctags and CScope and all kinds of crazy hacks on top of that, just to be able to have code nagivation and code completion at least to some extent. You can find my Vimrc file in here, without Ctags and CScope, since that would make for entire post by its own.

However, I got tired of it after some time, especially because it doesn’t work that nice with some of the crazy quirks that C++ for e.g. exhibits and because I have to keep the databases that those tools use up to date frequently and manually, for every project that I am working on. For terminal only access, coding like this is fine, to some extent, however, this seemed really overkill on my desktop, especially since I am running an X desktop with a GUI and knowing that I could do better to be more productive in 2011.

Ok, let’s take a first look at how Qt Creator looks like in action, since I know I made you curious by now:

Now I’m going to list some of the strongest points and features that Qt Creator has and that I think make it stand out:

  • Open Source – https://qt.gitorious.org/qt-creator
  • Cross Platform – Works on Linux, Windows and Mac OS X like a charm
  • Actively developed and improved
  • Strong orientation and support for C/C++ native development
  • Excellent syntax highlighting
  • Magnificent code browsing and navigation in combination with useful and customizable keyboard shortcuts
  • Great and generic(works with any file you include, it doesn’t have to know anything special about it) code completion support
  • Easily customizable and Extensible through plugins
  • Support for integration with various Source Control Management tools like Git, Subversion, Bazaar, Mercurial, CVS and more.
  • Debugger integration with both GDB and Microsoft’s Debugging Tools for Windows through CDB (this one could use some improvement but it’s still better the debugging from the command line)
  • Custom configure, build, clean and deployment steps
  • Integration with tools like Valgrind
  • Per project settings
  • Vim editing mode
  • Code snippets
  • A pretty fast IDE, even when indexing hundreds of files with hundreds of thousands lines of code for the first time
  • Linux Man Pages context help integration – thanks to the flexible Qt Help System, this can be extended to almost any API

Although I only listed what I like the most on top of my head, Qt Creator has many cool and useful features and the only way to experience them all, is to start using it and you really should give it a spin, because as you can see, it’s feature list is nothing close to short. You can find some videos that show you some of the features I described above in action on Youtube, but keep in mind that they are kind of old(around 2009) and Qt Creator has very much evolved a lot since then.

The how to:

Now let’s get to the main purpose of this post, using Qt Creator with GNU Build System projects. A project that follows the GNU Build System usually is composed of a configure file and several other inputs(configure.ac, Makefile.am) that help in creating the Makefiles that will build the actual project on the target platform. The GNU Build System is, of course, much more then that, but for this tutorial, that’s all you need to know and because these steps will also work for projects that have only the Makefiles for e.g.

Next I’m going to show you how easy it is to use Qt Creator with the Nmap security scanner based on the steps outlined below:

  1. Download and install Qt Creator from https://qt.nokia.com/downloads. At the time of writing this, I’m using Qt Creator 2.2.1. I’m going to assume you’re going to be using Linux from now on, any distro should be fine as long as you are comfortable with it, however, I am using Debian(Squeeze). If you can’t make up your mind, just use Ubuntu. For Mac OS X and Windows steps should be similar.
  2. Decide on a project to use. I’m going to use Nmap since that’s what I’m working on currently and because it is the perfect example of a great open source project that’s low level enough to illustrate system programming using Qt Creator. You can download the latest version tarball from https://nmap.org/download(nmap-5.59BETA1.tar.bz2 is fine). After deciding on a project, you should install all of the development dependencies(the toolchain) that your chosen project needs, like the right compiler, libraries and other tools you might need. For Nmap, for e.g., we will need gcc, openssl libraries, libpcap, perl, python, etc. If you’re on a Debian like distribution(Debian, Ubuntu), luckily you can just do apt-get build-dep nmap and you get everything you need in one shot. If you do some tests builds from the command line, remember to clean the source tree before proceeding to the next steps, since you only want to add to the project only the base files and none of the auto generated files from the build system.
  3. Assuming you installed Qt Creator successfully, open it and go to File -> New File or Project -> Other Project and click on Import Existing Project. Advance to the next screen.
  4. In the current screen, give your project a name(that name will be used for your project files too so don’t go crazy with spaces or special chars) and select the location to your project source tree. In the nmap example, Nmap is a good project name and for Location browse to the path where you extracted the nmap source archive. Click on Next.
  5. The next screen, Project Management, is going to ask you if you want to use source control management(git, svn) for your project and if yes,then the project files will be the first to be added to the project. You should add these files to the scm repository only if you know that they would be usefull for others, otherwise you should keep them to your self, by using exclude directives like .gitignore files in git or svn:ignoreproperty in svn.  For the Nmap case, the project files are:
    • Nmap.config     – Project configuration settings like predefined Macros
    • Nmap.creator    – Qt Creator settings
    • Nmap.files         – A listing of all the files included in the project
    • Nmap.includes – Include directories
    • Nmap.creator.user – This one is excluded from adding to svn since it stores per user project settings.
  6. Assuming everything went fine, you should now have your project open in Qt Creator and ready to proceed to project settings. On the left side of Qt Creator click on Projects. Right now you’re looking at the Build Settings screen. This is where you set your project building and cleaning steps. For Nmap, the building process is made of the configure step and the make step. The clean process is made of the make cleanstep. Let’s add these steps to the build settings:
    1. On the Build Steps section click on Add Build Step -> Custom Process Step. Click on Enable Custom Process Step checkbox and add the following command to the Command: text box: ./configure. Move this step to the top of the stack by clicking on the upper arrow that fades in when you hover the build step. This step, the configure process, can only be run once and then disabled, since you don’t really need to run it again unless you run make distclean or modify the build system.
    2. Now expand the Make step and deselect the all checkbox in the Targets section. We don’t need that argument for Nmap, since Nmap’s Makefiles doesn’t have an “all” target. Now all the make step will do is issuing the make command.
  7. Now let’s proceed to the deployment steps, the Run Settings tab next to Build Settings, assuming that you would want to run Nmap in a basic form after a successful build just to know that everything runs smoothly. However for most cases, with tools like Nmap that have dozens of command line arguments you’re better of with running from an external terminal window, instead of modifying the arguments all over again in Run Settings when you need them changed. For this case, we’ll just want to run nmap with the version argument, ./nmap -V:
    1. In the Executable: text box input ./nmap.
    2. In the Arguments: text box input -V.
    3. Enable the Run in Terminal checkbox.
  8. Switch over to the Edit mode on the left sidebar and press Ctrl^Shift^s to save your changes and start Building by pressing Ctrl^b.

Wait for the build to finish and you are ready to run your executable by pressing Ctrl^r. In Nmap’s case you should see a window popping with Nmap version output:

That’s it! This is how simple it is to use Qt Creator with a project like Nmap, that has nothing to do with Qt or qmake whatsoever, all you need to do, is know a little bit about the specific project’s build process and toolchain and describe them to Qt Creator as build steps.

I’ve been using this process on many non Qt projects like John the Ripper, skipfish, VCMI(Heroes 3 oss clone), GNU Coreutils and many more besides Nmap, of course, projects which are in both C and C++ and all I can say is that Qt Creator helped me a lot in the cases where a text editor didn’t(and shouldn’t try to) excel at. None of the other choices available as free and open source IDE’s out there could match Qt Creator in my opinion and I really hope that the Creator will continue in the same manner it has so far, free and open source, cross-platform, actively developed and supported, flexible and not locked to the Qt framework. Here are other alternatives to Qt Creator that I’ve used in the paste and still use from time to time for specific certain tasks that they do well besides Qt Creator and adhere at least to the open source, cross-platform and good for native development rules:  KDevelop, Code::Blocks, Anjuta and Geany (no, I’m not going to mention Eclipse and Netbeans since they are not that good for native programming).

All in all, Qt Creator is a great IDE for general C/C++ development and even if it can’t currently beat the behemoth that is Visual Studio in certain aspects, it wouldn’t even be fair to compare them until Visual Studio will strive for cross platform compatibility, multiple compilers and debuggers support or the ability to use multiple revision control systems.

Give it a spin, you won’t regret.

Tagged with: