BXUV5DE25AR5FPXPHEOBOF4ZIXY2LSILNC7KIT4TD3EYTC3IWTUQC
SOBMS3ZSY5GBBYDR2UQT7CVGYIS755OUOLBLRZQ5XJ537I2KAXGAC
CHTEJVPDN5R2SQTOCK3SNAME5V5XCB6TRGRBCY55DJ3UQJ73QG6AC
Q2YTDYKLSHITWAY5RNXWDWHZTOQG4JQSVF4BQAPFAIS3LSPOEKNAC
4NIOFTQTOZU6AD3O4TSVE7TJWQMBTNVEYTJ3AVSPPGGDBPRMP67AC
const USAGE: &'static str = "Usage: wrong-dns [@ipv4-server] RTYPE...
const USAGE: &'static str = "Usage: wrong-dns [-s|--server=SERVER|@SERVER] RTYPE\n\nPort is always udp/53. Default server is CloudFlare 1.1.1.3.";
Port is always udp/53. Default server is CloudFlare 1.1.1.3.";
rtype: Rtype,
rtypes: Vec<Rtype>,
let q = naughty_question(args.rtype);
let mut server = ServerConf::new(format!("{server}:53").parse().unwrap(), Transport::Udp);
let mut server = ServerConf::new(format!("{server}:53").parse()?, Transport::Udp);
assert!(resolv.query(q).await.is_err());
for rtype in args.rtypes.into_iter() { let q = naughty_question(rtype); assert!(resolv.query(q).await.is_err()); }
for rtype in args.rtypes.into_iter() {
let q = naughty_question(rtype);
}
fn parse_args() -> Result<Args, lexopt::Error> {
fn parse_args() -> Result<Args, Box<dyn std::error::Error>> {
let mut rtype = Rtype::A;
let mut rtypes = vec![];
Long("help") => {
Short('h') | Long("help") => {
let val = val.into_string()?;
let val = val.parse::<String>()?;
rtype = val.parse().unwrap();
rtypes.push(val.parse()?);
} Short('s') | Long("server") => { server = parser.value()?.into_string()?;
Short('s') | Long("server") => {
server = parser.value()?.into_string()?;
_ => return Err(arg.unexpected()),
_ => return Err(arg.unexpected().into()),
Ok(Args { server, rtype })
if rtypes.is_empty() { eprintln!("{}", USAGE); std::process::exit(1); } Ok(Args { server, rtypes })
if rtypes.is_empty() {
eprintln!("{}", USAGE);
std::process::exit(1);
Ok(Args { server, rtypes })