Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

[Resolved] Reversing url_encode type effect in perl?

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

beaver6813

Established Member
Impact
16
Reversing url_encode type effect in perl?

Hey,

There is an upload script i'm using, it locks the files and only chmods them to 600, making them virtually impossible to access in php, i've managed to deconstruct how it works but to get perl to chmod the file i need to know the file name... but it only has it in url encoded form:

Code:
$tmp_filename =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;

Anyone know how to reverse this so i can have the url in plain form in perl?

Resolved. Some guy over at devshed gave the code to reverse :) For future reference the opposite would be:

Code:
$tmp_filename =~ s{%([a-fA-F0-9][a-fA-F0-9])}{pack("C", hex($1))}eg;
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back