Removing a stuck bullet

It happened – I forgot to check a cartridge for powder before seating the projectile and I ended up with a squib load, and a 140grain powder coated hard cast lead projectile stuck right in the middle of the 18″ barrel on a 6.5×55 Swedish Mauser.

Here’s how I got it out.

I bought a length of 6mm diameter rod, cold rolled steel ($4.40 for a 6m length from my local steel yard), which I cut to an appropriate length for the barrel. The end was squared, and then chamfered slightly to remove any sharp edges. I then wrapped the rod in a single layer of masking tape. The idea is to have the rod fit the bore as tightly as possible so the end can’t impact the rifling of the bore. The smooth surface of the rod, even if it does scrape against the rifling, is unlikely to do damage. The addition of tape in this case served two purposes – one it provided a bit of padding to give extra protection, and two it increased the OD of the rod sufficient that it stuck nicely in the bore – firm enough to engage the rifling and rotate with movement, but still able to be moved by hand.

I had sprayed some inox (a penetrating lubricant spray kind of like WD40, except it’s a much better lubricant) from both ends and let it sit to try to penetrate around the projectile. I also squirted some motorcycle chain lube from the muzzle end. Someone had suggested oil stabiliser as a good lube (apparently also a good case lube for full length sizing). From their description, it sounded like the tacky motorcycle chain lube was similar.

Inserting the rod from the breech end and strapping the rifle into a rest, I had to give it quite a few hard, sharp blows before the projectile finally broke free and started moving. After that gentle taps were all that was necessary to move it along.

Here’s some other things I tried before which didn’t work:

  • Tapping by hand from the muzzle end with a cleaning rod
  • Plugging the hold in the end of the cleaning rod with a chopped off and squared brush, then tapping out with a hammer from the muzzle end. All this ended up doing was indenting the nose of the projectile. Same from the breach. It also bent the cleaning rod
  • Firing an empty, primer only case. I belled the mouth of a fireformed case to seal the chamber. Didn’t move the projectile at all. When opening the bolt there was a small hiss from a pressure release, so it did seal. Maybe with some powder in there it would move, but I had read plenty of forum posts warning against that, since it could potentially bulge the barrel (bullet gets a bit a run up from the chamber before engaging the rifling, so requires less pressure to drive it through)
  • There were lots of horror stories of people using wooden rods which splintered and then jammed in the bore. I didn’t even consider trying a wooden dowel.

So, if you’ve got a stuck projectile, I’d recommend going straight to using some cold rolled steel to hammer it out, after lubricating the bore with a nice tacky lubricant. Better yet, check carefully when reloading to avoid squib loads.



Missing font cryptolocker malware

I had an interesting and I believe novel crytolocker campaign today. It started out with a lot of users receiving alleged copyright infringement notices, stating they had used copyright material in classroom environments (targeting .edu users, obviously)


The email had a .zip attachment, containing a PDF. A lot (maybe 5%) of recipients were suspicious and let us know, which initially made us think the campaign was a lot larger than we thought.

Running the .zip and .pdf through virustotal and malwr was puzzling though – no result at the time.

Opening the PDF I could see no network traffic. It just opened and displayed, albeit showing a warning about a missing font.


Initially we thought either highly advanced 0day, or bungling crooks who forgot to include exploit code, however we soon had a report of cryptolocked files that correlated with a received email. Further investigation and talking with other techs flagged the missing font, which lead to searching for that missing font:

The second result is the compromised site serving malware

The second result is the compromised site serving malware


So the exploit was actually in the font, which you had to google search to find!

Malwr failed opening the zip file. Not sure if this is by design or a happy coincidence for the malware writers. Virustotal finds the malware though.

I find this pretty cool – at a guess the font website with decent google rankings must have been compromised at some point, after which the PDFs were crafted with the missing font. Exploitation rate is obviously a lot lower since the end user has to be bothered to search and then install the font, but then again coverage was a lot higher, since mail filters did not block the clean pdf attachment. Also means we may see a lot more known sites compromised and used for this sort of thing, rather than just the /sd89dens/sd89dens.exe style cryptolocker URLs we’ve seen so far.

I think we may end up seeing a lot more like this (needless to say, I’ve now blocked the entire domain)

TOZ 78 (aka T03 78) firing pin problem

