Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-22-2013, 07:13 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › PHP v
« Previous 1 ... 17 18 19 20 21 ... 31 Next »

[Tutor] simple Unzip file

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Tutor simple Unzip file
03-12-2012, 09:15 PM
Post: #1
sunafets.exe Offline
./Devilz Commander
Posts: 297
Joined: Aug 2011
Reputation: 4
simple Unzip file
saya ga berani ilangin Copyrights, mewek
ini sumber dan penampakannya:
http://www.learncpp.com/general-programming/a-php-script-to-unzip-files-with-file-overwriting/
PHP Code:
<?php
    
// The unzip script
    // Created by Alex at http://www.learncpp.com
    //
    // This script lists all of the .zip files in a directory
    // and allows you to select one to unzip.  Unlike CPanel's file
    // manager, it _will_ overwrite existing files.
    //
    // To use this script, FTP or paste this script into a file in the directory
    // with the .zip you want to unzip.  Then point your web browser at this
    // script and choose which file to unzip.
 
    // See if there's a file parameter in the URL string
    
$file = $_GET['file'];
 
    if (isset(
$file))
    {
       echo 
"Unzipping " . $file . "<br>";
       
system('unzip -o ' . $file);
       exit;
    }
 
    
// create a handler to read the directory contents
    
$handler = opendir(".");
 
    echo 
"Please choose a file to unzip: " . "<br>";
 
    
// A blank action field posts the form to itself
    
echo '<FORM action="" method="get">';
 
    
$found = FALSE; // Used to see if there were any valid files
 
    // keep going until all files in directory have been read
    
while ($file = readdir($handler))
    {
        if (
preg_match ("/.zip$/i", $file))
        {
            echo 
'<input type="radio" name="file" value=' . $file . '> ' . $file . '<br>';
            
$found = true;
        }
    }
 
    
closedir($handler);
 
    if (
$found == FALSE)
        echo 
"No files ending in .zip found<br>";
    else
        echo 
'<br>Warning: Existing files will be overwritten.<br><br><INPUT type="submit" value="Unzip!">';
 
    echo 
"</FORM>";
?>

cocok buat yg bingung mo unzip file kaya ane ngambek
Find all posts by this user
Quote this message in a reply
 Reputed by :  Super Moderator(+1)
03-13-2012, 11:13 AM
Post: #2
Super Moderator Offline
Wahyu Adi Prasetyo
****
Global Moderators
Posts: 6,944
Joined: Jan 2010
Reputation: 237
RE: simple Unzip file
keren juga ni om
ijin nyoba nyerah
Visit this user's website Find all posts by this user
Quote this message in a reply
03-13-2012, 11:45 AM
Post: #3
sunafets.exe Offline
./Devilz Commander
Posts: 297
Joined: Aug 2011
Reputation: 4
RE: simple Unzip file
iyo gan,, makasih grp nya ketawa

tp kok sepi yak ngambek
Find all posts by this user
Quote this message in a reply
03-13-2012, 11:48 AM
Post: #4
afika666 Offline
./Devilz Officer
Posts: 81
Joined: Feb 2012
Reputation: 24
RE: simple Unzip file
Code:
$file = $_GET['file'];

    if (isset($file))
    {
       echo "Unzipping " . $file . "<br>";
       system('unzip -o ' . $file);
       exit;
    }
RCE tu om...
Find all posts by this user
Quote this message in a reply
03-13-2012, 01:14 PM
Post: #5
sunafets.exe Offline
./Devilz Commander
Posts: 297
Joined: Aug 2011
Reputation: 4
RE: simple Unzip file
RCE apaan?

oiya ane juga bingun,, ada tulisan system disabled for security
on line: 19
Find all posts by this user
Quote this message in a reply
03-13-2012, 04:03 PM
Post: #6
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: simple Unzip file
(03-13-2012 01:14 PM)sunafets.exe Wrote:  RCE apaan?

oiya ane juga bingun,, ada tulisan system disabled for security
on line: 19

