Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PHP] Challenge Reverse This Function !
25-06-2013, 01:22 AM, (This post was last modified: 25-06-2013, 07:04 PM by shahril.)
Post: #1
[PHP] Challenge Reverse This Function !
meriah tngk ramai2 mustah2 tbd buat chal..
dngn ini saya pon nk buat jgk, tapi simple je lah ;d

level : medium (bagi aku la).. xtaulah kalau2 mastah di sini anggap nie easy je ;d

task :-

1. Buat satu function untuk decode code dibawah nih..
2. Hantar decrypt function dan decipher code dkt aku..

jadi korng kena hantar dua, function dan jgk string yng dh decrypt..
untuk dptkan string yg dh decrypt, korng kena la buat function untuk decrypt code tu dulu kan ? ;d

PM jawapan korng dkt aku untuk check..

Solver :-
1. Ahlspiess
2. pers0nant
3. smael
4. JejakaPemalu
5.
6.

nie string tersebut..

TBD Paste, sorry guys, letak dalam tbd dia terkeluar line pulak..

nie function yng digunakan untuk encrypt code2 sampah di atas tuh..

PHP Code:
function encrypt($string$key){ // $key must be a-z, A-Z, 1-9 only !
    
$key strtolower($key);
    
$string_compress base64_encode(gzcompress($string9));
    
$dafuq_is_this = array(
        
"a"=>"9421617249","b"=>"1231239860","c"=>"1699014866","d"=>"9009913282",
        
"e"=>"2913340004","f"=>"3062956518","g"=>"6004707234","h"=>"1492115780",
        
"i"=>"2081584155","j"=>"3198121526","k"=>"9814119013","l"=>"9512910499",
        
"m"=>"4469324586","n"=>"4723632454","o"=>"1849773440","p"=>"1419274883",
        
"q"=>"5692948498","r"=>"7566969887","s"=>"3931899183","t"=>"2939022155",
        
"u"=>"4207411435","v"=>"4678529157","w"=>"4956077528","x"=>"2036916561",
        
"y"=>"8893064924","z"=>"8350009263","A"=>"9337115968","B"=>"5856227829",
        
"C"=>"9892784771","D"=>"5141167703","E"=>"5408753411","F"=>"9314402020",
        
"G"=>"5372407568","H"=>"6107768282","I"=>"8324315302","J"=>"7285747572",
        
"K"=>"8170724801","L"=>"4329022541","M"=>"7777863357","N"=>"9252308957",
        
"O"=>"6527144067","P"=>"7591982370","Q"=>"8765219456","R"=>"9996468658",
        
"S"=>"2315614825","T"=>"9614992897","U"=>"1415743541","V"=>"7008563323",
        
"W"=>"7181962784","X"=>"4347642725","Y"=>"8947585479","Z"=>"1389374220",
        
"1"=>"8026171886","2"=>"3903663008","3"=>"2426290782","4"=>"6919236811",
        
"5"=>"2253672271","6"=>"1763406754","7"=>"2775464641","8"=>"2146457043",
        
"9"=>"5904574458"
    
);
    for(
$i=0;$i<strlen($key);$i++){
        
$string_compress str_replace($key[$i], $dafuq_is_this[$key[$i]], $string_compress);
    }
    
$c bin2hex($string_compress);
    for(
$i=0;$i<strlen($key);$i++){
        
$c str_replace($key[$i], $dafuq_is_this[$key[$i]], $c);
    }
    
$c base(strval(bin2hex(base64_encode(gzcompress($c9)))), 162);
    
$c bin2hex(base64_encode(gzcompress($c9)));
    return 
base64_encode(gzcompress(base64_encode($c), 9));
}