Handling my new TOZ 78 .22LR bolt action rifle in preparation for the first day at the range with it, I noticed a problem – the firing pin was jamming up and the rifle would not fire. Dry firing it would either result in nothing at all, or a small click, with the firing pin moving forward slightly, but not enough to strike the rim of the cartridge. The rear of the firing pin (which protrudes when cocked, and sits flush when uncocked (i.e. after it has fired) was still protruding. Removing the bolt from the rifle and cocking by hand, the firing pin would release partially once or twice, but after that would not release at all.

Here’s the exploded view of the bolt from the manual

bolt exploded view manual

Here is the bolt, freshly assembled and uncocked. Note the position of the bushing, the edge of which is just visible under the cap, back from the hammer.

bolt removed cocked

Inside the cap, there is a pin, this lines up with a slot in the bolt handle, and protrudes through this slot and mates with the top of the bushing. On cocking, the hammer pushes the firing pin back. The spring pushes against the bushing, which is held in place by the pin inside the cap. This spring pressure is what propels the firing pin forward to strike the primer.

Here’s a picture of the bolt cocked, but jammed. Note that the hammer is off the ramp, but not forward as it should be. Note also that the bushing is no longer visible

bolt cocked jammed

What happened was that the pin within the cap was not protruding sufficiently inside the cap, which meant it did not properly engage the bushing. Instead, the bushing was slipping “under” the pin and jamming. This meant there was not adequate spring pressure to drive the firing pin forwards. The busing was stuck in place, and the firing pin/hammer were able to be manipulated forwards or backwards, with no spring pressure to resist movement.

cap pin inside

The pin is a simple press fit. There is a hole in the side of the cap’s ridge where the pin protrudes – looks like it might be a grub screw but it isn’t. Perhaps maybe there is supposed to be a locking rivet there, or the pin is supposed to be punched to hold it in place? Unsure. I was able to gently tap the pin from the outside to push it through sufficient to engage the bushing. Whether or not this will move in time I do not know – if so I may need to look at a locking mechanism – loctite 282, or perhaps punching the side to deform the pin enough to prevent movement.

Photo below shows before it was fixed. Note how the pin protrudes on the outside of the cap. Once fixed, it sits flush.

cap pin external

Lenovo x230 quick review


Lenovo x230

Here’s a quick and dirty review and notes on installation of my new Lenovo X230.

Here’s the key specs:

  • Lenovo x230
  • Intel i5-3320m processor
  • 8GB RAM
  • IPS screen upgrade
  • backlit keyboard upgrade
  • Intel AGN wifi
  • 500GB 7200 RPM hard disk
  • 120 GBIntel 525 mSATA SSD (purchased separately)
  • 9 cell battery
  • Weight in this configuration (excluding power adapter) is 1.73kg (3.8lbs if you must). Power adapter is approx 350g.

(Weight was taken after Linux was installed – all those extra bits might add up to an ounce or two)

Total cost was AU$1205 + $AU 184 for the SSD in late May / early June 2013

Windows 8 came installed on the 500GB hard disk. I shrunk it down to around 100GB which left approximately 370GB free for installing linux, in addition to the 120GB SSD. SSD installation was fairly straightforward (although I am an electronics repair technician). A number of screws to be removed from the bottom cover, lift the keyboard and then palm rest off and install it.

I have a DC car charger on order, as well a neoprene sleeve and mini DisplayPort adapters, all from eBay. A 270x350mm padded envelope works well as a slip case until the neoprene sleeve arrives (no, I’m not going to pay $20 for a fake one)


Installation / setup Linux Mint

Here’s how I partitioned and installed:

  • / and /home were put on the SSD, approximately 55GB each,
  • swap (8.5GB), /tmp and /var/log (2GB each) were put on the hard disk,
  • the remaining space formatted as ext4 and mounted as /pub, to be used for videos, music and other such things,
  • Linux Mint Debian Edition 64 bit (Cinnamon) installed after a few goes (live distro kept locking up during the installation process),
  • grub was installed on the SSD, and BIOS boot order was changed to boot from the SSD first,
  • BIOS changed to legacy mode

(On boot, hit F1 to enter BIOS setup, and F12 to temporarily select a different boot device).

As far as function keys etc goes, LMDE works great out of the box, nothing required except installing the necessary software, and perhaps encrypting your home drive. I made a few changes as recommended here for better SSD performance, and also installed TLP packages for better power savings

Review of the hardware itself

I’m fairly happy overall. With the 9 cell battery it is a bit bigger and heavier, but for me, well worth the trade off. I have not used it enough yet to get good battery life estimates, but operating on battery with wifi on and decent screen brightness, system battery life estimates range from six to eleven hours, which I’m fairly happy with.

As far as ergonomics goes, this is the first Thinkpad I’ve had so I’m not quite yet used to the trackpoint (my crappy work HP laptop has one, but it is very inferior to this one). The touchpad is disappointing – the left and right bottom corners act as buttons, but cause pointer movement. Even when using the trackpoint buttons (above the touchpad, so takes some getting used to), the touchpad just doesn’t feel that nice. Scrolling is software driven, so can be set for single finger right hand edge, or two finger. Two finger works better for me, as there’s less unintentional scrolling from palms while typing.

This isn’t anything unexpected, but I really wish there was a higher screen res option – 1366×768 just doesn’t cut it, especially in the vertical dimension. I very nearly bought an Acer Aspire S7-191 purely for the awesome 1080p 11″ screen. I would happily have paid an extra $100 – $150 for a higher res IPS screen on the x230.

Overall, I’m pretty happy. Certainly a nice upgrade from the ageing Asus 1201pn (old atom netbook with a completely dead battery) and old Dell Core2duo Inspiron (with about 15 mins of battery life).


12V 50Ah portable battery bank

batt bank and light bar

Here’s a portable battery bank I put together for camping and power outage use. Rated capacity is 12V 50Ah (via 3 x 12V 12Ah batteries and 2 x 12V 7Ah batteries wired in parallel). These are used freebies which are sitting at between 60 – 90% so capacity will be a bit less than rated, but for the price I can’t complain. Weight is 18kg.

The case is a Supercheap Auto safe case (found here). Cost $35, which I think is an absolute bargain, as these cases are well designed, if sometimes a little iffy on the quality control of assembly. I also bought myself one of the smaller $18 ones, which is also great value.

Batteries are a bit snug, but this also servers to hold them in place well. They are held down using lengths of 25mm nylon webbing. Small slots were cut in the sides of the case to allow the webbing to wrap around fully. Much simpler than affixing internal brackets to hold. Waterproofing is compromised, however I don’t mind this, as I would prefer the case to have some capacity for ventilation in case of hydrogen build up.

Batteries are wired using 6mm and 4mm automotive wire (what I had lying around) and insulated crimp connectors. There’s a mini blade fuse inline with the output, and a 2 pin JST SM 2.5 connector as the main output. This connector isn’t high capacity (3A max), but I will primarily be using this to run LED lighting, charge USB devices and to power ELV devices (eg plugpack replacement).

The light strips I have pictured above are simply a set of these LED light strips screwed to short sections of PVC pipe with hanging loops. Some twin core figure 8 speaker wire is used for power leads. each tube, which consists of six modules, draws around 250mA at 12V.

Another shot of the side, showing the battery straps:


batt bank


Things to improve/add:

  • 4.65mm^2 wiring and higher quality brass female spade connectors for batteries, with PVC covers
  • multiple JST SM 2.5 outputs (collectively fused at 5A) for running ELV devices and also for charging input
  • small solar panel and charge regulator, probably in a separate case
  • main isolator switch
  • terminal block / busbar to neaten up wiring
  • 50Amp anderson plug (fused separately) for heavy loads (eg inverter)
  • power switches on each light module

Once some bits and pieces arrive from ebay for the above improvements I’ll update.



Replacing lost adjustment screws on a Cartel EX target sight

The screws on my Cartel EX target sight (and everything else on my bow, for that matter) are always coming loose. I managed to lose the brass windage adjustment thumbscrew today. I’m not sure on the exact specification of it, but the thumbscrew from a VGA, DVI or other D style connector is the same thread. A handy replacement!

While I was at it, I checked the elevation adjustment, and it is a M5x0.9 thread, which is the same as the two 3mm allen head bolts holding the vertical rail/scale to the extension bar. Can’t imagine this one would be easy to lose though as your sights would drop if it came loose.

Reading files line by line in Bash – performance

I’m processing stored  HL7 message files with a bash script, and have been getting pretty poor performance (around one message per second for simple parsing, processing and outputting to CSV format). I thought I might be able to improve performance by using a different method of loading the text file.

The two methods of reading a file in line by line:
while read line ; do
echo “$line”
done < “$1”
LINES=(`cat $1`)
for i in ${LINES[@]} ; do
echo “$i”

The test:

phil@mig1:~/$ time ./ 20120821_prjBsqrPacsIn.dat | wc -l

real 0m2.708s
user 0m2.492s
sys 0m0.096s

phil@mig1:~/$ time ./ 20120821_prjBsqrPacsIn.dat | wc -l

real 0m1.096s
user 0m0.920s
sys 0m0.116s

The verdict – read the file into an array and iterate through the array – somewhere around twice as fast.

(I did actually run the test multiple times and they were fairly consistent. The script was also using the second, faster method, so I’ll need to look elsewhere for performance improvements)




Don’t even think about talking at me about motorcycle safety until you’ve read this

Let me stop you right there, mmmm-kay? I can tell by that little intake of breath what’s coming next. Thank you in advance, but I already know that motorcycles are “dangerous.” After nearly twenty years of riding on the streets, I am aware; telling me now will not be a revelation. It is not an insight into my lifestyle that has remained hidden from me until this, the moment of epiphany when you shine the light of outsider wisdom on my foolhardy choices.

Seriously, read the whole thing, hypocritical motherfuckers.

Google Chrome with proxies under Debian / Xfce

Something that seems to be a bit more difficult to solve than it should have been. Google Chrome expects to use Gnome/KDE’s network manager for proxy config. Under Xfce, this isn’t present so proxies can’t be configured in the usual manner (Options -> Under the Hood -> Network).

(note this refer’s to Google’s release of Chrome, not the chromium package)

The first step to fixing this is to launch chrome with the –proxy-server option:

/usr/bin/google-chrome --proxy-server=

If a username and password is required, Chrome seems to understand and prompt you for one. I did try the format but this didn’t work for me.

Second is to tell Xfce to use this option when launching the default web browser. I created a launcher script, then set the default web browser to this script in Xfce’s Preferred Applications (Xfce Menu -> Settings -> Preferred Applications).

With that, now when opening the web browser in Xfce (which uses the exo-open command) will launch chrome with the correct proxy settings.