Error when using pac_from_mcm.pl
Brought to you by:
perseo22
The monocaffe migration tool (initially created for feature-requests #25 ) is not working.
The following error message is shown:
Can't locate KeePass.pm in @INC (you may need to install the KeePass module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl . /opt/pac/utils/../lib) at /opt/pac/utils/../lib/PACUtils.pm line 43. BEGIN failed--compilation aborted at /opt/pac/utils/../lib/PACUtils.pm line 43. Compilation failed in require at ./pac_from_mcm.pl line 39. BEGIN failed--compilation aborted at ./pac_from_mcm.pl line 39.
Is this tool broken? Is there a way to have it run again?
Thank you!
So 3 days ago, I had no experience with Perl whatsoever.
However, after some thorough reading, I was able to fix the above error (by including the ../lib/ex/ directory), but unfortunately the ./pac_from_mcm script was written several years back (when PAC was at version 2.2 or something like that).
I have therefore changed the script a little bit so that it would work with the newest PAC release (4.5.5).
Using the modified scrit, I was able to import around 140 connections and 20 groups from a CSV file into PAC!
I would greatly appreciate any feedback or comments on how to improve the script.
The usage is as follows:
Download and copy the script to /opt/pac/utils/
For example:
And there you go~
Hope this will help someone in the future.
PS: The format of the CSV file is the same as the one used in the initial ticket and can be found here: https://sourceforge.net/p/pacmanager/feature-requests/25/#a9b2
I will also attach the rubt script that generates a compatible CSV file from an mRemote exported confCons.xml
I do not know if this is acceptable here as some may consider this an exploit (because of decrypting the passwords in mRemote), but I will attach the script anyway and will leave it up to the board moderators to decide on deleting it or not.
Thank you again for this wonderful tool, and I hope my small contribution will be of use to someone in the future.