mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
99 lines
2.1 KiB
Markdown
99 lines
2.1 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Darknet](./bitburner.darknet.md) > [authenticate](./bitburner.darknet.authenticate.md)
|
|
|
|
## Darknet.authenticate() method
|
|
|
|
Sends a network request to try to authenticate on a darkweb server. The target server must be directly connected to the server that the script is running on. The speed of authentication scales with the number of threads used.
|
|
|
|
If successful, grants the current script a session, allowing it to exec() scripts on that server, or scp() files to it. (scp() \*from\* the server is always allowed.)
|
|
|
|
Note that the charisma level on a server is not a requirement for authentication, but authentication takes longer if the player's charisma is below the server's charisma level.
|
|
|
|
Note that the session granted is only for the current script instance (by PID) - other running scripts will need to use connectToSession with the correct password to also get a session with the target server.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
authenticate(host: string, password: string, additionalMsec?: number): Promise<DarknetResult & { data?: any }>;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
<table><thead><tr><th>
|
|
|
|
Parameter
|
|
|
|
|
|
</th><th>
|
|
|
|
Type
|
|
|
|
|
|
</th><th>
|
|
|
|
Description
|
|
|
|
|
|
</th></tr></thead>
|
|
<tbody><tr><td>
|
|
|
|
host
|
|
|
|
|
|
</td><td>
|
|
|
|
string
|
|
|
|
|
|
</td><td>
|
|
|
|
Hostname/IP of the target server (connected to the current server) to try a password.
|
|
|
|
|
|
</td></tr>
|
|
<tr><td>
|
|
|
|
password
|
|
|
|
|
|
</td><td>
|
|
|
|
string
|
|
|
|
|
|
</td><td>
|
|
|
|
Password to attempt to authenticate with.
|
|
|
|
|
|
</td></tr>
|
|
<tr><td>
|
|
|
|
additionalMsec
|
|
|
|
|
|
</td><td>
|
|
|
|
number
|
|
|
|
|
|
</td><td>
|
|
|
|
_(Optional)_ Optional. The number of additional milliseconds to add to the run time of the authentication request. Default is 0.
|
|
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
|
|
**Returns:**
|
|
|
|
Promise<[DarknetResult](./bitburner.darknetresult.md) & { data?: any }>
|
|
|
|
A promise that resolves to a [DarknetResult](./bitburner.darknetresult.md) object. The resolved object may contain an optional property. The type of this property is intentionaly undocumented. You are supposed to experiment and discover the content of this property.
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 0.4 GB
|
|
|