Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #40362

Help with reversing a function

Newsgroups comp.lang.javascript
Date 2021-08-30 05:13 -0700
Message-ID <ac3481db-6edc-40df-a6aa-e42be9e3a67fn@googlegroups.com> (permalink)
Subject Help with reversing a function
From Tenjin <jdiscordbusiness@gmail.com>

Show all headers | View raw


<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>Fun with && and ||</title>
    <script type="text/javascript">
      function g(s, C, m) {
        console.log(String.fromCharCode(96 + C));
        return (
          (!C && !s[m]) ||
          (C &&
            s[m] &&
            s[m++] == String.fromCharCode(96 + C) &&
            f(s, (++C * C++ + C++ * ++C) >> ++m, --m))
        );
      }
    </script>
  </head>
  <body style="text-align: center">
    <form
      onsubmit="alert((g(pass.value,1,0) ? 'Correct! The password is ' : 'Wrong! not ')+pass.value); return false;"
    >
      <div>
        <input type="text" name="pass" />
        <input type="submit" value="Login" />
      </div>
    </form>
  </body>
</html>

I need some help in finding what the correct password is. So far I understand that te first character must contain an "a"

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Help with reversing a function Tenjin <jdiscordbusiness@gmail.com> - 2021-08-30 05:13 -0700
  Re: Help with reversing a function Julio Di Egidio <julio@diegidio.name> - 2021-08-31 08:05 -0700

csiph-web