Jump to content

sheepz

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sheepz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=365987:date=Apr 18 2006, 06:20 AM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Apr 18 2006, 06:20 AM) [snapback]365987[/snapback][/div][div class=\'quotemain\'][!--quotec--] Tested on my WinXP development machine and working [code]<?php exec("ping 127.0.0.1",$result) echo "<pre>"; print_r($result); echo "</pre>"; ?>[/code] Output: [b]EDIT:[/b] I also had to exclude the semi-colon from my exec() line, server would not allow it - forbidden message. [/quote] sorry for the late response been really hectic at work and totally forgot =( thanks for the help =) i copied the code exactly and added the ; to the end of the exec() line. i'm still getting a Warning: exec() [function.exec]: Unable to fork [ping 127.0.0.1] in c:\Inetpub\wwwroot\shell.php on line 11 Array ( ) do i need to setup my php.ini or have my computer allow php to access shell commands?
  2. i can't seem to execute cmd commands. i must be doing it wrong. using backticks, shell_exec(), exec(), system() and no luck i can't seem to execute cmd commands. i must be doing it wrong. using backticks, shell_exec(), exec(), system() and no luck i had to leave off the terminator for almost all the lines [b];[/b] or else this forum wont let me post [code] <?php echo shell_exec(`%computername%`) echo exec(`%computername%`) echo system(`C:\WINDOWS\system32\cmd.exe %computername%`) $result = `ping.exe 127.0.0.1` echo "$result"; ?> [/code] i dont any errors but i dont get any results either. i just get a blank screen. =T any ideas?
  3. sheepz

    test

    [!--quoteo(post=365597:date=Apr 17 2006, 10:42 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 17 2006, 10:42 AM) [snapback]365597[/snapback][/div][div class=\'quotemain\'][!--quotec--] Does the post you're trying to enter contain the words "fwrite", "fopen" or any filesystem functions? It seems the routine that looks for hacking attempts is over zealous and is blocking them. Ken [/quote] none of that i was going to ask a question on shell commands
  4. sheepz

    test

    opps sorry, it wouldn't let me post a new topic. i kept getting an "you are not authorized" but i was logged in. NEW REPLY thats odd... i just posted this topic but i can't post another one. i keep getting this error when trying to post a new topic "you are unauthorized" i'm a registered user, what could be the problem?
  5. [!--quoteo(post=363868:date=Apr 11 2006, 06:10 PM:name=Myst)--][div class=\'quotetop\']QUOTE(Myst @ Apr 11 2006, 06:10 PM) [snapback]363868[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi. Probably a <FORM target="_blank" .... would do the trick. Or make a js function, that will be called onSubmit. It will check wich option in the dropdown is checked then pass it to window.open. [/quote] i haven't any experience with js yet... i hope to be learning that soon... but your suggestion works great the _blank. works exactly how i want it to function! cheers!
  6. hi i have a simple site that has a drop down list of sites. this form points to a re-direction.php page. how do i make it where when it re-directs it will open in a brand new browser window? here's the html [code] <FORM METHOD="post" ACTION="do_redirect.php">     Popular downloads      <select name="locate">     <option value="http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.html/"> Macromedia FlashPlayer </option>     <option value="http://www.apple.com/quicktime/download/win.html/"> QuickTime </option>     <option value="http://adobe.com/support/downloads/"> Adobe downloads </option>     <INPUT TYPE="submit" NAME="submit" Value="Go"></p>     </form> [/code] here's the re-direction PHP page [code] <? if ($_POST[locate]=="") {   header("Location: redirect_form.html");   exit; } else {   header("Location: $_POST[locate]");   exit; } ?> [/code] can i use window.open ? for this event? thx =)
  7. if my website does not use frames i could not perform this action without using javaScript? no options of hiding or masking. i dont mind if they could still see it in view source
  8. some websites i visit lets say for instance like www.website.com and click on the links page it would show on the address bar [a href=\"http://www.website.com/links.htm\" target=\"_blank\"]http://www.website.com/links.htm[/a] and then theres some sites that when i do the same thing like clicking on the links, or contact page it wont show. it will still only show the root [a href=\"http://www.website.com/\" target=\"_blank\"]http://www.website.com/[/a] how do i "mask" or "hide" the address to only show [a href=\"http://www.website.com/\" target=\"_blank\"]http://www.website.com/[/a] ?
  9. [!--quoteo(post=360649:date=Apr 1 2006, 09:59 AM:name=txmedic03)--][div class=\'quotetop\']QUOTE(txmedic03 @ Apr 1 2006, 09:59 AM) [snapback]360649[/snapback][/div][div class=\'quotemain\'][!--quotec--] You can request the information from the client and store it in a database. Provided that your network(s) doesn't use a dhcp you will be able to associate a username/computer name/IP/domain/time in the database. If it is a LAN or you know all the timezones involved you can get the time. You could create a management system to track the domains, IPs and systems on your network(s) as well as timezone or time in and out. PHP is a very powerful scripting language, but it does have limits. You can't be microsoft and just make up the rules whenever you like, but you can find ways to remain within the bounds of what is permissible and still achieve your goal. [/quote] unfortunately my work place does use dhcp. i like the work around suggestion tho, i would have to learn more php before i could start connecting to a database and track computers on the network. thanks for the helpful thoughts! =)
  10. [!--quoteo(post=360302:date=Mar 31 2006, 01:23 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Mar 31 2006, 01:23 AM) [snapback]360302[/snapback][/div][div class=\'quotemain\'][!--quotec--] You can only get the IP address of the client you can not get any other details that you have stated above from the client computer. [/quote] oh i thought i would be able to get the login name and domain. the reason is becase at my work we use remote desktop software, and the computer name or IP is needed. i thought i could make a list of user info like the ones stated, didn't know php isn't able to do it. i thought it was able to pull off info from the client that connects to the website... thought if i was gonna grab the IP might as well grab the rest of the info, thanks for the info
  11. hi, i want to make a php page so when a user opens the site it will show his: 1. Computer name 2. User name 3. Domain 4. IP address 5. Time i did a search and found how to display the IP address [code] <? $address=getenv("REMOTE_ADDR"); echo "Your current computers IP address is $address."; ?> [/code] what's the code for the rest of the info? thanks for help
  12. you are awsome, it works exactly the way i want it to! thx a bunch!
  13. [!--quoteo(post=359961:date=Mar 30 2006, 01:40 AM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Mar 30 2006, 01:40 AM) [snapback]359961[/snapback][/div][div class=\'quotemain\'][!--quotec--] try using scripts/ instead of /scripts/ because /scripts/ points to the root of the hdd then /scripts which im guessing your looking to search a directory within the foleder your already in which is called scripts? [/quote] the folder i want people to access is "c:\inetpub\wwwroot\scripts" when i put the folder path to "./" it will get me to the root directory of wwwRoot, and all the subfolders open correctly. When i put the folder path to "/wwwroot/scripts/" all the files work fine but the subfolder do not open correctly. i tried putting the path to "scripts/" but still no luck, when i click on the subfolders i get a "page cannot be displayed. thanks for the reply! =)
  14. i want to have a script that will work just like "directory browsing" i found this script on this site, i'm not sure where i found it, but it does work. the problem that i do have is when i change the $path = "/scripts/"; the folders with in that folder wont open. it gives me a "page cannot be found" but if i use $path = "./"; it works fine, the folders within that folder would open just like "directory browsing" the reason i need this to be /scripts/ is because i dont want the users to be able to access the wwwroot folder and it's contents. is there something wrong with the script that when i change the $path it wont open subfolders? if i use the "./" root folder it opens subfolders fine. [code] <html> <head> <title> Directory List</title> </head> <body> <h2> Directory listing </h2> <? $path = "./"; $dir = opendir($path); echo "<ul>\n"; while($file = readdir($dir))     {     if ($file != "." && $file != ".." && $file != ".php")         {         echo "<li><a href = \"" .$file. "\" target = \" _blank\"> ".$file." </a></li> \n";         }     } echo "</ul>\n"; closedir($dir); ?> </body> </html> [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.