mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
6073964768
This is BN15. It is a really big change; see the PR for all the details.
81 lines
1.4 KiB
Markdown
81 lines
1.4 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Darknet](./bitburner.darknet.md) > [connectToSession](./bitburner.darknet.connecttosession.md)
|
|
|
|
## Darknet.connectToSession() method
|
|
|
|
Attempts to connect to a target darkweb server that you have previously authenticated on. Unlike `authenticate`<!-- -->, connectToSession can be used to get a session on servers at any distance.
|
|
|
|
If successful, grants the script a session, allowing it to scp() files from that target. It also allows starting scripts with exec() on that target, if the target is directly connected to the server that the script is running on, or has a backdoor or stasis link.
|
|
|
|
If unsuccessful, more detail may be able to be gathered by using heartbleed() to look at the resulting logs on the server.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
connectToSession(host: string, password: string): DarknetResult;
|
|
```
|
|
|
|
## 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 to connect to existing session
|
|
|
|
|
|
</td></tr>
|
|
<tr><td>
|
|
|
|
password
|
|
|
|
|
|
</td><td>
|
|
|
|
string
|
|
|
|
|
|
</td><td>
|
|
|
|
The server's password, to verify the session
|
|
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
|
|
**Returns:**
|
|
|
|
[DarknetResult](./bitburner.darknetresult.md)
|
|
|
|
A [DarknetResult](./bitburner.darknetresult.md) object
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 0.05 GB
|
|
|