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
2021-11-03 23:16:10 +01:00
Get the percent 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
The percentage of money you will steal from the target server with a single hack.
## Remarks
2021-10-30 21:46:34 +02:00
RAM cost: 1 GB
2021-10-30 18:34:14 +02:00
2021-11-03 23:16:10 +01:00
Returns the percentage of the specified server’ s money you will steal with a single hack. This value is returned in percentage form, not decimal (Netscript functions typically return in decimal form, but not this one).
2021-10-30 18:34:14 +02:00
## Example
2021-10-30 21:46:34 +02:00
```ts
2021-12-15 18:10:32 +01:00
//For example, assume the following returns 0.01:
2021-11-04 01:19:52 +01:00
hackAnalyze("foodnstuff");
2021-12-15 18:10:32 +01:00
//This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N*0.01% of its total money.
2021-10-30 18:34:14 +02:00
```