Update scanner.py

Woof... a lot of blind programming. Good ideas so fix them when you can test it woot.