2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [bitburner ](./bitburner.md ) > [Singularity ](./bitburner.singularity.md ) > [purchaseProgram ](./bitburner.singularity.purchaseprogram.md )
## Singularity.purchaseProgram() method
2022-01-16 00:39:37 +01:00
Purchase a program from the dark web.
2021-10-30 18:34:14 +02:00
< b > Signature:< / b >
```typescript
2021-11-03 05:27:21 +01:00
purchaseProgram(programName: string): boolean;
2021-10-30 18:34:14 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-11-03 05:27:21 +01:00
| programName | string | Name of program to purchase. |
2021-10-30 18:34:14 +02:00
< b > Returns:< / b >
boolean
True if the specified program is purchased, and false otherwise.
## Remarks
2022-01-16 00:39:37 +01:00
RAM cost: 2 GB \* 16/4/1
2021-11-03 05:27:21 +01:00
This function allows you to automatically purchase programs. You MUST have a TOR router in order to use this function. The cost of purchasing programs using this function is the same as if you were purchasing them through the Dark Web using the Terminal buy command.
2022-01-08 19:25:06 +01:00
## Example 1
2021-10-30 18:34:14 +02:00
2021-10-30 21:46:34 +02:00
```ts
2022-01-08 19:25:06 +01:00
// NS1
2021-10-30 18:34:14 +02:00
purchaseProgram("brutessh.exe");
```
2022-01-08 19:25:06 +01:00
## Example 2
```ts
// NS2
ns.purchaseProgram("brutessh.exe");
```