Yes - salt will kill maggots by draining them of moisture. It can't be a pleasant way of dying, so if being humane is low on your list of priorities, pour salt directly onto the maggots!