2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2021-11-04 01:19:52 +01:00
[Home ](./index.md ) > [bitburner ](./bitburner.md ) > [NS ](./bitburner.ns.md ) > [hackAnalyze ](./bitburner.ns.hackanalyze.md )
2021-10-30 18:34:14 +02:00
2021-11-04 01:19:52 +01:00
## NS.hackAnalyze() method
2021-10-30 18:34:14 +02:00
2022-01-02 01:09:44 +01:00
Get the part of money stolen with a single thread.
2021-10-30 18:34:14 +02:00
< b > Signature:< / b >
```typescript
2021-11-04 01:19:52 +01:00
hackAnalyze(host: string): number;
2021-10-30 18:34:14 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2021-10-30 21:46:34 +02:00
| host | string | Hostname of the target server. |
2021-10-30 18:34:14 +02:00
< b > Returns:< / b >
number
2022-01-02 01:09:44 +01:00
The part of money you will steal from the target server with a single thread hack.
2021-10-30 18:34:14 +02:00
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 1 GB
2021-10-30 18:34:14 +02:00
2022-01-02 01:09:44 +01:00
Returns the part of the specified server’ s money you will steal with a single thread hack.
2021-11-03 23:16:10 +01:00
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-12-15 18:10:32 +01:00
//For example, assume the following returns 0.01:
2022-01-08 19:25:06 +01:00
var hackAmount = hackAnalyze("foodnstuff");
//This means that if hack the foodnstuff server using a single thread, then you will steal 1%, or 0.01 of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.
```
## Example 2
```ts
// NS2:
//For example, assume the following returns 0.01:
const hackAmount = ns.hackAnalyze("foodnstuff");
2022-01-02 01:09:44 +01:00
//This means that if hack the foodnstuff server using a single thread, then you will steal 1%, or 0.01 of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.
2021-10-30 18:34:14 +02:00
```