var scr="";; var loading="";; var loaded="";; defcom downl = downl;; defcom next = next;; defcom nextpack = nextpack;; defcom getpack=getpack;; defcom version=version I;; defcom Cgoto = goto S;; var stage=0;; var typ=0;; typeof ls=[S r1];; fun searchfile(l,nm)= if l==nil then 0 else let l->[s n] in if !strcmp nm s then 1 else searchfile n nm;; fun _connected()= INETdisableProxy; _cacheActivate; _SETtext message loc "CHKPKG"; _on _channel version [_version]; _on _channel getpack []; _on _channel nextpack [];; fun getlst(l)= if l==nil then nil else let l->[x n] in [hd x atoi hd tl x atoi hd tl tl x]::getlst n;; fun checklst(l)= if l==nil then if sizeload then (_SETtext message strloc loc "TODOWNL" (itoa (sizeload>>10))::nil; set stage=1; 0) else _on _channel next [] else let l->[[s sz sign] n] in (if (_checkpack s)==nil then set sizeload = sizeload + sz else nil; checklst n);; fun __packlst(s)= checklst getlst strextr s;; fun checkreq(l)= if l==nil then if sizeload then (_SETtext message strloc loc "TODOWNL" (itoa (sizeload>>10))::nil; set stage=1; 0) else _on _channel next [] else let l->[[s [sz [sign _]]] n] in let _getpack _checkpack s -> cont in (if (cont==nil)||(strcmp sign _getlongname cont "" "#") then (set ls=s::ls; set sizeload = sizeload + atoi sz) else 0; checkreq n);; fun __require(s)= checkreq strextr s;; fun __need(s,sz,sign)= if stage==0 then (if (_checkpack s)==nil then (set sizeload = sizeload + sz) else 0; _on _channel nextpack []) else if (!searchfile ls s)&&(_checkpack s)!=nil then _on _channel nextpack [] else (set loading=s; set typ=sign; set loaded=""; _on _channel downl []; _SETtext message strloc loc "DOWNL" s::(itoa (sz>>10))::nil; 0);; fun startdown()= set stage=1; _on _channel nextpack [];; fun __endlist()= if stage==0 && sizeload then (_SETtext message strloc loc "TODOWNL" (itoa (sizeload>>10))::nil; set stage=1; _on _channel nextpack []; 0) else _on _channel next [];; fun __addscript(s)= set scr=strcat scr s; _on _channel next [];; fun __endscript()= _DSwindow win; _DSwindow winAX; _DSbitmap barre; _killchannel screen; _setrights rights; _setenv _channel nil; _script scr;; fun __down(s)= set loaded=strcat loaded s; _on _channel downl []; set sizeloaded=sizeloaded+ strlen s; let _GETbitmapSize barre -> [bw bh] in _DRAWrectangle barre 5 5 (bw-1)*sizeloaded/sizeload 10 DRAW_INVISIBLE 0 0 DRAW_SOLID 0xff; _BLTbitmap win barre 5 75 ;; fun __enddown()= _storepack (if typ==1 then munzip loaded else if typ then unzip loaded else loaded) loading; _on _channel nextpack [];; fun _closed()= _SETtext message loc "NOTAVAIL";; // Bastien liste des Multi services CC // this exploit a concrol center bug /* typeof sCCserviceList = S ;; fun makeNewServiceName(name)= let hd strtolist "a" -> minlowasc in let hd strtolist "z" -> maxlowasc in let strlen name -> size in let nil -> newname in let 0 -> i in ( while i < size && newname == nil do ( let substr name i 1 -> letter in ( if (hd strtolist letter) >= minlowasc && (hd strtolist letter) <= maxlowasc then // minLetter ( set newname = strcatn (substr name 0 i)::(struppercase letter)::(substr name i + 1 ((strlen name) - (i + 1)))::nil; ) else // autre caractère nil; ); set i = i + 1; ); newname; );; fun reconnectOnMultiService (l, adr)= while l != nil do ( let hd l -> ligne in let hd ligne -> servicename in ( if !strcmpi servicename (substr adr ((strlen adr) - (strlen servicename)) (strlen servicename)) then ( let makeNewServiceName (substr adr ((strlen adr) - (strlen servicename)) (strlen servicename)) -> newname in if newname == nil then nil else ( _on _masterchannel Cgoto [strcat (substr adr 0 ((strlen adr) - (strlen servicename))) newname]; _closemachine; ); ) else nil; ); set l = tl l; ); 0;; fun cbGetCCMultiServiceHttp(req, adr, data, code) = if (code == 0) then ( set sCCserviceList = strcat sCCserviceList data; 0; ) else if (code == 1) then ( reconnectOnMultiService strextr sCCserviceList adr; 0; ) else ( _fooS ">>>>>>>>> Recovering CCMultiServiceList from Internet failed !"; 0; ); 0;; fun getCCMultiServiceList(adr) = set sCCserviceList = ""; INETGetURL screen "http://194.146.175.220/ccmultiservice.txt" 0 @cbGetCCMultiServiceHttp adr; 0;; */ fun __FullServer()= _SETtext message loc "FULL"; set message=nil; 0;;