A blog showcasing the nerdy side of my life . Now I'd like to take a minute, just sit right there and I'll tell you how I became the prince of a town called Bel Air.

PHP Framework Released!

I created my own PHP framework during my time as a software engineer for a few of my projects, and this blog you're currently viewing. Because using this framework has been such a success - I'm releasing it. I'm calling it RadicalPHP. Why this name? I thought of RAD (which is an abbreviation of Radical Application Development) and radical just came to mind...

The framework is available on GitHub here


University dissertation

Since a lot of work and effort went into this, and it doesn't break any university policy... I'd love to share it.

pdf


Document Management System model coding

I've taken a very communist approach to the design of my code, specifically the models. I'm trying to keep the functionality as dynamic as possible so it's easy to work with in the future. I'm unsure if I should keep the create function as static or not... or it should be moved to a separate class since this code may break the single responsibility principle?


Raspberry PI 4!

pi 4Since I loved the Raspberry PI Zero - I decided to buy the Raspberry PI 4. It is 4GB in RAM with a decent enough CPU. This thing is tiny so it doesn't take up too much space. It can be turned into absolutely anything you want... from a security system with a camera attached to a NAS drive. With the 2 USB 3 ports - expect good bandwidth.

If you're into IT and technology but you don't know how to use Linux... get a Raspberry PI! they come with the Linux distribution called "Raspbian", which is based off the well-known Debian distro. Having the ability to say on your CV that you have knowledge of Linux really does improve your prospects since many organizations run their services off systems that are mostly operated by Linux.

Knowledge == power.


A document management system to suit all needs

Bespoke software is great and all... but is often limited to having only one purpose. I have been developing a document management system that is highly configurable to a point that it suits the needs of every business and organization, utilizing the power of software development. The management system is not limited to the functionality it ships with. For example - When uploading a document... You will be given the option of setting the title, revision, category, native and PDF of the document. What if a company wants a description? instead of learning how to code to implement this... they have the ability to add it themselves through some sort of settings page. That's the vision.

I plan to implement a very powerful search functionality that allows you to narrow down your search on the fly as you set filters. A plugin system would be cool, allowing developers to code plugins and share them to each other, similar to Wordpress.

The login

dms login

The software has made a lot of progress so far, being developed on top of my custom made PHP framework. Before release - the software will undergo intense penetration tests such as SQL injections, XSS and CSRF attacks and more, ensuring the security of the system is strong and there's no way to exploit the system for malicious intentions.


Bypassing Antivirus software

It should be noted that this is purely for educational purposes. You need to know how malicious software like this works if you are to protect yourself from it. I'm not responsible if you use this and get nicked.

If you think your antivirus software is protecting you... you're wrong. What you have to understand about antivirus software is that it's very dumb and easily fooled. What it does is... it scans a file and compares the structure of the file against known malware within a database. It simply looks for similarities. How can we bypass a similarity check? the answer is encyption!
crypt1
On the right shows a screenshot of a small C# project containing code that grabs malware (could be spyware, keylogger, ransomware), encrypts it using the SHA algorithm and hides it inside itself. It looks like a normal program once compiled... but it's not. There are two key files here;

  • Stub.cs
  • Loader.cs
Stub.cs is the payload. This is what stores the encrypted malware. Loader.cs is the first thing that runs. When executed - Loader.cs installs itself to startup, decrypts the SHA encrypted payload and executes it within memory. This means the malware doesn't even touch the hard drive and many Antivirus software out there don't even scan memory for malicious code.

Below is the key element of Loader.cs. This code tells our Stub.cs to decrypt, compile and execute within memory. The malware is compiled with unique assembly information and structure, making it different every time. This means our malware is persistent. Even if Antivirus does manage to detect the malware... it'll just compile and run again when the computer is restarted.
crypt2

Below is the code within Stub.cs. This is the decryption and execution process. The payload is first converted into a byte array, decrypted then executed. Simple...
crypt3

And after scanning the encrypted malware, we get 0 detections, successfully bypassing Antivirus.
crypt res


Quantum computing

With quantum computing over the horizon - there will soon be demand for quantum programmers. Eventually, quantum programming will be the norm... in about 40 years. But knowledge is power and the early bird gets the worm and those who snooze loose.

