Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

dhcplayer

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dhcplayer - npm Package Compare versions

Comparing version
0.1.6
to
0.1.7
+1
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "639a3b6ab0a06078ce229a52b14616bae8d9c526"
"sha1": "e596a099323b4a873ca6e2028ce3f2372e7e7690"
},
"path_in_vcs": ""
}

@@ -98,3 +98,3 @@ # This file is automatically @generated by Cargo.

name = "dhcplayer"
version = "0.1.6"
version = "0.1.7"
dependencies = [

@@ -101,0 +101,0 @@ "clap",

@@ -15,3 +15,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "dhcplayer"
version = "0.1.6"
version = "0.1.7"
authors = ["Eloy Pérez <zer1t0ps@protonmail.com>"]

@@ -18,0 +18,0 @@ description = "A tool to play and attack DHCP"

@@ -22,2 +22,13 @@ use clap::ArgMatches;

pub fn is_u32(v: String) -> Result<(), String> {
v.parse::<u32>().map_err(|_| {
format!(
"Incorrect value '{}' must be an unsigned integer of 32 bits (u32)",
v
)
})?;
return Ok(());
}
pub fn option_keywords() -> HashMap<&'static str, u8> {

@@ -24,0 +35,0 @@ let mut k = HashMap::new();

@@ -122,2 +122,29 @@ use clap::{App, Arg, ArgMatches, SubCommand};

.arg(
Arg::with_name("lease-time")
.long("lease-time")
.value_name("seconds")
.takes_value(true)
.default_value("86400")
.validator(helpers::is_u32)
.help("IP lease time (in seconds)"),
)
.arg(
Arg::with_name("renewal-time")
.long("renewal-time")
.value_name("seconds")
.takes_value(true)
.default_value("43200")
.validator(helpers::is_u32)
.help("Renewal time (in seconds)"),
)
.arg(
Arg::with_name("rebinding-time")
.long("rebinding-time")
.value_name("seconds")
.takes_value(true)
.default_value("75600")
.validator(helpers::is_u32)
.help("Rebinding time (in seconds)"),
)
.arg(
Arg::with_name("verbosity")

@@ -148,2 +175,5 @@ .short("v")

pub netbios: Use<Vec<Ipv4Addr>>,
pub ip_lease_time: u32,
pub renewal_time: u32,
pub rebinding_time: u32,
pub verbosity: usize,

@@ -171,2 +201,5 @@ }

udp_bind: !matches.is_present("no-bind"),
ip_lease_time: to_u32(matches, "lease-time"),
renewal_time: to_u32(matches, "renewal-time"),
rebinding_time: to_u32(matches, "rebinding-time"),
verbosity: matches.occurrences_of("verbosity") as usize,

@@ -177,2 +210,6 @@ }

fn to_u32(matches: &ArgMatches, name: &str) -> u32 {
return matches.value_of(name).unwrap().parse().unwrap();
}
fn use_string(matches: &ArgMatches, name: &str) -> Use<String> {

@@ -185,3 +222,2 @@ match matches.is_present(name) {

fn use_ips(matches: &ArgMatches, name: &str) -> Use<Vec<Ipv4Addr>> {

@@ -193,3 +229,1 @@ match matches.is_present(name) {

}

@@ -78,5 +78,5 @@ use crate::args;

let dhcp_config = ServerConfig {
ip_lease_time: 3600,
renewal_time: 1800,
rebinding_time: 3150,
ip_lease_time: args.ip_lease_time,
renewal_time: args.renewal_time,
rebinding_time: args.rebinding_time,
ips_pool: IpsPool::new(start_ip, end_ip),

@@ -83,0 +83,0 @@ start_ip,

@@ -48,2 +48,6 @@ mod config;

info!("IP lease time: {} seconds", srv_conf.ip_lease_time);
info!("Renewal time: {} seconds", srv_conf.renewal_time);
info!("Rebinding time: {} seconds", srv_conf.rebinding_time);
let dhcp_port = dhcp::DHCP_SERVER_PORT;

@@ -50,0 +54,0 @@ let _socket = match args.udp_bind {

Sorry, the diff of this file is not supported yet