GithubHelp home page GithubHelp logo

skerkour / kerkour.com Goto Github PK

View Code? Open in Web Editor NEW
456.0 12.0 64.0 144 KB

(Ab)using technology for fun & profit. Programming, Hacking & Entrepreneurship @ https://kerkour.com

Home Page: https://kerkour.com

License: Apache License 2.0

Rust 71.61% Dockerfile 1.72% Makefile 0.32% HTML 0.43% Shell 0.18% Go 25.53% Assembly 0.20% Vim Script 0.01%
rust security rust-lang golang go programming blog blogging crypto cryptography encryption web

kerkour.com's Introduction

kerkour.com's People

Contributors

dependabot[bot] avatar sylvain101010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kerkour.com's Issues

Unable to resolve multiple types in email sending example

Tried to compile an example that shows email sending. Got this error.

error[E0433]: failed to resolve: could not find `smtp` in `transport`
 --> src/main.rs:2:17
  |
2 |      transport::smtp::authentication::Credentials, AsyncSmtpTransport, AsyncTransport, Message,
  |                 ^^^^ could not find `smtp` in `transport`

error[E0432]: unresolved imports `lettre::AsyncSmtpTransport`, `lettre::AsyncTransport`, `lettre::Tokio1Executor`
 --> src/main.rs:2:52
  |
2 |      transport::smtp::authentication::Credentials, AsyncSmtpTransport, AsyncTransport, Message,
  |                                                    ^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^ no `AsyncTransport` in the root
  |                                                    |
  |                                                    no `AsyncSmtpTransport` in the root
3 |      Tokio1Executor,
  |      ^^^^^^^^^^^^^^ no `Tokio1Executor` in the root

error[E0433]: failed to resolve: use of undeclared type `Credentials`
 --> src/main.rs:9:10
  |
9 |          Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
  |          ^^^^^^^^^^^ use of undeclared type `Credentials`

Bad assumption on read() results

In https://github.com/skerkour/kerkour.com/blob/main/2022/rust_file_encryption_with_password/src/main.rs#L75 (and in many other places), you are assumption that the only scenario where you'll get less than the number of requested bytes is when you are at the end of the file.
This is wrong.

See the docs here:

https://doc.rust-lang.org/std/io/trait.Read.html#tymethod.read

In particular:

It is not an error if the returned value n is smaller than the buffer size, even when the reader is not at the end of the stream yet.

There are many reasons why this may be the case.

A great example is if the read you are doing happened to start on a region that is already in memory, but continues to a page that is not there yet. The file system will return what it has right now. That can lead to really hard to figure out bugs.

`cross` for cross-compiling Rust

I came across your blog post "Reproducible cross-compilation for Rust (with Docker)" via This Week in Rust #410 and want to say that your Dockerfiles are really cool.

However, there is already a way to cross-compile Rust via Docker. The tool is called cross and is maintained by the Rust Embedded devices Working Group.

So after installing cross via cargo install cross, you can compile to:

Windows:

cargo build --target x86_64-pc-windows-gnu

aarch64 / ARMv8:

cargo build --target aarch64-unknown-linux-gnu

ARMv7:

cargo build --target armv7-unknown-linux-gnueabihf

As said, your Dockerfiles are really awesome and doing something by yourself is always a worthwhile experience, however I just want to point out to you that there is already a way to cross-compile.

rust_fast_port_scanner returns all ports

Hello @claudiociardelli ,
I tested rust_fast_port_scanner today. Not sure if this is an issue or a lack of understanding from me:
I run the program with the IP address of my linux server to check what ports might be listening to requests.
so I ran the command like this:

./target/release/rust_fast_port_scanner 192.168.1.70

I will not print the result here, But I get 1002 rows in the result so, all the ports tested.
From @claudiociardelli (https://github.com/skerkour/bloom/issues/72)

However when I check what ports are listening as per https://www.techrepublic.com/article/how-to-locate-and-close-an-open-port-in-linux/
I only see 6 open ports

coco@dev01:~/projects/kerkour.com/2021/rust_fast_port_scanner$ sudo ss -tulwn | grep LISTEN
tcp   LISTEN 0      511                            127.0.0.1:41683      0.0.0.0:*

tcp   LISTEN 0      4096                       127.0.0.53%lo:53         0.0.0.0:*

tcp   LISTEN 0      128                              0.0.0.0:22         0.0.0.0:*

tcp   LISTEN 0      100                              0.0.0.0:25         0.0.0.0:*

tcp   LISTEN 0      100                                 [::]:25            [::]:*

Beaglebone and host

I want to assign this between two parties Beagle bone black and my computer ! It works for that implementation?

Do not use `sqlx` for "high performance" sqlite insert benchmark

As you try to optimize the time to insert a lot of items into a sqlite database, in your blog post here I thought it may be interesting for you to know that sqlx is the wrong tool for that job. Because of the "all is async" approach there is a quite large overhead for executing any query there. According to my own benchmarks executing queries using sqlx is 7 - 70 times slower than doing the same query using diesel. Using rusqlite normally gives you even faster queries. Therefore it might be worth to just use another database framework to improve the numbers there. See the benchmarks here for details on the numbers.

Disclaimer: As maintainer of diesel I might be biased there.

Scans beyond TCP connect

Hi! Would this code base be modifiable to support other scan types, for example a Syn scan? My suspicions are you would need a very different approach, since std::net and tokio::net don't give you control over this. (Maybe the socket2 lib?), but I'm curious.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.