Dear Sergiu,
Thanks for this initiative. For some months now, I have been thinking along this line and hoping to find a "way forward" or solution.
So for now, what I have managed to do is to make use of scripting within Packet Tracer (PT). In activity wizard, I have modified the scripting code (by Keith Moore) to send the PT result to a PHP server. I am now thinking of a JSON that will confirm submission from the PT to the PHP server and return to the student.
Back to your enquiry. A team of researchers from Tech. Univ. of Cluj-Napoca, Romania claim to have written a Moodle plugin to do just what you are requesting for. I have contacted them for some months now, unfortunately, they have been not been willing to share their code. Here is a link to their paper - ieeexplore.ieee.org {slash/} xpl/articleDetails.jsp?tp=&arnumber=6714190 .
You might want to look at what others have worked on:
1. Cisco's Activity Grader - Available from Cisco Netacad for instructors.
2. Java grader similar to yours: - potrerohacaido.blogspot.ie/ 2009/10/grade-packet-tracer-activity-files ...html
by Kayode Adesemowo.