In a nutshell, quantum computing works like a normal computer... just more science fiction. A normal computer sees 1's and 0's (binary) which are known as bits. You're either a 0 (off state) or a 1 (on state). In quantum computing - we have qubits. You're either a 0 or a 1 or both, known as a quantum state. This derives from the Schrödinger's cat paradox. The future of computer science isn't just computing... it's also quantum phsysics... so better brush up on some physics if you want to stay ahead.

Quantum computing will change the world when it arrives. Cryptography and cybersecurity will evolve massively due to how powerful and fast a quantum processor will be. An RSA encryption with 4096-bit keys will be cracked in a matter of seconds if not milliseconds, so if you think you're safe using military-grade encryption to protect your data and privacy... better think again.

The way in which we use the internet will even change. Forget 5G internet... we'll be teleporting qubits using quantum teleportation. This is some Dr. Who stuff...

Microsoft were one of the first to dive straight into quantum programming with their new language Q# which is right now used for expressing quantum algorithms, which I've been learning on and off for the past year. However, other languages have already started to evolve, preparing for this change in the world. Below is a piece of Golang code which generates a qubit and teleports it, and calculates the probability of the qubit being a 1 (on state).


package main

import (
"github.com/itsubaki/q"
"fmt"
)

func main() {
qubit := q.New()

// generate qubits of |phi>|0>|0>
phi := qubit.New(1, 2)
q0 := qubit.Zero()
q1 := qubit.Zero()

// normalize |phi>. |phi> = a|0> + b|1>, |a|^2 = 0.2, |b|^2 = 0.8
qubit.H(q0).CNOT(q0, q1)
qubit.CNOT(phi, q0).H(phi)

// Send mz & mx to Savile
mz := qubit.Measure(phi)
mx := qubit.Measure(q0)

// Apply Z and X
qubit.ConditionZ(mz.IsOne(), q1)
qubit.ConditionX(mx.IsOne(), q1)

// Savile got |phi> state. Store in res variable
res := qubit.Estimate(q1).Probability()

// Print result to console
fmt.Println(res)
}


Android game release

gameSometime last year in November, 2018, I participated in a 1 hour game development challenge using the Unity3D engine and C# for the logic.

The game had to be small, but fun - so a puzzle game was the first to come to mind. I personally enjoy the games that confuse you, so this is the type of game I decided to develop.

The result was posted to Google and was successfully placed on the play store. It is free and can be downloaded from here.


Blog software release

Not too long ago, I decided to create this little blog to showcase the nerdy side of my life. There's a lot of free blog software out there, but the beauty of being a software and web developer gives me the ability to just create my own, making it look and function exactly the way I want it to.

Because it's so lightweight and simple-to-use... I thought others would like to use it too, so I'm releasing it for free ¯\_(ツ)_/¯. Why not . Go here and grab it for yourself.

It is developed in PHP, using PDO to properly prepare SQL statements, and typed properties to prevent any SQL injections. It also makes use of tokens upon authentication to prevent cross-site request forgery (CSRF) attacks, so rest assured there are no security holes... *cough* Wordpress

Requirements

  • PHP 7.4+
  • Apache (with mod_rewrite)


Golang is awesome!

golangAfter a few weeks of learning Golang... I've reached the conclusion that it's awesome, I totally love it.

This is absolutely perfect for microservices. I coded an HTTP server using only 15 lines of code. From here, I could expand and implement routing to serve dynamic content much like Node.js... but what's better here is... it's native! whatever you develop can be deployed natively on Windows, Mac, Linux, Android, and IOS into a single executable! the performance of what you build far outweighs other languages.

Golang seems to be a combination of the C++ syntax and a more friendly syntax like JavaScript. It is as if they both had a baby together. I will for sure continue learning this.


package main

import(
"fmt"
"net/http"
)

func main(){
fmt.Println("Server started on port: " + settings["port"])
http.HandleFunc("/", serverReply)
http.ListenAndServe(":"+settings["port"], nil)
}

func serverReply(w http.ResponseWriter, r *http.Request){
fmt.Fprintf(w, "%s", "Port is: "+settings["port"])
}


