Jump to content

johnny042

New Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

johnny042's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. BOTH were great replies !! It was Jessica for the win, Thank you Based Jessica :happy-04:
  2. So I have a need to generate md5 hashes for multiple lines out of a textarea. The problem is all of the individual "\n" lines are returning incorrect md5 outputs EXCEPT for the last line (it always returns the correct md5 output) Here is the code and a sample input/output test at the bottom: The HTML form <form action="hash.php" method="post"> <textarea name="hashed" rows=20 cols=41></textarea></br> <input type="submit" value="Generate"> </form> PHP code used to take individual \n lines and generate the individual line md5 output $data = $_POST['hashed'] ; foreach(explode("\n", $data) as $line) { $hashedData = hash('md5',$line, FALSE); echo '<strong>'. $hashedData .'</strong></br>'; } 1. You'll notice the first line (apple) generates "md5(apple + something else)" (I'm thinking the actual \n is generated as part of apple hence wrong output) 2. Same thing happens to orange 3. The third line (apple) generates the correct "md5(apple)" output Sample input: apple orange apple Sample output: 2f9c032ecf479087117e8d6f7fe1a84f 5b3ef7abd937c92e99d740df67182c1b 1f3870be274f6c49b3e31a0c6728957f Any suggestions or a possible workaround? A few things already tried: - using commas as a separator but it didn't work out too well - tried reverse-md5'ing the wrong output but no one has yet to rainbow it - Clean $line from enter \n spaces and %20 spaces, no dice $clean = str_replace(' ','',$str);
  3. Did anyone have trouble installing VSPHP on Visual Studio 2010? It hangs at the end of the installer and then rollsback/kills the installation. This also happens running the .msi as Admin.
  4. Thanks for the suggestion on the rewrite rule, i made that change just in case and still cant end the session using the rewrite rule. Again thanks for the tip.
  5. Hello everyone, this is my first post on this forum. I recently ran into a bug when it comes to ending a cookie session. Link A points to domain.com/file/login/?do=logout&sess=G2LRoEFkSgBklgk When I click link A it takes me to the logout page but does not end the session. Now, link B points to domain.com/file/login.php?do=logout&sess=G2LRoEFkSgBklgk When I click link B it also takes me to the logout page and also ends the session. So basically my problem is that when using the rewritten link I cannot end my session cookie. Any pointers anyone?? Thanks. By the way, I'm a total n0ob when it comes to mod rewrite so I might not even have the correct rewrite rule htaccess: Options RewriteEngine on RewriteRule file/login/(.*) /file/login.php$1 [L]
  6. Hello everyone, first post on this forum. I'm in the process of developing a web app to manage CPEs throughout a network using PHP and SNMP. Two questions: 1. With SNMP, is it possible to communicate with a end-device aside from using a static hostname or IP address. 2. I am using NET SNMP to issue commands. So far I haven't been successful in retrieving the correct data from my CPE. Only the snmpwalk command has been able to retrieve data [only downside is I cannot specify an attribute so I receive a long list of parameters] For example: //get system name $sysname = snmpget($host, $community, "system.sysName.0"); echo " Router Name: " . $sysname . ""; Warning: snmpget() [function.snmpget]: Invalid object identifier: system.sysName.0 in ^ will error out. This same command issue via CLI will work properly. //try snmpwalk $swalk = snmpwalk($host, $community, ""); print "<h2>Stats for ". $host ."</h2> SNMPWalk: <br /> " . $swalk . "<br>" ; foreach ($swalk as $val) {print "$val</br>";} ^ my only solution so far, but then I get a really long list of data. Any help is greatly appreciated. Thanks.
×
×
  • 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.