blob: 3ea55ded0ddd86460dac11758f128c2a1bc774ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace WinKeyRecover
{
internal class SaveAsJson: ISaver
{
public void Save(List<List<string>> keysFound)
{
string jsonString = JsonSerializer.Serialize(keysFound);
string fileName = Environment.GetEnvironmentVariable("userprofile") + "\\Desktop\\keys.json";
StreamWriter writer = new StreamWriter(fileName);
writer.WriteLine(jsonString);
writer.Close();
Console.WriteLine(jsonString);
}
}
}
|