Welcome Guest.   Make a donation to an author on the site November 28, 2014, 07:32:10 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: ZIP to PHP converter  (Read 17992 times)
scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: January 05, 2010, 04:17:43 AM »

This is a small application that converts a ZIP file into a self-extracting PHP file. Simply upload it to your webserver, call it once, then delete it.


* Zip2PHP.exe (120 KB - downloaded 362 times.)

Requested by icekin on teh IRC channel.
Logged

housetier
Charter Honorary Member
***
Posts: 1,321


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #1 on: January 05, 2010, 06:45:04 AM »

This is a very cool idea! Can it cope with tarballs (.tar or .tar.gz) as well?
Logged
gjehle
Member
**
Posts: 285



lonesome linux warrior

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: January 05, 2010, 06:45:38 AM »

you, sir, are awesome.
this is simply ingenious.
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: January 05, 2010, 09:15:18 AM »

But what's the point?

Are there hosts which allow you to run PHP scripts but don't give FTP access? And don't allow .zip files from web-based upload forms? O_o
Logged

- carpe noctem
scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: January 05, 2010, 10:01:40 AM »

This is a very cool idea! Can it cope with tarballs (.tar or .tar.gz) as well?

Not yet, mebbe I should add it.

you, sir, are awesome.
this is simply ingenious.

Thanks.

But what's the point?

Are there hosts which allow you to run PHP scripts but don't give FTP access? And don't allow .zip files from web-based upload forms? O_o

The problem is not uploading the zips, but unzipping them server-side.
Uploading a crapload of small files takes ages over FTP.
« Last Edit: January 05, 2010, 10:11:19 AM by scancode » Logged

f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: January 05, 2010, 01:01:27 PM »

But what's the point?

Are there hosts which allow you to run PHP scripts but don't give FTP access? And don't allow .zip files from web-based upload forms? O_o

The problem is not uploading the zips, but unzipping them server-side.
Uploading a crapload of small files takes ages over FTP.
Ooooh, duh! - I thought self-extracting meant "generate .zip output". Facepalm, more coffee to me - this could be pretty darn useful when you don't have shell support smiley
Logged

- carpe noctem
Deozaan
Charter Member
***
Posts: 6,504



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: January 05, 2010, 06:11:07 PM »

That looks pretty awesome!
Logged

Stoic Joker
Honorary Member
**
Posts: 5,404



View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: January 05, 2010, 06:24:09 PM »

Any chance that could be done with .asp also (e.g. zip2asp)?
Logged
Tuxman
Supporting Member
**
Posts: 1,498


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: January 05, 2010, 07:35:39 PM »

Now I needed this a few weeks ago.  Grin
Maybe it could be useful on next Wordpress update... thank you!

 Thmbsup
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
Deozaan
Charter Member
***
Posts: 6,504



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: January 05, 2010, 08:41:39 PM »

Any chance you can do this with exe too? tongue Just kidding.

Again, awesome utility here. Thmbsup
Logged

scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: January 05, 2010, 08:59:41 PM »

Any chance you can do this with exe too? tongue Just kidding.

Again, awesome utility here. Thmbsup

EXE: use your favourite archiver. WinRAR, WinZIP, WinACE, 7Zip all do SFXs
As soon as I get ASP to work there will be an ASP version (will prolly involve two files instead of one tho)
Logged

Deozaan
Charter Member
***
Posts: 6,504



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: January 05, 2010, 09:04:44 PM »

Any chance you can do this with exe too? tongue Just kidding.

Again, awesome utility here. Thmbsup

EXE: use your favourite archiver. WinRAR, WinZIP, WinACE, 7Zip all do SFXs
As soon as I get ASP to work there will be an ASP version (will prolly involve two files instead of one tho)

Er.. What I meant was EXE2PHP. So I could execute an executable on a server via PHP. But like I said it was a joke. Wink
Logged

scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: January 05, 2010, 09:10:20 PM »

Any chance you can do this with exe too? tongue Just kidding.

Again, awesome utility here. Thmbsup

EXE: use your favourite archiver. WinRAR, WinZIP, WinACE, 7Zip all do SFXs
As soon as I get ASP to work there will be an ASP version (will prolly involve two files instead of one tho)

Er.. What I meant was EXE2PHP. So I could execute an executable on a server via PHP. But like I said it was a joke. Wink
Ever heard of system()?
Logged

VictorM
Participant
*
Posts: 16


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: January 07, 2010, 05:22:59 AM »

afraid I can see how this can be used together with a successful injection attack to deploy on a single session. yet, very interesting.
Logged

When in doubt, use http://Google
Tuxman
Supporting Member
**
Posts: 1,498


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: January 07, 2010, 05:33:24 AM »

Injecting files is not actually dangerous yet.
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: January 07, 2010, 09:51:23 AM »

Injecting files is not actually dangerous yet.
huh huh huh
Logged

- carpe noctem
Stoic Joker
Honorary Member
**
Posts: 5,404



View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: January 07, 2010, 10:56:52 AM »

Injecting files is not actually dangerous yet.
huh huh huh
ROFL (I had same reaction)
Logged
Tuxman
Supporting Member
**
Posts: 1,498


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: January 07, 2010, 12:57:02 PM »

Unpacking a ZIP file on the server does not automatically cause any danger. How?
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
Stoic Joker
Honorary Member
**
Posts: 5,404



View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: January 07, 2010, 03:34:22 PM »

Unpacking a ZIP file on the server does not automatically cause any danger. How?
Kinda depends on what's in the file...

...Sure the server isn't in any danger (unless you count reputation) but the visitors..?
Logged
Tuxman
Supporting Member
**
Posts: 1,498


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: January 07, 2010, 03:40:25 PM »

The visitors need a link to the file anyway. Where should that be?
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
Stoic Joker
Honorary Member
**
Posts: 5,404



View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: January 07, 2010, 05:54:59 PM »

The visitors need a link to the file anyway. Where should that be?
You're kidding, right?
Logged
Tuxman
Supporting Member
**
Posts: 1,498


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: January 07, 2010, 05:56:30 PM »

No, why?
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: January 07, 2010, 06:04:19 PM »

The visitors need a link to the file anyway. Where should that be?
*facepalm*

If you have the possibility to inject a zippedfile.php on a server and then run it... what harm could you possibly do? Nobody would think of putting index.php in that sfx-zip, of course no... and certainly nobody would put a connect-back shell, would they? Definitely harmless smiley
Logged

- carpe noctem
Tuxman
Supporting Member
**
Posts: 1,498


OMG not him again!

View Profile WWW Give some DonationCredits to this forum member
« Reply #23 on: January 07, 2010, 06:11:53 PM »

Depends. Does unzipping always overwrite files? It actually shouldn't. (So who cares about index.php?)
Logged

I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.
- @VeryGrumpyCat
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: January 07, 2010, 06:14:13 PM »

Depends. Does unzipping always overwrite files? It actually shouldn't.
For the intended use of this program (as I understand it: upgrading websites, especially pre-fab systems), it should.

(So who cares about index.php?)
Ask any website owner who has his site defaced smiley
Logged

- carpe noctem
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.052s | Server load: 0.07 ]