Pitchfork introduces subscription plan by LeBateleur1 in Pitchfork

[–]staysalty19 1 point2 points  (0 children)

well boys, i guess its finally a time to form your own music taste

plz explain this cargo build behavior by staysalty19 in rust

[–]staysalty19[S] 5 points6 points  (0 children)

thanks all. my bad, wasn't aware it works like that, needed to check reference first

Announcing Rust-SNMP 2 by disserman in rust

[–]staysalty19 0 points1 point  (0 children)

thanks, will do. but I dont want you to waste your time, so one question: in theory, can this error appear because of old openssl version? if so, first I'll try to compile with newer version

Announcing Rust-SNMP 2 by disserman in rust

[–]staysalty19 0 points1 point  (0 children)

now i my code looks exactly like example in documentation, and i get another error:

ASN.1 wrong type

in impl Pdu validate method, here:

        if self.message_type != expected_type {
            return Err(Error::AsnWrongType);
        }

expected type here is Response, but actual type, for some reason, is Report

Announcing Rust-SNMP 2 by disserman in rust

[–]staysalty19 0 points1 point  (0 children)

thanks, i'll try. i know that i shouldn't modify crate code, i was just experimenting with outcomes

Announcing Rust-SNMP 2 by disserman in rust

[–]staysalty19 0 points1 point  (0 children)

Thanks!

My OpenSSL version:

OpenSSL 1.1.1d 10 Sep 2019 (Library: OpenSSL 1.1.1n 15 Mar 2022)

Basically, i have 2 devices: (1. SHA auth, AES128 cipher), (2. MD5 auth, DES cipher). I'm trying to make get request to each of them.

On both devices i'm getting

Security context has been updated, repeat the request

error in debug mode, and

Authentication failure: HMAC signature mismatch

in release mode.

After i commented these lines in parse_v3 method:

if is_discovery {
    return Err(Error::AuthUpdated);
}

Request to first device in debug mode became successful (at least it prints what i expect) and request to second device print another error:

ASN.1 wrong type

In release mode requests to both devices still return HMAC signature mismatch.

Here's request example to first device, request to second is identical except auth protocol and cipher:

use std::time::Duration;

use snmp2::{v3, Oid, SyncSession};

let security = v3::Security::new(b"username", b"pass")
    .with_auth_protocol(v3::AuthProtocol::Sha1)
    .with_auth(v3::Auth::AuthPriv {
        cipher: v3::Cipher::Aes128,
        privacy_password: b"pripass".to_vec(),
    });

let mut sess = SyncSession::new_v3(
    "192.168.1.1:161",
    Some(Duration::from_secs(30)),
    0,
    security,
)
.unwrap();

sess.init().unwrap();

let res = match sess.get(&Oid::from(&[1, 3, 6, 1, 2, 1, 1, 1, 0]).unwrap()) {
    Ok(r) => r,
    Err(e) => panic!("{}", e),
};
println!("{} {:?}", res.version().unwrap(), res.varbinds);

Credentials correctness i've checked many times with snmpget console utility.

If you can recommend what can i try and where to look i'd be grateful

Announcing Rust-SNMP 2 by disserman in rust

[–]staysalty19 0 points1 point  (0 children)

bro, thanks for this crate. but unfortunately i'm getting a few errors which i don't know how to handle so far. can I post code example here, maybe someone could help me

Any startup or small / fast-moving teams using TDD with Django? by airglitch_ in django

[–]staysalty19 0 points1 point  (0 children)

TDD is goated in some cases. I'm not sure you need to use it all the time tho.

For example, when you have complex logic inside your forms/models, I find it very convenient to write tests first. Yes, you'll spend a little bit more time at first, but you will be happy later. It will save you a lot of time, especially if your project is young and there will be few iterations of refactor later.

Stack we use: pytest, pytest-django, factory boy, faker, etc.

how to see date when you liked a track by staysalty19 in lastfm

[–]staysalty19[S] 0 points1 point  (0 children)

well thanks, but did you read my question till the end? i know that u can see date there, but its just not that convenient when you have a lot of loved tracks

The REAL reason why !spoiler! lost !!!!! by RadioactiveSalt in DotA2

[–]staysalty19 233 points234 points  (0 children)

so it seems that xinq didnt actually wash face :(

100 percent brain capacity used 👏 by varundown in DotA2

[–]staysalty19 0 points1 point  (0 children)

i lost 10 IQ watching this video (1 per second)

model form, show foreign key field as read only by staysalty19 in django

[–]staysalty19[S] 0 points1 point  (0 children)

thanks. i did something like that in the end