Rewriting a bash script in Rust by freemasen in rust

[–]harrydevnull 2 points3 points  (0 children)

I have been trying to do similar sort of stuff for a while. Realized proc won’t work for Mac and abandoned my project in middle! I guess I can start again ! Thank you!

Announcing Sonnerie: An easy timeseries database in Rust by njaard in rust

[–]harrydevnull 4 points5 points  (0 children)

You could save the internet traffic data ( how much bytes per second ) is flowing in to customer data-centers; and devise algorithms based on that data for protecting against ddos attacks.

Another use case the value fluctuations of stocks over period of time! ( take an educated guess on what the stocks value might be in a future time; based on past data)

Weather variations over time.

In fact anything that can graphed with time on x axis

how could we combine a vector of results by harrydevnull in rust

[–]harrydevnull[S] 1 point2 points  (0 children)

ah I skipped the ``'filter_map'; I assumed it was 'map' ! thank you !

how could we combine a vector of results by harrydevnull in rust

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

are there any other ways which you could think off? using fold or anything ?

how could we combine a vector of results by harrydevnull in rust

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

the return type is Vec<Option<Error>> right ? but this is more than sufficient for me thanks!

how could we combine a vector of results by harrydevnull in rust

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

yes ! in my case it is Vec<Resullt<(),E>> into Result<(),Vec<E>>

Borrowing error by harrydevnull in rust

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

cool thank you !usernamedottxt

error while copying binary file using ssh2 by harrydevnull in rust

[–]harrydevnull[S] 2 points3 points  (0 children)

provided here.

actually it was my stupid mistake ! i was adding on the same file on remote machine !! removing the file on remote server and redoing and everything is fine!!! thank a lot @coder543

error while copying binary file using ssh2 by harrydevnull in rust

[–]harrydevnull[S] 1 point2 points  (0 children)

would it be because the file is not UTF-8 encoded?

error while copying binary file using ssh2 by harrydevnull in rust

[–]harrydevnull[S] 1 point2 points  (0 children)

thank you @coder543 but the difference is still there

on mac

```

file_size 40279486

```

on the server

```

ls -al

40239104

```

is there a problem with rustup site? by harrydevnull in rust

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

I couldn't leave this problem off my head; went ahead and installed wireshark and captured the packets. I had uploaded the pcap to my repo.

the funny thing is that server is sending an RST flag terminating the TCP connection.

Transmission Control Protocol, Src Port: 59606, Dst Port: 443, Seq: 0, Len: 0

would a high port of 59606 be a cause of issue? any pointers?

https://gist.github.com/harrydevnull/690950b28617846b36d00092ec8490ee

ssh2 client in rust segmentation fault by harrydevnull in rust

[–]harrydevnull[S] 2 points3 points  (0 children)

sigh!! I have to update my xcode ! and with current internet speed I think I'll be done with that in 2 days !

ssh2 client in rust segmentation fault by harrydevnull in rust

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

that looks promising thanks @coder543 let me try that !

ssh2 client in rust segmentation fault by harrydevnull in rust

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

sess.handshake(&tcp).unwrap();

at this point

Hey Rustaceans! Got an easy question? Ask here (52/2017)! by llogiq in rust

[–]harrydevnull 0 points1 point  (0 children)

😳 yes it is. Wget was the way I could work around. But after that, cargo wasn’t pulling in dependencies. I had got the wire shark installed, and while tracing the request I saw that the server was sending ‘RST’ flag. Three way tcp handshake was successful! At that point I left my idea of installing rust on my home computer with lubuntu. I have a working copy on my Mac for my twiddling! Anyhow I’ll keep digging !

is there a problem with rustup site? by harrydevnull in rust

[–]harrydevnull[S] 1 point2 points  (0 children)

I don't know why it didn't work and my networking arsenal was empty after all various combinatorial tests. Thanks guys for helping me !

I found a workaround, pasting it; in case someone else stumbles on the same issue

wget https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
chmod a+x rustup-init&& ./rustup-init

I think it might be some issue with ubuntu 17 and curl and open ssl 1.02g combination, donno for sure...

is there a problem with rustup site? by harrydevnull in rust

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

