Code for this is available at http://tetcos.com/File_Exchange/PUE_Attack_Project.zip and can be used from NetSim v9 onwards