RCE maksudnya Remode Code Execution. Jd bisa dieksekusi dari luar. Klo command "system" emang biasanya di disable oleh sys adminnya.. ketawa
Find all posts by this user
Quote this message in a reply
03-13-2012, 09:52 PM
Post: #7
anharku Offline
./Devilz Advisor
Posts: 505
Joined: Jul 2010
Reputation: 29
RE: simple Unzip file
pwd
tar zxvf file.tar.gz

:)
Find all posts by this user
Quote this message in a reply
03-14-2012, 01:14 PM
Post: #8
Regel Offline
./Devilz Officer
Posts: 165
Joined: Dec 2011
Reputation: 98
RE: simple Unzip file
pake bawaan php aja. pake system dan unzip banyak hosting yg nge blok.

nih contoh
PHP Code:
<?php
$zip 
= new ZipArchive;
$res = $zip->open('test.zip');
if (
$res === TRUE) {
    echo 
'ok';
    
$zip->extractTo('test');
    
$zip->close();
} else {
    echo 
'failed, code:' . $res;
}
?>
Find all posts by this user
Quote this message in a reply
03-14-2012, 08:41 PM
Post: #9
sunafets.exe Offline
./Devilz Commander
Posts: 297
Joined: Aug 2011
Reputation: 4
RE: simple Unzip file
(03-13-2012 04:03 PM)ditatompel Wrote:  
(03-13-2012 01:14 PM)sunafets.exe Wrote:  RCE apaan?

oiya ane juga bingun,, ada tulisan system disabled for security
on line: 19

RCE maksudnya Remode Code Execution. Jd bisa dieksekusi dari luar. Klo command "system" emang biasanya di disable oleh sys adminnya.. ketawa

Oo gitu gan,, brarti phpshell termasuk RCE mewek

(03-13-2012 09:52 PM)anharku Wrote:  pwd
tar zxvf file.tar.gz

:)
itu command shell ya gan?


(03-14-2012 01:14 PM)Regel Wrote:  pake bawaan php aja. pake system dan unzip banyak hosting yg nge blok.

nih contoh
PHP Code:
<?php
$zip 
= new ZipArchive;
$res = $zip->open('test.zip');
if (
$res === TRUE) {
    echo 
'ok';
    
$zip->extractTo('test');
    
$zip->close();
} else {
    echo 
'failed, code:' . $res;
}
?>

wah-wah, ane nyari yg praktis,, yg udah ada daftar file zip-nya ngambek
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Tutor] mengatasi LFI (local file inclusion) dan RFI (Remote file inclusion) dellacroug 21 374 04-24-2013 06:50 PM
Last Post: civo
  [Ask] Script file zip selalu muncul peringantan "Class 'ZipArchive' not found" Tamp4h 6 103 04-23-2013 11:04 AM
Last Post: Tamp4h
  [Tutor] [PHP] Simple deadline hakimoxz 3 136 04-23-2013 06:56 AM
Last Post: hakimoxz
  Cara Cepat Transfer File antar Hosting dengan php uchiha_sasuke 15 292 03-27-2013 06:59 AM
Last Post: uchiha_sasuke
  [Tutor] Membaca List File dari Directory abuabu_hat10 8 188 03-24-2013 04:28 PM
Last Post: abuabu_hat10
  [Solved] proteksi file & folder pakai shell_exec() ylime19 3 140 02-26-2013 01:40 PM
Last Post: eidelweiss
Exclamation [Solved] include file PHP aneh (gaktaukenapa) Near 12 205 02-23-2013 09:49 PM
Last Post: Near
  Simple Admin Scanner PHP brianfahmi 27 692 01-29-2013 03:45 PM
Last Post: brianfahmi
  Simple Sqli Vuln Scanner PHP brianfahmi 5 218 01-25-2013 11:49 AM
Last Post: brianfahmi
  [Tutor] Scanner utk mengetahui perubahan file Regel 32 2,245 01-13-2013 07:29 PM
Last Post: Regel

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-22-2013, 07:13 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE