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.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
imap /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
README.md
1.25
KB
-rw-rw-r--
2022-10-31 11:36
bug31142_1.phpt
1.16
KB
-rw-rw-r--
2022-10-31 11:36
bug31142_2.phpt
700
B
-rw-rw-r--
2022-10-31 11:36
bug32589.phpt
753
B
-rw-rw-r--
2022-10-31 11:36
bug35669.phpt
2
KB
-rw-rw-r--
2022-10-31 11:36
bug40854.phpt
1.16
KB
-rw-rw-r--
2022-10-31 11:36
bug44098.phpt
400
B
-rw-rw-r--
2022-10-31 11:36
bug45705_1.phpt
431
B
-rw-rw-r--
2022-10-31 11:36
bug45705_2.phpt
1.39
KB
-rw-rw-r--
2022-10-31 11:36
bug46918.phpt
1.51
KB
-rw-rw-r--
2022-10-31 11:36
bug53377.phpt
712
B
-rw-rw-r--
2022-10-31 11:36
bug63126.phpt
1.35
KB
-rw-rw-r--
2022-10-31 11:36
bug64076.phpt
562
B
-rw-rw-r--
2022-10-31 11:36
bug75774.phpt
508
B
-rw-rw-r--
2022-10-31 11:36
bug77020.phpt
306
B
-rw-rw-r--
2022-10-31 11:36
bug77153.phpt
649
B
-rw-rw-r--
2022-10-31 11:36
bug80213.phpt
420
B
-rw-rw-r--
2022-10-31 11:36
bug80215.phpt
1.08
KB
-rw-rw-r--
2022-10-31 11:36
bug80216.phpt
498
B
-rw-rw-r--
2022-10-31 11:36
bug80220.phpt
604
B
-rw-rw-r--
2022-10-31 11:36
bug80223.phpt
432
B
-rw-rw-r--
2022-10-31 11:36
bug80226.phpt
278
B
-rw-rw-r--
2022-10-31 11:36
bug80242.phpt
422
B
-rw-rw-r--
2022-10-31 11:36
bug80710_1.phpt
1.18
KB
-rw-rw-r--
2022-10-31 11:36
bug80710_2.phpt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
clean.inc
732
B
-rw-rw-r--
2022-10-31 11:36
imap_8bit_basic.phpt
1.03
KB
-rw-rw-r--
2022-10-31 11:36
imap_alerts_error.phpt
875
B
-rw-rw-r--
2022-10-31 11:36
imap_append_basic.phpt
2.1
KB
-rw-rw-r--
2022-10-31 11:36
imap_base64_basic.phpt
1.01
KB
-rw-rw-r--
2022-10-31 11:36
imap_binary_basic.phpt
1.86
KB
-rw-rw-r--
2022-10-31 11:36
imap_body.phpt
1.23
KB
-rw-rw-r--
2022-10-31 11:36
imap_body_basic.phpt
1.18
KB
-rw-rw-r--
2022-10-31 11:36
imap_bodystruct_basic.phpt
1.96
KB
-rw-rw-r--
2022-10-31 11:36
imap_clearflag_full_basic.phpt
2.5
KB
-rw-rw-r--
2022-10-31 11:36
imap_close_basic.phpt
1.54
KB
-rw-rw-r--
2022-10-31 11:36
imap_close_error.phpt
1.27
KB
-rw-rw-r--
2022-10-31 11:36
imap_close_variation3.phpt
1.27
KB
-rw-rw-r--
2022-10-31 11:36
imap_close_variation4.phpt
2.38
KB
-rw-rw-r--
2022-10-31 11:36
imap_createmailbox_basic.phpt
2.06
KB
-rw-rw-r--
2022-10-31 11:36
imap_errors_basic.phpt
1.34
KB
-rw-rw-r--
2022-10-31 11:36
imap_expunge_error.phpt
673
B
-rw-rw-r--
2022-10-31 11:36
imap_fetch_overview_basic.phpt
1.87
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetch_overview_error.phpt
1.76
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetch_overview_variation3.phpt
2.12
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetch_overview_variation4.phpt
1.38
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetch_overview_variation5.phpt
2.33
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetch_overview_variation6.phpt
2.63
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchbody_basic.phpt
2.13
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchbody_error.phpt
1.68
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchbody_variation4.phpt
1.91
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchbody_variation5.phpt
1.28
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchbody_variation6.phpt
1.71
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchheader_basic.phpt
1.96
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchheader_error.phpt
1.54
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchheader_variation3.phpt
1.83
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchheader_variation4.phpt
1.32
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchheader_variation5.phpt
1.84
KB
-rw-rw-r--
2022-10-31 11:36
imap_fetchstructure_basic.phpt
1.52
KB
-rw-rw-r--
2022-10-31 11:36
imap_gc_error.phpt
918
B
-rw-rw-r--
2022-10-31 11:36
imap_getsubscribed_basic.phpt
1.63
KB
-rw-rw-r--
2022-10-31 11:36
imap_headerinfo_basic.phpt
2.15
KB
-rw-rw-r--
2022-10-31 11:36
imap_headerinfo_error.phpt
962
B
-rw-rw-r--
2022-10-31 11:36
imap_headers.phpt
652
B
-rw-rw-r--
2022-10-31 11:36
imap_include.inc
5.35
KB
-rw-rw-r--
2022-10-31 11:36
imap_list_basic.phpt
1.17
KB
-rw-rw-r--
2022-10-31 11:36
imap_lsub_basic.phpt
1.41
KB
-rw-rw-r--
2022-10-31 11:36
imap_mail_copy.phpt
1.29
KB
-rw-rw-r--
2022-10-31 11:36
imap_mail_copy_basic.phpt
1.13
KB
-rw-rw-r--
2022-10-31 11:36
imap_mail_move.phpt
1.29
KB
-rw-rw-r--
2022-10-31 11:36
imap_mail_move_basic.phpt
1.13
KB
-rw-rw-r--
2022-10-31 11:36
imap_mutf7_to_utf8.phpt
507
B
-rw-rw-r--
2022-10-31 11:36
imap_num_msg_error.phpt
652
B
-rw-rw-r--
2022-10-31 11:36
imap_num_recent_error.phpt
652
B
-rw-rw-r--
2022-10-31 11:36
imap_open_error.phpt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
imap_ping_error.phpt
631
B
-rw-rw-r--
2022-10-31 11:36
imap_renamemailbox_basic.phpt
1.63
KB
-rw-rw-r--
2022-10-31 11:36
imap_rfc822_parse_headers_basic.phpt
1.98
KB
-rw-rw-r--
2022-10-31 11:36
imap_rfc822_write_address_basic.phpt
288
B
-rw-rw-r--
2022-10-31 11:36
imap_savebody_basic.phpt
1.29
KB
-rw-rw-r--
2022-10-31 11:36
imap_timeout_basic.phpt
1.31
KB
-rw-rw-r--
2022-10-31 11:36
imap_undelete_basic.phpt
477
B
-rw-rw-r--
2022-10-31 11:36
imap_undelete_error.phpt
944
B
-rw-rw-r--
2022-10-31 11:36
imap_utf8.phpt
387
B
-rw-rw-r--
2022-10-31 11:36
imap_utf8_to_mutf7_basic.phpt
568
B
-rw-rw-r--
2022-10-31 11:36
skipif.inc
519
B
-rw-rw-r--
2022-10-31 11:36
Save
Rename
<?php // Change these to make tests run successfully $server = '{127.0.0.1/norsh}'; $default_mailbox = $server . "INBOX"; $domain = "something.com"; $admin_user = "webmaster"; // a user with admin access $username = "$admin_user@$domain"; $password = 'p4ssw0rd'; $users = array("webmaster", "info", "admin", "foo"); // tests require 4 valid userids $mailbox_prefix = "phpttest"; // name used for test mailbox // record test start time (used by displayOverviewFields()) $start_time = time(); // list of fields to expect $mandatory_overview_fields = array( 'size', 'uid', 'msgno', 'recent', 'flagged', 'answered', 'deleted', 'seen', 'draft', 'udate', ); /** * Display all fields in an element from an imap_fetch_overview() response * * Special handling for 'udate', which will vary run-to-run; assumes an IMAP * server with its clock synced to the current system, which is consistent with * setup instructions in ext/imap/tests/README.md * * @param array resp element from the return value of imap_fetch_overview() */ function displayOverviewFields($resp, $fields=null) { global $mandatory_overview_fields; global $start_time; foreach ($fields ? $fields : $mandatory_overview_fields as $mf) { $z = $resp->$mf; if ($mf == 'udate') { if (($z >= $start_time) && ($z <= time())) { echo "$mf is OK\n"; } else { echo "$mf is BAD ($z)\n"; } } else { echo "$mf is $z\n"; } } } /** * Create a test mailbox and populate with msgs * * @param string mailbox_suffix Suffix used to uniquely identify mailboxes * @param int message_count number of test msgs to be written to new mailbox * * @return IMAP stream to new mailbox on success; FALSE on failure */ function setup_test_mailbox($mailbox_suffix, $message_count, &$new_mailbox = null, $msg_type = "simple"){ global $server, $default_mailbox, $username, $password; // open a stream to default mailbox $imap_stream = imap_open($default_mailbox, $username, $password); if ($imap_stream === false) { echo "Cannot connect to IMAP server $server: " . imap_last_error() . "\n"; return false; } echo "Create a temporary mailbox and add " . $message_count . " msgs\n"; $new_mailbox = create_mailbox($imap_stream, $mailbox_suffix, $message_count, $msg_type); if ($new_mailbox === false) { echo "Cant create a temporary mailbox: " . imap_last_error(). "\n"; return false; } echo ".. mailbox '$new_mailbox' created\n"; // reopen stream to new mailbox if (imap_reopen($imap_stream, $new_mailbox) === false) { echo "cant re-open '$new_mailbox' mailbox: " . imap_last_error() . "\n"; return false; } return $imap_stream; } /** * Create mailbox and fill with generic emails * * @param resource $imap_stream * @param string $mailbox */ function create_mailbox($imap_stream, $mailbox_suffix, $message_count, $msg_type= "simple"){ global $default_mailbox, $mailbox_prefix; $mailbox = $default_mailbox . "." . $mailbox_prefix . $mailbox_suffix; $mailboxes = imap_getmailboxes($imap_stream, $mailbox, '*'); // check mailbox does not already exist if ($mailboxes) { foreach($mailboxes as $value) { if ($value->name == $mailbox) { exit ("TEST FAILED : Mailbox '$mailbox' already exists\n"); } } } if (imap_createmailbox($imap_stream, $mailbox) === false) { return false; } // Add number of test msgs requested if ($message_count > 0) { populate_mailbox($imap_stream, $mailbox, $message_count, $msg_type); } return $mailbox; } /** * Populate a mailbox with generic emails * * @param resource $imap_stream * @param string $mailbox */ function populate_mailbox($imap_stream, $mailbox, $message_count, $msg_type = "simple"){ global $users, $domain; for($i = 1; $i <= $message_count; $i++) { if ($msg_type == "simple") { $msg = "From: foo@anywhere.com\r\n" . "To: $users[0]@$domain\r\n" . "Subject: test$i\r\n" . "\r\n" . "$i: this is a test message, please ignore\r\n"; } else { $envelope["from"]= "foo@anywhere.com"; $envelope["to"] = "$users[0]@$domain"; $envelope["subject"] = "Test msg $i"; $part1["type"] = TYPEMULTIPART; $part1["subtype"] = "mixed"; $part2["type"] = TYPETEXT; $part2["subtype"] = "plain"; $part2["description"] = "imap_mail_compose() function"; $part2["contents.data"] = "message 1:xxxxxxxxxxxxxxxxxxxxxxxxxx"; $part3["type"] = TYPETEXT; $part3["subtype"] = "plain"; $part3["description"] = "Example"; $part3["contents.data"] = "message 2:yyyyyyyyyyyyyyyyyyyyyyyyyy"; $part4["type"] = TYPETEXT; $part4["subtype"] = "plain"; $part4["description"] = "Return Values"; $part4["contents.data"] = "message 3:zzzzzzzzzzzzzzzzzzzzzzzzzz"; $body[1] = $part1; $body[2] = $part2; $body[3] = $part3; $body[4] = $part4; $msg = imap_mail_compose($envelope, $body); } imap_append($imap_stream, $mailbox, $msg); } } /** * Get the mailbox name from a mailbox description, i.e strip off server details. * * @param string mailbox complete mailbox name * @return mailbox name */ function get_mailbox_name($mailbox){ if (preg_match('/\{.*?\}(.*)/', $mailbox, $match) != 1) { echo "Unrecpognized mailbox name\n"; return false; } return $match[1]; } ?>