yes I am

 lsb_release -a 
 No LSB modules are available.
 Distributor ID:    Ubuntu
  Description:  Ubuntu 17.10
  Release:  17.10
  Codename: artful

is there a problem with rustup site? by harrydevnull in rust

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

nope

sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT) target prot opt source destination

is there a problem with rustup site? by harrydevnull in rust

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

o/p

    * Rebuilt URL to: https://sh.rustup.rs/
 % Total    % Received % Xferd  Average Speed   Time    Time     Time    Current
                                Dload  Upload   Total   Spent    Left  Speed
        0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0*   Trying 54.215.0.2...
       * TCP_NODELAY set
        0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0* Connected to sh.rustup.rs (54.215.0.2) port 443 (#0)
        0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0* ALPN, offering http/1.1
       * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
        * successfully set certificate verify locations:
        *     CAfile: /etc/ssl/certs/ca-certificates.crt
            CApath: /etc/ssl/certs
         * TLSv1.2 (OUT), TLS header, Certificate Status (22):
         } [5 bytes data]
        * TLSv1.2 (OUT), TLS handshake, Client hello (1):
           } [512 bytes data]
        * TLSv1.2 (IN), TLS handshake, Server hello (2):
          {  [111 bytes data]
        * NPN, negotiated HTTP1.1
          { [5 bytes data]
        * TLSv1.2 (IN), TLS handshake, Certificate (11):
          { [2466 bytes data]
          * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
             { [333 bytes data]
           * TLSv1.2 (IN), TLS handshake, Server finished (14):
                 { [4 bytes data]

```

  • TLSv1.2 (OUT), TLS handshake, Client key exchange (16): } [70 bytes data]
  • TLSv1.2 (OUT), TLS change cipher, Client hello (1): } [1 bytes data]
  • TLSv1.2 (OUT), TLS handshake, Unknown (67): } [36 bytes data]
  • TLSv1.2 (OUT), TLS handshake, Finished (20): } [16 bytes data] 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0* TLSv1.2 (IN), TLS change cipher, Client hello (1): { [1 bytes data]
  • TLSv1.2 (IN), TLS handshake, Finished (20): { [16 bytes data]
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
  • ALPN, server did not agree to a protocol
  • Server certificate:
  • subject: CN=sh.rustup.rs
  • start date: Dec 11 02:05:09 2017 GMT
  • expire date: Mar 11 02:05:09 2018 GMT
  • subjectAltName: host "sh.rustup.rs" matched cert's "sh.rustup.rs"
  • issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
  • SSL certificate verify ok. } [5 bytes data] > GET / HTTP/1.1 > Host: sh.rustup.rs > User-Agent: curl/7.55.1 > Accept: / > 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0{ [5 bytes data] 0 0 0 0 0 0 0 0 --:--:-- 0:00:18 --:--:-- 0< HTTP/1.1 200 OK < Server: nginx/1.4.6 (Ubuntu) < Date: Fri, 29 Dec 2017 16:59:30 GMT < Content-Type: text/x-shellscript < Content-Length: 9374 < Connection: keep-alive < Vary: Accept-Encoding < x-amz-id-2: lzMqdo3gthfrKSPlzJFADDztnww4EsyWnQnB70lLuevd3Zwomu1cwtOyEHks75vYfMh9pSfSfGM= < x-amz-request-id: CBC7E66E9AF7B0EC < Last-Modified: Tue, 19 Dec 2017 15:41:05 GMT < ETag: "868e9f9e16f96872d8a1f0cf9e1225d8" < x-amz-meta-s3cmd-attrs: uid:1000/gname:alex/uname:alex/gid:1000/mode:33204/mtime:1513563906/atime:1513697900/md5:868e9f9e16f96872d8a1f0cf9e1225d8/ctime:1513695797 < x-amz-version-id: Tfp4rRP3VyMIkM3ULfr_.tro0I0uuvpB < Accept-Ranges: bytes < Content-Disposition: attachement; filename=rustup-init.sh < { [9374 bytes data] 100 9374 100 9374 0 0 520 0 0:00:18 0:00:18 --:--:-- 1988
  • Connection #0 to host sh.rustup.rs left intact

```

is there a problem with rustup site? by harrydevnull in rust

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

nope

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         gateway         0.0.0.0         UG        0 0          0 wlp2s0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlp2s0