Ethernaut Part 2 – Fallout and CoinFlip

(This is a continuation of http://www.carlellis.co.uk/2018/10/31/ethernaut-part-1/) Level 2 – Fallout All you are given is a contract, and a hint about the Remix IDE. I didn’t end up using Remix for this level, but the contract is as follows: pragma solidity ^0.4.18; import ‘zeppelin-solidity/contracts/ownership/Ownable.sol’; contract Fallout is Ownable {   mapping (address => uint) allocations;   /* constructor */   function Fal1out() public payable {     owner = msg.sender;     allocations[owner] = msg.value;   }   function allocate() public payable {     allocations[msg.sender] += msg.value;   }   function sendAllocation(address allocator) public {     require(allocations[allocator] > 0);     allocator.transfer(allocations[allocator]);   }   function collectAllocations() public onlyOwner { […]

Ethernaut – Part 1

I recently came across Ethernaut, a game about finding issues with Ethereum smart contracts and breaking them. I do enjoy a capture the flag and I know practically nothing about smart contracts, so it seems like a fun thing to attempt to chip away at. I’ve currently managed to do the first two challenges, the […]

Projected DnD

So I wanted to build some interactive play maps for when running DnD games, so that I could hide rooms automatically and create a more involved experience. I already had the hardware to build this system, and combined with some JavaScript it was not long until the players were running the DnD starter set adventure on […]

Stripe CTF 3.0

Sadly, level 3 would not run for me, even with Stripe’s patch, so I could not continue with the competition. It was fun while it lasted though – C Wednesday saw the beginning of another Stripe CTF! This time I was in London when it started so I went to the launch meeting with some […]

A Fractal Height Map Generator in Ruby

[I’m migrating my old articles to the blog in order to switch to it entirely] Date: 25th March 2010 Introduction This article describes the theory behind, and how to implement, a basic fractal height map generator. It is based upon the algorithm defined at http://gameprogrammer.com/fractal.html. Height maps are used in many things: positioning software, graphical […]

Stripe-CTF 2.0

I managed to finish the Stripe CTF with 18 hours to spare and placed no. 702. I’m pretty happy with the result considering how little time I actually spent on it! My progress can be found here and you can see when I took days off! Overall the competition was really enjoyable and the final […]

Android Maps and Routing

Very quick one here. I’ve been trying to mapping, especially routing, working on an android application I’m developing. I will save you a lot of trouble and tell you to use the inbuilt Google services. In fact, I found a gem of a post at http://smartandroidians.blogspot.co.uk/2010/06/showing-route-through-google-map-in.html which shows you how to open an intent for […]

SlimDX and Shaders – Constant Buffers

Setting up Having played with a few GLSL shaders in C++, I thought that moving to a DirectX/HLSL solution sould be fairly simple. Creating the most simple pixel shader was easy enough, and SlimDX is a decent wrapper for DX in C# – so after an hour or so I had the standard working triangle […]

Arduino Gas Meter Sensor – Part 1

Motivation My newly ordered Arduino Uno came in the post today so I got to start building with it! An upcoming sensing deployment needs a way of sensing gas usage, so I’m building a basic sensor to measure it. Luckily, most gas meters have an LED pulse which goes off every so often and we […]

JSXGraph

I found this cool graphing JS library which has a wordpress plugin! It’s called JSXGraph and is rather nifty!. Here is an example graphs showing Facebook users over time. var brd = JXG.JSXGraph.initBoard(‘box’, {boundingbox: [-50, 900, 3000, -150], keepaspectratio:true, axis:true, grid:0, showNavigation:false}); brd.suspendUpdate(); //Points for graph var p = []; p[0] = brd.create(‘point’, [0,0], {style:6,name:””}); […]