[UPDATE: RELEASE DATE] Folders, Files and Archives (#13)

Oct 29, 2021

— UPDATE —
The next update will be released on Wednesday 23.11.2021 - 7 PM CET


It is time to announce the next big change coming to hackero! I normally try to give monthly updates to give you an insight into what progress I'm making. This time it is a little bit later than expected, things came a little bit out of hand and my work just smashed my plans. But I guess it is now the right time to show you some things:

Folders and Files?

Folders and Files are the heart of hackero. They are structured in something that I call filesystem. The filesystem is responsible for storing all your binaries, images, music, and clues you find while discovering more and more NPCs, Players Servers. You could almost say the file system is a kind of inventory. Or better said, it is more like an unlocked chest on a Minecraft server where your friends keep stealing things until you notice. Isn't that the primary goal of hacking games in the first place? Stealing hard-earned diamonds?

Anyways the filesystem stayed pretty much the same since the beginning of hackero, everything just resides in the root directory. Well not anymore since it is time to reveal the new filesystem!

Like many elements in the game, the file system is based on the one known from Unix-based systems. I've shrunken it down to focus on the necessary things and not generate clutter and things are more simplified, but anyone who has worked with Linux will quickly feel at home.

First draft of the new filesystem

What has changed?

Binaries will still reside in /bin, there's a new directory for configurations in /etc and your stuff will be in /home/$USER/ in the future. /tmp is there for more detailed but temporary reports and /var is a mystery just like in Unix systems ;)

A users home directory

Some directories have changed as well. Downloads and uploads for example are now in a user's home directory. Logs are placed in /var/logs/ by default and /www is now in /var/www/.

In the future, I plan on using the extended filesystem for better riddles and more hidden things. It also has a different side effect, it now takes more time to look through a filesystem, which makes visits to other servers more dangerous.

Configurations

"With great power comes great responsibility"

This is something people in IT often say when it comes to administrative privileges. It is nice to be able to change some aspects of a system but setting a wrong config flag can render whole services useless (just look at what happened at Facebook). That's why I'd say it is a good idea to add more configurations to the game. Config files are now more distributed. user-specific configurations are placed in the user's home directory while global configurations are placed in /etc.

For now, there are only a few services that offer configurations. One of them is the webserver. It now allows to change the webroot of the system (e.g. from /var/www to /spacecows_new_root/). That way multiple webpage contents can reside on one server and can be swapped easily.

cdsdscds
root: /spacecows_new_root/
File: /etc/webserver/default.yaml

Logging is now also configurable. You can change the default logging directory and even set custom logging directories for specific logs to make things even more complicated.

logPath: /.hidden/logs/
apps:
  system: /var/.important/logs
File: /etc/sys.yaml

For example this example configuration collects all logs in /.hidden/logs/ except the system.log which is  saved to /var/.important/logs.

Editable NPC Websites

Most websites of NPCs can now be overwritten. This is done by changing how .html files are protected.

Because of security reasons, it is currently not possible to directly edit a .html file. Since its content is parsed as HTML in another player's browser this would lead to security problems like XSS attacks. Fortunately, there's a different way of making websites with markdown. since .md files are prioritized over .html files adding a index.md file to an NPCs webroot will display this file instead of the index.html file.

Of course, you could advertise your own websites, post links to other sites, show nice notes, etc. However, since NPCs get reset after 30mins your changes will be reverted after this time so you need to get back and change it again.

Since the webroot is now editable and with .html files can be interacted just like with any other files except you can't edit them, you can now get these files and mirror complete pages. just grab the .html files download them and upload them to your webpage. and voila you have your very own fake NPC!

Fake NPC mywhois.io

With the help of host entries, you can redirect a player's request to your own secondary server which then just looks like the original one.

Transfer larger amounts of files

Right now when a player wants to transfer files from one system to another, it is necessary to download/upload every file separately. In the future, there are archives you can use to bundle files together. this makes it very easy to get the content of a whole website or get a server complete /bin directory.

A zipped archive

Custom Shops

Yes, it is finally happening! You can create custom shops! Custom shops can be used to earn money, sell better software (licensed or unlicensed, containing viruses or without). You can even sell whole archives there, nice backgrounds you uploaded, lists of IP Addresses, etc.

You can either create your own server identity or mimic an existing one's look and feel. the choice is yours!

Shops heavily use the new configuration system. you can completely configure your shop and its products by using configuration files. By creating the /etc/shop/default.yaml file you can specify the payment information on where money earned on purchases is transferred to:

payment:
  bank: hipsterbank.com
  account: 945589345
File: /etc/shop/default.yaml

A shop can only handle a maximum amount of products corresponding to its verison (e.g. version 0.1: 1 Product, version 1.0 10 Products, etc.)

Every product is registered in your shop by adding a product file to your products directory:

title: my server config
description: get my servers config to make one that just looks like mine
price: 10
file: /var/things/config.json
File: /etc/shop/products/serverconfig.yaml

This example product is selling the server's config.json file for $10. The file specifies the path to the file which should be offered.

Shops are controlled by a new CLI command which is called shopd. It offers two subcommands shopd check which checks your configuration for syntax errors, and shopd reload which starts a job that refreshes your products. I'd love to get some feedback on this if this is usable and on how to improve this in the future!

After running shopd reload and ending the job your shop now presents your products:

custom shop with custom product

Now other players can create accounts and buy things just like in other shops.

Some Summarizing Words

To make all of this possible I had to do some refactoring on the game's server code. Earlies all the games logic was split over API routes. Jobs were located in the service which would handle jobs. and code for game binaries was spread all over the code of the game. Also, the interfaces were quite nasty since it used map[string]interfaces{} a lot which made it difficult to work with. I've put a lot of work into making nicer interfaces to speed up development. without these changes, it would have been very difficult to implement configuration files and handle them accordingly. I'm very happy that I've finished that, and I can stay productive.

These last words I'd like to directly address to you all. When I started hackero I've been a little bit naive about what will come. I remember when I sat in my mom's garden in summer, I had just finished my Bachelor Thesis and just began working on the first ideas. Just because I wanted to play hacker experience but couldn't. In the last two years, we've grown a little community with a few hundred members. And all of that without any kind of marketing or adverts just by growing naturally and a few posts on Reddit.

Today I'm not sitting in my mom's garden anymore, (also because my old mac just does not work for development anymore). I've settled, covid has hit the world and I'm still working on it. I'm putting the majority of my spare time into development, which is estimated at 20hrs a week in addition to a 40hrs week at my primary job. Just in the last three months, my development instance counts 292 hours and that's just the time the server was working and running. But since I'm doing all of this in my spare time things might take longer than expected and when my work completely crashes my week there might be very little progress. I know that some people are very frustrated because they have been waiting for a while now for a key. Some people signed up a year ago and still did not yet receive their keys. I appreciate that you are still waiting patiently. The invitation waves are getting bigger with every update, more people get their invitations and I expect everyone to get their invitations within the next 2-3 releases. Therefore I'm still working on it and I'm not trying to scam anyone. I try to keep everything as transparent as possible. There's no need to pay for anything, and I'm not planning any paid gameplay-related features. But still, servers, domains, mail accounts, etc cost money and I appreciate it when people like to support my work. That helps me to keep it up and keep hackero ad-free in the future.

To better visualize the progress here are some older screenshots from the last blog post in comparison:

Anyways it is time to get back to work I'm still squishing bugs, and getting some things ready. I'll post another update with a release date soon. That is all from my side now! Thanks for your trust and for beeing part of this!

Tags