Exchange issues

Problems with renewing my exchange certificate. I was getting the following error:

[PS] C:\windows\system32>Get-ExchangeCertificate
The Exchange Certificate operation has failed with an exception. The error message is: Unknown error (0xe0434f4d)
+ CategoryInfo : InvalidOperation: (:) [Get-ExchangeCertificate], LocalizedException
+ FullyQualifiedErrorId : B5063A5B,Microsoft.Exchange.Management.SystemConfigurationTasks.GetExchangeCertificate

After searching the internet there was a suggestion to start the IIS Admin service.  The service was, indeed, disabled.  Starting the service resolved the issue.


The big ip CRYPTO command provides an opportunity to provide secure communication between applications and the BIG IP device.

This is a simple example of using CRYPTO to communicate with OpenSSL.

Add an iRule to the big ip virtual server:

    set key "abed1ddc04fbb05856bca4a0ca60f21e"
    set iv "d78d86d9084eb9239694c9a733904037"
    set data "The quick brown fox"
    set enc_data [CRYPTO::encrypt -alg aes-128-cbc -keyhex $key -ivhex $iv $data]
    HTTP::header insert aes_encrypted "[b64encode $enc_data]"

The encrypted data can be retrieved with any utility, I use curl:

curl -D - http://site/
HTTP/1.1 200 OK
Content-Type: text/html
Date: Thu, 29 Jun 2017 13:58:01 GMT
Content-Length: 1293
aes_encrypted: cfsVbrUjPXg4ieEI3R1WsVliS5VRDJVINhMJW55whJc=

The encrypted header can be decoded with OpenSSL:

echo "cfsVbrUjPXg4ieEI3R1WsVliS5VRDJVINhMJW55whJc=" | openssl enc -d -A -a -iv d78d86d9084eb9239694c9a733904037 -K abed1ddc04fbb05856bca4a0ca60f21e -aes-128-cbc -nosalt
The quick brown fox

GL.iNnet GL-AR150 Wifi Pineapple

I’ve deployed the Wifi pineapple firmware on a GL-AR150, and wanted to use the second ethernet port for connecting to the Internet.

The normal configuration is to connect the controlling PC to the WAN port on the GL-AR150, this is eth0 within Wifi Pineapple. The web interface on the wifi pineapple does not appear to allow configuration of the other interface. Logging into the GL-AR150 using ssh allows configuration of eth1. I use ssh to set the IP address on eth1, which reports an error, but seems to work.

root@Pineapple:~# ifconfig eth1
ifconfig: SIOCSIFADDR: Invalid argument

The default route can now be added to eth0 using the web gui.

Bridged networks can be displayed using the command:

root@Pineapple:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.e4956e4061d2       no              eth0

Raspberry Pi

Pi Zero HID gadget

Setup according to


echo -ne "\x00\x00\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" > /dev/hidg0
pass test/dummy | ./scan /dev/hidg0 2 2

GY-521 accelerometer


This is a list of useful commands related to Python.

Jupyter notebook location

When starting jupyter notebooks on Windows the shortcut defaults to my profile directory.  To get round this create a jupyter config:

jupyter notebook --generate-config

This will be located in .jupyter\ within the profile directory.

Update c.FileContentsManager.root_dir to point to the folder for notebooks

Machine learning

Frequency analysis with Python

scikit-learn documentation

Azure Machine Learning documentation

Sequential data

Fraud detection with Azure Stream Analytics

Streaming analytics in Python

Anomaly detection

Azure anomaly detection

Azure One-Class Support Vector Machine