function 
base($number$fromBase$toBase) {
    
$digits '0123456789abcdefghijklmnopqrstuvwxyz';
    
$length strlen($number);
    
$result '';
    
$nibbles = array();
    for (
$i 0$i $length; ++$i) {
        
$nibbles[$i] = strpos($digits$number[$i]);
    }
    do {
        
$value 0;
        
$newlen 0;
        for (
$i 0$i $length; ++$i) {
            
$value $value $fromBase $nibbles[$i];
            if (
$value >= $toBase) {
                
$nibbles[$newlen++] = (int)($value $toBase);
                
$value %= $toBase;
            }
            else if (
$newlen 0) {
                
$nibbles[$newlen++] = 0;
            }
        }
        
$length $newlen;
        
$result $digits[$value].$result;
    }
    while (
$newlen != 0);
    return 
$result;


pembantu :-

disebabkan function hex2bin belum ada lagi di php below than 5.4, jadi aku sediakan function tuh..

PHP Code:
function hex2bin($hex_string) {
    
$pos 0;
    
$result '';
    while (
$pos strlen($hex_string)) {
      if (
strpos(" \t\n\r"$hex_string{$pos}) !== FALSE) {
        
$pos++;
      } else {
        
$code hexdec(substr($hex_string$pos2));
        
$pos $pos 2;
        
$result .= chr($code); 
      }
    }
    return 
$result;


Hint :-
Key ? xyah rasanya, tu kelemahan function tuh, key tu x berguna jika nk decode..

semua info dh disediakan ;d selamat berjaya..
Reply
25-06-2013, 04:23 PM,
Post: #2
RE: [PHP] Challenge Reverse This Function !
bump utk celen yg menarik ;d
puas sudah menanam ubi, nenas juga dibeli orang, puas sudah aku berbakti, pengganas juga dipandang orang

Quote:A true warrior need blood on his sword; A true pirate never afraid to sail the red sea.
Reply
25-06-2013, 05:53 PM,
Post: #3
RE: [PHP] Challenge Reverse This Function !
Tung ah rempah
[Image: 76561198059652827.png]
[Image: TkeHBe6.gif]
Reply
25-06-2013, 05:56 PM,
Post: #4
RE: [PHP] Challenge Reverse This Function !
mustah shahril tunjuk belang ;d
Reply
25-06-2013, 05:58 PM, (This post was last modified: 25-06-2013, 05:58 PM by shahril.)
Post: #5
RE: [PHP] Challenge Reverse This Function !
(25-06-2013, 05:56 PM)pers0nant Wrote: mustah shahril tunjuk belang ;d

nie berkat aku jadi anak didik mustah asasi personant ;d
Reply
25-06-2013, 06:00 PM,
Post: #6
RE: [PHP] Challenge Reverse This Function !
(25-06-2013, 05:58 PM)shahril Wrote: nie berkat aku jadi anak didik mustah asasi personant ;d

aku asas je baru.. ko dah complex OK
Reply
25-06-2013, 06:04 PM,
Post: #7
RE: [PHP] Challenge Reverse This Function !
(25-06-2013, 06:00 PM)pers0nant Wrote: aku asas je baru.. ko dah complex OK

ayat anda sngt gei ok ;d jgn la troll aku dkt sini, malu la orng lain tngk OK OK
Reply
25-06-2013, 06:12 PM,
Post: #8
RE: [PHP] Challenge Reverse This Function !
Untuk memeriahkan lagi majlis mesyuarat php, aku dah submit. Tak tau la betul ke tak Hmm
Reply
25-06-2013, 06:23 PM,
Post: #9
RE: [PHP] Challenge Reverse This Function !
bounty?
[Image: 3EsGZgg.png]
uno akhirnya kau ngaku gak ye
Reply
25-06-2013, 06:38 PM,
Post: #10
RE: [PHP] Challenge Reverse This Function !
(25-06-2013, 06:23 PM)p0pc0rn Wrote: bounty?
abam pOpcOrn dah international mau bouty sajjje OK
However near and dear you are with wife, children, friends, families they are not you; they are outside of you. The inside of you says who is near. If nothing is said than you are foreveralone. Raise your iman and you shall not be foreveralone.
Reply
25-06-2013, 07:04 PM, (This post was last modified: 25-06-2013, 07:23 PM by shahril.)
Post: #11
RE: [PHP] Challenge Reverse This Function !
(25-06-2013, 06:12 PM)smael Wrote: Untuk memeriahkan lagi majlis mesyuarat php, aku dah submit. Tak tau la betul ke tak Hmm

betul, ;d ^^

(25-06-2013, 06:23 PM)p0pc0rn Wrote: bounty?

maksudnya abam ? Hmm
nie challenge sekadar nk fun, xde duit yng disediakan ;d
Reply
25-06-2013, 08:20 PM,
Post: #12
RE: [PHP] Challenge Reverse This Function !
no moar free bug!! hahaha..
aku nk test gak.bila free leh usha nk reverse code ni
[Image: 3EsGZgg.png]
uno akhirnya kau ngaku gak ye
Reply
26-06-2013, 12:58 PM,
Post: #13
RE: [PHP] Challenge Reverse This Function !
dah hantar xD
shahril tolong cek
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Challenge - Paan 0b0x3d 7 730 11-12-2013, 02:42 AM
Last Post: JohnWhite
  TBD Challenge #1, Menang RM100 suhz 99 14,289 14-11-2013, 01:43 AM
Last Post: RFC792
  Programming Challenge 1 - Membina Segi Tiga s3m00t 49 7,606 29-10-2013, 09:22 PM
Last Post: Cybercrookz
  php reverse challenge lvl easy firdaushatta 10 870 25-07-2013, 02:18 AM
Last Post: firdaushatta
  [TBD Challenge] Data Forensic v0.0.0.0.0xXXXX1029939392 RFC792 24 2,296 06-07-2013, 07:12 PM
Last Post: RFC792
  Steganography Challenge suhz 35 2,590 04-07-2013, 01:18 PM
Last Post: Codeshift3r
  [TBD Challenge] Log Analysis Challenge #1 ak47suk1 15 1,328 01-07-2013, 11:00 PM
Last Post: shahril
  Firefly Challenge UnKn0wN 24 2,688 28-10-2012, 09:33 PM
Last Post: shadowmacx
  Wargames2012 Challenge Ahlspiess 26 4,397 21-07-2012, 06:19 PM
Last Post: kryp70
  Pijat challenge #1 pijat 5 1,208 20-06-2012, 11:05 PM
Last Post: kryp70

Forum Jump: