> For the complete documentation index, see [llms.txt](https://kunalwalavalkar.gitbook.io/write-ups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kunalwalavalkar.gitbook.io/write-ups/root-me/web-client/javascript-native-code.md).

# Javascript - Native code

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FaZzyY0rFLzIFPSfNarb5%2F1.png?alt=media&amp;token=1ca28c33-18ae-427f-b806-143f43eb58b1" alt=""><figcaption></figcaption></figure>

The website prompts us to enter a password.

Let's check the source code.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FlAwG1wedKtyVmaiTA0O9%2F2.png?alt=media&amp;token=63fc7019-f8a8-4367-89f6-42c7e0709d9a" alt=""><figcaption></figcaption></figure>

If we replace the last pair of brackets, to `toString()`, we can see the deobfuscated Javascript.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2Fm5gS73hnpJuHY54k5834%2F3.png?alt=media&amp;token=eb576045-5ec5-4d91-9fa7-7afac55bf2be" alt=""><figcaption></figcaption></figure>

```js
function anonymous() 
{
	a=prompt('Entrez le mot de passe');
	if(a=='toto123lol'){
		alert('bravo');
	}else{
		alert('fail...');
	}
}
```

### Password

```
toto123lol
```
