Menu

#24 NppFTP.xml default password encryption. FILEZILLA IMPORT

open
nobody
Anything (14)
5
2014-09-02
2012-05-23
Anonymous
No

I have develop a php snippet wich import a "FileZilla.xml" exported file and gives you the "NppFTP.xml" to overwrite yours.

But the NppFTP.xml use password encryption and I don't know wich it is or what is the default encryption key.

Where Can I find this info?

Here is the code

<code>
<<?php

$fz = simplexml_load_file("FileZilla.xml");
$nppbase = <<<XML
<?xml version="1.0" encoding="UTF-8" ?>
<NppFTP defaultCache="%CONFIGDIR%\Cache\%USERNAME%@%HOSTNAME%" outputShown="0" windowRatio="0.5" clearCache="0" clearCachePermanent="0">
<Profiles/>
</NppFTP>
XML;

// echo $nppbase;
$equivalencias= array(
array("fz"=>"Name","npp"=>"name"),
array("fz"=>"Host","npp"=>"hostname"),
array("fz"=>"Port","npp"=>"port"),
array("fz"=>"User","npp"=>"username"),
array("fz"=>"Pass","npp"=>"password")

);

$npp = new SimpleXMLElement($nppbase);

$profiles = $npp->Profiles;

foreach ($fz->Servers->Server as $fzserv) {

$profile = $profiles->addChild("Profile");
foreach ($equivalencias as $equi) {
$profile->addAttribute($equi['npp'],$fzserv->$equi['fz']);
}
if ($fzserv->RemoteDir) {
$carpeta = (string)$fzserv->RemoteDir;
$carpeta = trim(substr($carpeta,strrpos($carpeta, " ")));
if ($carpeta) {
$carpeta = "/".$carpeta;
$profile->addAttribute("initialDir",$carpeta);

}

}
$modo = (string)$fzserv->PasvMode == "MODE_ACTIVE" ? 1 :0;

$profile->addAttribute("transferMode",$modo);
$profile->addAttribute("askPassword",0);
$profile->addAttribute("securityMode",0);

$profile->addAttribute("connectionMode",0);
$profile->addAttribute("dataPortMin",1000);
$profile->addAttribute("dataPortMax",32000);
$profile->addAttribute("timeout",30);

$cache = $profile->addChild("Cache");
$filetypes = $profile->addChild("FileTypes");
$filetypes->addAttribute("asciiTypes","");
$filetypes->addAttribute("binaryTypes","");

}
$resultado = $npp->asXML();
file_put_contents("NppFTP.xml",$resultado);

?>

</code>

Discussion

  • Harry

    Harry - 2012-05-23

    It uses DES (weak encryption) with the default key "NppFTP00"

     
  • Nobody/Anonymous

    I simply had to say thanks once again. I am not sure the things I might have done without those techniques discussed by you directly on that question. This has been a real challenging dilemma in my position, however , witnessing a new expert mode you treated the issue forced me to jump for gladness. I am thankful for the advice and even sincerely hope you realize what an amazing job you have been accomplishing instructing most people using a blog. Most probably you've never come across all of us.
    <a href="Windows 8 Ultimate Key" title="http://www.windows7keygenerator.com/">http://www.windows7keygenerator.com/</a>

     
  • Nobody/Anonymous

    This post is worth everyone's attention. How can I find out more?
    <a href="http://www.cheapwindows7ultimatekeys.com/" title="Windows 8 Ultimate Key">Windows 8 Ultimate Key</a>

     
  • Nobody/Anonymous

    Wow, wonderful blog format! How lengthy have you ever been running a blog for? you made running a blog glance easy. The entire glance of your web site is fantastic, neatly as} the content material!
    <a href="http://www.windows7keysforsale.com/" title="Windows 7 Ultimate Product Key">Windows 7 Ultimate Product Key</a>

     
  • _92

    _92 - 2014-09-02

    who can export wcx_ftp.ini to NppFTP.xml?

     

    Last edit: _92 2014-09-02
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.