Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
btm2000.apps-dev.fr /
core /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
accounting.lib.php
10.84
KB
-rw-r--r--
2023-12-15 13:44
admin.lib.php
71.6
KB
-rw-r--r--
2023-12-15 13:44
agenda.lib.php
18.62
KB
-rw-r--r--
2023-12-15 13:44
ajax.lib.php
37.36
KB
-rw-r--r--
2023-12-15 13:44
asset.lib.php
7.47
KB
-rw-r--r--
2023-12-15 13:44
bank.lib.php
14.15
KB
-rw-r--r--
2023-12-15 13:44
barcode.lib.php
15.4
KB
-rw-r--r--
2023-12-15 13:44
categories.lib.php
3.71
KB
-rw-r--r--
2023-12-15 13:44
company.lib.php
94.02
KB
-rw-r--r--
2023-12-15 13:44
contact.lib.php
10.3
KB
-rw-r--r--
2023-12-15 13:44
contract.lib.php
6.38
KB
-rw-r--r--
2023-12-15 13:44
cron.lib.php
5.05
KB
-rw-r--r--
2023-12-15 13:44
date.lib.php
39.46
KB
-rw-r--r--
2023-12-15 13:44
doc.lib.php
6.72
KB
-rw-r--r--
2023-12-15 13:44
doleditor.lib.php
3.85
KB
-rw-r--r--
2023-12-15 13:44
donation.lib.php
3.99
KB
-rw-r--r--
2023-12-15 13:44
ecm.lib.php
6.22
KB
-rw-r--r--
2023-12-15 13:44
emailing.lib.php
2.25
KB
-rw-r--r--
2023-12-15 13:44
eventorganization.lib.php
2.87
KB
-rw-r--r--
2023-12-15 13:44
expedition.lib.php
4.67
KB
-rw-r--r--
2023-12-15 13:44
expensereport.lib.php
6.09
KB
-rw-r--r--
2023-12-15 13:44
fichinter.lib.php
8.17
KB
-rw-r--r--
2023-12-15 13:44
files.lib.php
140.52
KB
-rw-r--r--
2023-12-15 13:44
fiscalyear.lib.php
1.86
KB
-rw-r--r--
2023-12-15 13:44
format_cards.lib.php
2.8
KB
-rw-r--r--
2023-12-15 13:44
fourn.lib.php
11.64
KB
-rw-r--r--
2023-12-15 13:44
ftp.lib.php
8.94
KB
-rw-r--r--
2023-12-15 13:44
functions.lib.php
524.5
KB
-rw-r--r--
2023-12-15 13:44
functions2.lib.php
96.43
KB
-rw-r--r--
2023-12-15 13:44
functions_ch.lib.php
3.66
KB
-rw-r--r--
2023-12-15 13:44
functionsnumtoword.lib.php
9.98
KB
-rw-r--r--
2023-12-15 13:44
geturl.lib.php
15.62
KB
-rw-r--r--
2023-12-15 13:44
holiday.lib.php
3.87
KB
-rw-r--r--
2023-12-15 13:44
hrm.lib.php
2.87
KB
-rw-r--r--
2023-12-15 13:44
images.lib.php
25.7
KB
-rw-r--r--
2023-12-15 13:44
import.lib.php
1.89
KB
-rw-r--r--
2023-12-15 13:44
intracommreport.lib.php
2.59
KB
-rw-r--r--
2023-12-15 13:44
invoice.lib.php
47.22
KB
-rw-r--r--
2023-12-15 13:44
invoice2.lib.php
9.08
KB
-rw-r--r--
2023-12-15 13:44
json.lib.php
11.13
KB
-rw-r--r--
2023-12-15 13:44
ldap.lib.php
5.35
KB
-rw-r--r--
2023-12-15 13:44
loan.lib.php
5.35
KB
-rw-r--r--
2023-12-15 13:44
mailmanspip.lib.php
1.24
KB
-rw-r--r--
2023-12-15 13:44
member.lib.php
12.08
KB
-rw-r--r--
2023-12-15 13:44
memory.lib.php
9.92
KB
-rw-r--r--
2023-12-15 13:44
modulebuilder.lib.php
33.89
KB
-rw-r--r--
2023-12-15 13:44
multicurrency.lib.php
2.07
KB
-rw-r--r--
2023-12-15 13:44
oauth.lib.php
7.75
KB
-rw-r--r--
2023-12-15 13:44
order.lib.php
11.62
KB
-rw-r--r--
2023-12-15 13:44
parsemd.lib.php
3.2
KB
-rw-r--r--
2023-12-15 13:44
payments.lib.php
15.15
KB
-rw-r--r--
2023-12-15 13:44
pdf.lib.php
111.38
KB
-rw-r--r--
2023-12-15 13:44
phpsessionindb.lib.php
8.29
KB
-rw-r--r--
2023-12-15 13:44
prelevement.lib.php
3.23
KB
-rw-r--r--
2023-12-15 13:44
price.lib.php
21.69
KB
-rw-r--r--
2023-12-15 13:44
product.lib.php
33.02
KB
-rw-r--r--
2023-12-15 13:44
project.lib.php
117.24
KB
-rw-r--r--
2023-12-15 13:44
propal.lib.php
11.21
KB
-rw-r--r--
2023-12-15 13:44
receiptprinter.lib.php
2.19
KB
-rw-r--r--
2023-12-15 13:44
reception.lib.php
5.68
KB
-rw-r--r--
2023-12-15 13:44
report.lib.php
3.83
KB
-rw-r--r--
2023-12-15 13:44
resource.lib.php
5.19
KB
-rw-r--r--
2023-12-15 13:44
salaries.lib.php
4
KB
-rw-r--r--
2023-12-15 13:44
security.lib.php
49.03
KB
-rw-r--r--
2023-12-15 13:44
security2.lib.php
21.19
KB
-rw-r--r--
2023-12-15 13:44
sendings.lib.php
16.89
KB
-rw-r--r--
2023-12-15 13:44
signature.lib.php
6
KB
-rw-r--r--
2023-12-15 13:44
stock.lib.php
4.81
KB
-rw-r--r--
2023-12-15 13:44
supplier_proposal.lib.php
5.57
KB
-rw-r--r--
2023-12-15 13:44
takepos.lib.php
2.31
KB
-rw-r--r--
2023-12-15 13:44
tax.lib.php
58.44
KB
-rw-r--r--
2023-12-15 13:44
ticket.lib.php
9.6
KB
-rw-r--r--
2023-12-15 13:44
treeview.lib.php
9.25
KB
-rw-r--r--
2023-12-15 13:44
trip.lib.php
1.98
KB
-rw-r--r--
2023-12-15 13:44
usergroups.lib.php
50.89
KB
-rw-r--r--
2023-12-15 13:44
vat.lib.php
2.6
KB
-rw-r--r--
2023-12-15 13:44
website.lib.php
57.39
KB
-rw-r--r--
2023-12-15 13:44
website2.lib.php
28.7
KB
-rw-r--r--
2023-12-15 13:44
ws.lib.php
3.4
KB
-rw-r--r--
2023-12-15 13:44
xcal.lib.php
17.87
KB
-rw-r--r--
2023-12-15 13:44
Save
Rename
<?php /* Copyright (C) 2022-2023 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2022 Anthony Berton <bertonanthony@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * or see https://www.gnu.org/ */ /** * \file htdocs/core/lib/ftp.lib.php * \brief Set of functions used for FTP * \ingroup core */ /** * Connect to FTP server * * @param string $ftp_server Server name * @param string $ftp_port Server port * @param string $ftp_user FTP user * @param string $ftp_password FTP password * @param string $section Directory * @param integer $ftp_passive Use a passive mode * @return array Result of connect */ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive = 0) { global $langs, $conf; $ok = 1; $error = 0; $connect_id = null; $newsectioniso = ''; $mesg=""; if (!is_numeric($ftp_port)) { $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServer", $ftp_server, $ftp_port); $ok = 0; } if ($ok) { $connecttimeout = (empty($conf->global->FTP_CONNECT_TIMEOUT) ? 40 : $conf->global->FTP_CONNECT_TIMEOUT); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { dol_syslog('Try to connect with ssh2_connect'); $tmp_conn_id = ssh2_connect($ftp_server, $ftp_port); } elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) { dol_syslog('Try to connect with ftp_ssl_connect'); $connect_id = ftp_ssl_connect($ftp_server, $ftp_port, $connecttimeout); } else { dol_syslog('Try to connect with ftp_connect'); $connect_id = ftp_connect($ftp_server, $ftp_port, $connecttimeout); } if (!empty($connect_id) || !empty($tmp_conn_id)) { if ($ftp_user) { if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { dol_syslog('Try to authenticate with ssh2_auth_password'); if (ssh2_auth_password($tmp_conn_id, $ftp_user, $ftp_password)) { // Turn on passive mode transfers (must be after a successful login //if ($ftp_passive) ftp_pasv($connect_id, true); // Change the dir $newsectioniso = utf8_decode($section); //ftp_chdir($connect_id, $newsectioniso); $connect_id = ssh2_sftp($tmp_conn_id); if (!$connect_id) { dol_syslog('Failed to connect to SFTP after sssh authentication', LOG_DEBUG); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToSFTPAfterSSHAuthentication"); $ok = 0; $error++; } } else { dol_syslog('Failed to connect to FTP with login '.$ftp_user, LOG_DEBUG); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServerWithCredentials"); $ok = 0; $error++; } } else { if (ftp_login($connect_id, $ftp_user, $ftp_password)) { // Turn on passive mode transfers (must be after a successful login if ($ftp_passive) { ftp_pasv($connect_id, true); } // Change the dir $newsectioniso = utf8_decode($section); ftp_chdir($connect_id, $newsectioniso); } else { $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServerWithCredentials"); $ok = 0; $error++; } } } } else { dol_syslog('FailedToConnectToFTPServer '.$ftp_server.' '.$ftp_port, LOG_ERR); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServer", $ftp_server, $ftp_port); $ok = 0; } } $arrayresult = array('conn_id'=>$connect_id, 'ok'=>$ok, 'mesg'=>$mesg, 'curdir'=>$section, 'curdiriso'=>$newsectioniso); return $arrayresult; } /** * Tell if an entry is a FTP directory * * @param resource $connect_id Connection handler * @param string $dir Directory * @return int 1=directory, 0=not a directory */ function ftp_isdir($connect_id, $dir) { if (@ftp_chdir($connect_id, $dir)) { ftp_cdup($connect_id); return 1; } else { return 0; } } /** * Tell if an entry is a FTP directory * * @param resource $connect_id Connection handler * @return boolean Result of closing */ function dol_ftp_close($connect_id) { global $conf; // Close FTP connection if ($connect_id) { if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { } elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) { return ftp_close($connect_id); } else { return ftp_close($connect_id); } } return true; } /** * Delete a FTP file * * @param resource $connect_id Connection handler * @param string $file File * @param string $newsection $newsection * @return bool */ function dol_ftp_delete($connect_id, $file, $newsection) { global $conf; if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { $newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 } // Remote file $filename = $file; $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); //print "x".$newremotefileiso; dol_syslog("ftp/index.php ftp_delete ".$newremotefileiso); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { return ssh2_sftp_unlink($connect_id, $newremotefileiso); } else { return @ftp_delete($connect_id, $newremotefileiso); } } /** * Download a FTP file * * @param resource $connect_id Connection handler * @param string $localfile The local file path * @param string $file The remote file path * @param string $newsection $newsection * @return bool|resource */ function dol_ftp_get($connect_id, $localfile, $file, $newsection) { global $conf; if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { $newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 } // Remote file $filename = $file; $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { return fopen('ssh2.sftp://'.intval($connect_id).$newremotefileiso, 'r'); } else { return ftp_get($connect_id, $localfile, $newremotefileiso, FTP_BINARY); } } /** * Upload a FTP file * * @param resource $connect_id Connection handler * @param string $file File name * @param string $localfile The path to the local file * @param string $newsection $newsection * @return bool */ function dol_ftp_put($connect_id, $file, $localfile, $newsection) { global $conf; if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { $newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 } // Remote file $filename = $file; $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { return ssh2_scp_send($connect_id, $localfile, $newremotefileiso, 0644); } else { return ftp_put($connect_id, $newremotefileiso, $localfile, FTP_BINARY); } } /** * Remove FTP directory * * @param resource $connect_id Connection handler * @param string $file File * @param string $newsection $newsection * @return bool */ function dol_ftp_rmdir($connect_id, $file, $newsection) { global $conf; if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { $newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 } // Remote file $filename = $file; $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { return ssh2_sftp_rmdir($connect_id, $newremotefileiso); } else { return @ftp_rmdir($connect_id, $newremotefileiso); } } /** * Remove FTP directory * * @param resource $connect_id Connection handler * @param string $newdir Dir create * @param string $newsection $newsection * @return bool|string */ function dol_ftp_mkdir($connect_id, $newdir, $newsection) { global $conf; if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { $newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 } // Remote file $newremotefileiso = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$newdir; $newremotefileiso = utf8_decode($newremotefileiso); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { return ssh2_sftp_mkdir($connect_id, $newremotefileiso, 0777); } else { return @ftp_mkdir($connect_id, $newremotefileiso); } }