Files
bitburner-src/markdown/bitburner.singularity.getdarkwebprogramcost.md
2026-02-13 11:51:42 -08:00

74 lines
1.6 KiB
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Singularity](./bitburner.singularity.md) &gt; [getDarkwebProgramCost](./bitburner.singularity.getdarkwebprogramcost.md)
## Singularity.getDarkwebProgramCost() method
Check the price of an exploit on the dark web
**Signature:**
```typescript
getDarkwebProgramCost(programName: ProgramName): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
programName
</td><td>
[ProgramName](./bitburner.programname.md)
</td><td>
Name of program to check the price of
</td></tr>
</tbody></table>
**Returns:**
number
Price of the specified darkweb program (if not yet purchased), 0 if it has already been purchased, or -1 if Tor has not been purchased. Throws an error if the specified program/exploit does not exist
## Remarks
RAM cost: 0.5 GB \* 16/4/1
This function allows you to check the price of a darkweb exploit/program. You MUST have a TOR router in order to use this function. The price returned by this function is the same price you would see with buy -l from the terminal. Returns the cost of the program if it has not been purchased yet, 0 if it has already been purchased, or -1 if Tor has not been purchased (and thus the program/exploit is not available for purchase).
If the program does not exist, an error is thrown.
## Example
```js
const programName = "BruteSSH.exe";
const cost = ns.singularity.getDarkwebProgramCost(programName);
if (cost > 0) ns.tprint(`${programName} costs $${ns.format.number(cost)}`);
```