!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/3ros/shindig/test/social/   drwxr-xr-x
Free 14.56 GB of 61.93 GB (23.51%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ActivityRestTest.php (3.94 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

require_once 'RestBase.php';

class 
ActivityRestTest extends RestBase {

  private function 
verifyLifeCycle($postData$postDataFormat$randomTitle) {
    
$url '/activities/1/@self';
    
$ret $this->curlRest($url$postData$postDataFormat);
    
$this->assertTrue(empty($ret), "Create activity failed. Response: $ret");
    
    
// Verifyies data was written correctly
    
$ret $this->curlRest($url '?count=20''''application/json''GET');
    
$retDecoded json_decode($rettrue);
    
$this->assertTrue($ret != $retDecoded && $ret != null"Invalid json string in return: $ret");
    
// Sees if we can find our just created activity
    
$activityId null;
    foreach (
$retDecoded['entry'] as $entry) {
      if (
$entry['title'] == $randomTitle) {
        
$activityId $entry['id'];
        break;
      }
    }
    
$this->assertNotNull($activityId"Couldn't find created activity.");
    
$ret $this->curlRest($url "/@app/$activityId"'''application/json''DELETE');
    
$this->assertTrue(empty($ret), "Delete activity failed. Repsonse: $ret");
  }
  
  public function 
testLifeCycleInJson() {
    
$randomTitle "[" rand(02048) . "] test activity";
    
$postData '{
      "id" : "http://example.org/activities/example.org:87ead8dead6beef/self/af3778",
      "title" : "' 
$randomTitle '",
      "updated" : "2008-02-20T23:35:37.266Z",
      "body" : "Some details for some activity",
      "bodyId" : "383777272",
      "url" : "http://api.example.org/activity/feeds/.../af3778",
      "userId" : "example.org:34KJDCSKJN2HHF0DW20394"
    }'
;
    
$this->verifyLifeCycle($postData'application/json'$randomTitle);
  }
  
  public function 
testLifeCycleInAtom() {
    
$randomTitle "[" rand(02048) . "] test activity";
    
$postData '<entry xmlns="http://www.w3.org/2005/Atom">
        <category term="status"/>
        <id>http://example.org/activities/example.org:87ead8dead6beef/self/af3778</id>
        <title>' 
$randomTitle '</title>
        <summary>Some details for some activity</summary>
        <updated>2008-02-20T23:35:37.266Z</updated>
        <link rel="self" type="application/atom+xml" href="http://api.example.org/activity/feeds/.../af3778"/>
        <author><uri>urn:guid:example.org:34KJDCSKJN2HHF0DW20394</uri></author>
        <content>
          <activity xmlns="http://ns.opensocial.org/2008/opensocial">
            <bodyId>383777272</bodyId>
          </activity>
        </content>
      </entry>'
;
    
$this->verifyLifeCycle($postData'application/atom+xml'$randomTitle);
  }
  
  public function 
testLifeCycleInXml() {
    
$randomTitle "[" rand(02048) . "] test activity";
    
$postData '<activity xmlns="http://ns.opensocial.org/2008/opensocial">
      <id>http://example.org/activities/example.org:87ead8dead6beef/self/af3778</id>
      <title>' 
$randomTitle '</title>
      <updated>2008-02-20T23:35:37.266Z</updated>
      <body>Some details for some activity</body>
      <bodyId>383777272</bodyId>
      <url>http://api.example.org/activity/feeds/.../af3778</url>
      <userId>example.org:34KJDCSKJN2HHF0DW20394</userId>
      </activity>'
;
    
$this->verifyLifeCycle($postData'application/xml'$randomTitle);
  }
}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.6188 ]--