seperate cli stuff from library stuff, and put it in another crate
This commit is contained in:
parent
d6aedb771c
commit
c6d9fd0d75
9 changed files with 56 additions and 3 deletions
23
Cargo.lock
generated
23
Cargo.lock
generated
|
@ -1,5 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "1.0.2"
|
||||
|
@ -1241,6 +1243,26 @@ version = "0.1.5"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
|
||||
|
||||
[[package]]
|
||||
name = "steamguard"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
"cookie",
|
||||
"hmac-sha1",
|
||||
"lazy_static 1.4.0",
|
||||
"log",
|
||||
"rand",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"rsa",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"standback",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "steamguard-cli"
|
||||
version = "0.2.0"
|
||||
|
@ -1261,6 +1283,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"standback",
|
||||
"stderrlog",
|
||||
"steamguard",
|
||||
"termion",
|
||||
"text_io",
|
||||
"uuid",
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
[workspace]
|
||||
|
||||
members = [
|
||||
"steamguard"
|
||||
]
|
||||
|
||||
[package]
|
||||
name = "steamguard-cli"
|
||||
version = "0.2.0"
|
||||
|
@ -26,3 +32,4 @@ regex = "1"
|
|||
lazy_static = "1.4.0"
|
||||
uuid = { version = "0.8", features = ["v4"] }
|
||||
termion = "1.5.6"
|
||||
steamguard = { path = "./steamguard" }
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::collections::HashMap;
|
|||
use reqwest::{Url, cookie::{CookieStore}, header::COOKIE};
|
||||
use serde::Deserialize;
|
||||
use serde_json::Value;
|
||||
use steamguard_cli::{SteamGuardAccount, steamapi::Session};
|
||||
use steamguard::{SteamGuardAccount, steamapi::Session};
|
||||
use log::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::io::BufReader;
|
|||
use std::path::Path;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use std::error::Error;
|
||||
use steamguard_cli::SteamGuardAccount;
|
||||
use steamguard::SteamGuardAccount;
|
||||
use log::*;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
extern crate rpassword;
|
||||
use steamguard_cli::*;
|
||||
use steamguard::{SteamGuardAccount, Confirmation, ConfirmationType, steamapi};
|
||||
use std::collections::HashSet;
|
||||
use std::{io::{Write, stdout, stdin}, path::Path};
|
||||
use clap::{App, Arg, crate_version};
|
||||
|
|
23
steamguard/Cargo.toml
Normal file
23
steamguard/Cargo.toml
Normal file
|
@ -0,0 +1,23 @@
|
|||
[package]
|
||||
name = "steamguard"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
description = "Library for generating 2fa codes for Steam and responding to mobile confirmations."
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = "^1.0"
|
||||
hmac-sha1 = "^0.1"
|
||||
base64 = "0.13.0"
|
||||
reqwest = { version = "0.11", features = ["blocking", "json", "cookies", "gzip"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
rsa = "0.5.0"
|
||||
rand = "0.8.4"
|
||||
standback = "0.2.17" # required to fix a compilation error on a transient dependency
|
||||
cookie = "0.14"
|
||||
regex = "1"
|
||||
lazy_static = "1.4.0"
|
||||
uuid = { version = "0.8", features = ["v4"] }
|
||||
log = "0.4.14"
|
Loading…
Reference in a new issue