FT3 Posted October 3, 2011 Report Share Posted October 3, 2011 Labdien Gribeju jautat vai ir iespējams no php formas aizsutit comandu uz cmd ? Quote Link to comment Share on other sites More sharing options...
briedis Posted October 3, 2011 Report Share Posted October 3, 2011 Jā, protams. exec($_POST['komanda); Tikai, cerams, ka zini ko dari - sekas var būt bēdīgas ja šāda vara nonāk ļaundara rokās :) Quote Link to comment Share on other sites More sharing options...
FT3 Posted October 4, 2011 Author Report Share Posted October 4, 2011 <?php $text = $_POST['text']; if($_POST['go']){ exec("/say $text"); } ?> <form method="POST"> <input name="text" > <input type="submit" name="go"> </form> mans kods izskatas šadi , bet nekadu komandu vins neaizsuta uz cmd ;[[ Quote Link to comment Share on other sites More sharing options...
Kavacky Posted October 4, 2011 Report Share Posted October 4, 2011 if ( isset($_POST['go']) ) Un <input type="submit" name="go" value="Gogogo" /> Quote Link to comment Share on other sites More sharing options...
briedis Posted October 4, 2011 Report Share Posted October 4, 2011 Tagad pats atver cmd, ieraksti tieši to pašu: "/say blabla" un paskaties, kas izvadīsies. Palasi arī exec manuāli, ir iespēja padot arī citus argumentus šai funkcijai, kas varētu palīdzēt atkost problēmu... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.