Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
nimah79 authored and StyleCIBot committed Jan 26, 2021
1 parent 2c11ab8 commit a7463d6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
10 changes: 5 additions & 5 deletions upload/picofile.com_member.index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

$upload_services[] = 'picofile.com_member';
$max_file_size['picofile.com_member'] = 900;
$page_upload['picofile.com_member'] = 'picofile.com_member.php';
<?php

$upload_services[] = 'picofile.com_member';
$max_file_size['picofile.com_member'] = 900;
$page_upload['picofile.com_member'] = 'picofile.com_member.php';
37 changes: 18 additions & 19 deletions upload/picofile.com_member.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
$upload_acc['picofile_com']['user'] = ''; // Set your username
$upload_acc['picofile_com']['pass'] = ''; // Set your password


if ($upload_acc['picofile_com']['user'] && $upload_acc['picofile_com']['pass']) {
$_REQUEST['up_login'] = $upload_acc['picofile_com']['user'];
$_REQUEST['up_pass'] = $upload_acc['picofile_com']['pass'];
Expand All @@ -30,15 +29,15 @@
$_REQUEST['up_pass'] = decrypt(urldecode($_REQUEST['up_pass']));
unset($_REQUEST['A_encrypted']);
}
$cookie_filepath = __DIR__ . '/picofile_cookie_'.md5(random_bytes(8)).'_'.time();
$cookie_filepath = __DIR__.'/picofile_cookie_'.md5(random_bytes(8)).'_'.time();
$ch = curl_init('https://www.blogsky.com/login?service=picofile.com&returnurl=https://www.picofile.com/account/logon');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath,
]);
$response = curl_exec($ch);
curl_close($ch);
Expand All @@ -50,15 +49,15 @@
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'__RequestVerificationToken' => $token,
'UserName' => $_REQUEST['up_login'],
'Password' => $_REQUEST['up_pass'],
'Action' => 'ورود'
]
'UserName' => $_REQUEST['up_login'],
'Password' => $_REQUEST['up_pass'],
'Action' => 'ورود',
],
]);
$response = curl_exec($ch);
curl_close($ch);
Expand All @@ -73,8 +72,8 @@
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath,
]);
$response = curl_exec($ch);
curl_close($ch);
Expand All @@ -91,15 +90,15 @@
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath,
]);
$response = curl_exec($ch);
curl_close($ch);
preg_match_all('/<tr id="listnode\d+" nodeid="\d+" itemid=".*?" type="file" itemname="(.*?)" extension="(.*?)" size="\d+" server="(.*?)"/', $response, $files);
$files_list = [];
for ($i = 0; $i < count($files[0]); $i++) {
$files_list[(function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower')($files[1][$i] . '.' . $files[2][$i])] = $files[3][$i];
$files_list[(function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower')($files[1][$i].'.'.$files[2][$i])] = $files[3][$i];
}
if (array_key_exists((function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower')($lname), $files_list)) {
$server = $files_list[(function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower')($lname)];
Expand All @@ -118,8 +117,8 @@
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath
CURLOPT_COOKIEFILE => $cookie_filepath,
CURLOPT_COOKIEJAR => $cookie_filepath,
]);
$result = curl_exec($ch);
curl_close($ch);
Expand Down

0 comments on commit a7463d6

Please sign in to comment.