Golang will become highly demanded

golangGolang has been around for some time now and has caught my eye only recently.

Personally, I like the languages that are cross-platform, lightweight and fast to setup, like PHP and Nodejs. Golang is the same - but what really interests me is the fact that not only is it cross-platform, lightweight and fast to setup... but also native!

Native languages like C++ and C are very powerful but can sometimes be a headache to work with. I have been self-learning Golang and it brings a very nice syntax to the table, making it pleasurable to work with. The language can be used for web development, game development, and applications. I see this language as having huge potential and a strong future.


Why I switched to Linux

Over the years, I have grown to really dislike Windows as an operating system to a point where I've removed it entirely from my hard drive.

The biggest problem I have with Windows... is the bloatware. Does anyone even use Cortana? the AI that just sits doing nothing, eating your RAM. There's also advertisements on the start menu that likes to put a bit of stress on your GPU.

Secondly, the updates that don't ask for permission. During my university days; I was working on my dissertation making big progress to the word count in the library. I went to the toilet and came back to a nice blue screen on my laptop saying "Windows is working on updates. Don't turn off your computer" . I had lost all of my progress, and as a bonus - Windows had reinstalled all of the bloatware I had removed before.

Thirdly, the malware, the spyware, the bitcoin miners, the keyloggers and the ransomware. Now there's a reason cybercriminals target Windows operating systems... because they are easy to exploit, and Windows is the most used OS in the world. It is unbelievable how easy it is to bypass AntiVirus software with a bit of encryption.

Lastly, it is overpriced. Especially considering everything above.

Right now, I use Linux and only that. I use it on my personal laptop, computer and my personal server which I use to host my websites and cloud service. I do not get bloatware eating my CPU and RAM, or updates without permission. Malware finds it very difficult to attack Linux since it needs root access, and root access isn't easy to get without good social engineering. I find developing software and websites so much easier since Linux provides an amazing development environment. Last but not least it's free and always will be.

In the past; I never understood why people don't just switch to Linux - but now it's quite obvious. It is in human nature to be scared of change. Windows is what people have been using since 1995 and Linux just doesn't fit into their comfort zone. Also, gaming can be a big pain with Linux since most game developers target the most popular platforms.

To finish the rant... recently, I've been seeing some massive changes to compatibility issues with Linux. Unity3D is now available for Linux! I can now make progress on one of my personal projects without having to switch computers.

Game


Raspberry PI DNS level adblock

I recently bought myself a Raspberry PI Zero and it's an amazing little device. At first, I attempted to turn it into a NAS drive, since I have a lot of external hard drives sitting around gathering dust. Unfortunately, the PI was too underpowered to handle the bandwidth that I was expecting.

I came across a cool little project called "PI Hole". Pi Hole is a DNS level adblocker. In simpler terms - it blocks those annoying advertisements you see on websites, youtube and social media.

PI

So far, it's been amazing.


Java libGDX 3D framework

I have been using the libGDX API in Java for some years now, creating small 2D games as a hobby. Some months ago, I decided to start getting into the 3D side of things, but this area seems to be very undocumented and the development community doesn't seem to be much focused on it.

I decided to start my own libGDX 3D framework (which can be found here) in an effort to solve the problems that I saw within the 3D API, making it easier to use for me and for everyone else. Everyone loves the entity system within the Unity3D engine, so I decided to go down this route. The framework has been a complete success so far, implementing a first-person controller, skyboxes, and lighting. However, implementing physics such as rigid bodies and collision detection has proven to be a challenge.

Contributors are totally welcome to help tackle this problem since I'm very eager to have this thing released for game developers.

Game


First time using a recursive function

I use JavaScript within my job on a daily basis and have never once used a recursive function as a programmer. I learned the concept during my university days, but never actually thought I'd ever use it in the real world.

The challenge here was to parse a JSON file containing objects, and each object had its own child object. Now obviously the first thing that came to mind was to use the basic for conditional iterative method to loop through each notation, but this method would require you to know how many children each notation has.

Thanks to the 12 hours of studying and brain power, I finally fully understand the use of recursive functions!

recursive



LewyBlog - Blog software created by Lewis Williams