Rick_C137

joined 2 years ago
[–] Rick_C137@programming.dev 1 points 3 days ago

Too bad it's on Youtube.. Someone know another place where is it hosted ? I would like to download it for archive purpose. Thanks.

[–] Rick_C137@programming.dev 3 points 1 week ago* (last edited 1 week ago) (2 children)

Thank you all for yours input

What finally did work

if [[ -z VARIABLE1 && -z VARIABLE2 ]]; then
    echo "OK"
fi

If only Linux was using Python syntax that would be so much more intuitive...

[–] Rick_C137@programming.dev 2 points 1 week ago (1 children)

not working, both variables do not exist and the echo "OK" do not trigger.

21
submitted 1 week ago* (last edited 1 week ago) by Rick_C137@programming.dev to c/linux@lemmy.ml
 

Hi,

I trying to test two condition together (AND) under bash but it's not working...

The goal is ti have True when two variables are either not set or empty (empty string)

I've tried

if [[ -n VARIABLE1 && -n VARIABLE2 ]]; then
    echo "OK"
fi

Here I get the "OK" no matter what .

Thanks.

[–] Rick_C137@programming.dev 1 points 3 weeks ago

Thank you all for your input's !

As I'm not familiar enough with BGP, AS etc..

I think I'll go for the list generated by
https://github.com/lord-alfred/ipranges
https://github.com/sakib-m/IP-Prefix-List

To start with.

Then I'll see if it's possible to gather those IP ranges without relying on third party services..
but that seem unfeasible without be connect to a Internet Exchange Point (IXP) right ?

[–] Rick_C137@programming.dev 1 points 3 weeks ago

Thank you @WarmApplePieShrek@lemmy.dbzer0.com Are you sure your link is correct ? I get

This page does not seem to exist…

 

cross-posted from: https://programming.dev/post/37077607

Hi,

I would like to get all the range of IP of the GAFAM and few more..

Preferred

  • trough the Terminal ( Linux ) or Python.
  • no sign-up of any form.
  • obviously FLOSS

Thanks.

4
IP range of GAFAM ? (programming.dev)
submitted 3 weeks ago* (last edited 3 weeks ago) by Rick_C137@programming.dev to c/linux@lemmy.ml
 

Hi,

I would like to get all the range of IP of the GAFAM and few more..

Preferred

  • trough the Terminal ( Linux 🐧 ) or/and Python 🐍
  • no sign-up of any form.
  • obviously FLOSS

Thanks.

[–] Rick_C137@programming.dev 1 points 1 month ago* (last edited 1 month ago)

Thank you all for your input's ! \

So I have created a table , that I'll put in my first post.

Feel free to post update like

|brand|model|Price €|GPIO pair|CP|Lan Ports|idle watt|Surface area cm²|Storage ports| WiFi / BT|url|
|Raspberry Pi|Pi 5 B (4GB)|52|12|Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz.|1x 1GbE|3|47|SD|||

or even without the row header

[–] Rick_C137@programming.dev 1 points 1 month ago* (last edited 1 month ago)

Thanks @Frederic@beehaw.org
Yes, Nice distro, but unfortunately their RPI respin use systemD 👎
 
https://forum.mxlinux.org/viewtopic.php?t=85188

5
Cheap SBC x86-64 ? (programming.dev)
submitted 1 month ago* (last edited 1 month ago) by Rick_C137@programming.dev to c/linux@lemmy.ml
 

Hi,

is it exist cheap ~$60 SBC in X86-64 ??

No thank you for Rapsberry PI
I used Raspberry PI SBC for a while now.

But it's really hard to found a Linux distribution that support

  • RPI (arm64)
  • sysVinit 💖
  • And that I like

Please don't bring systemD in this discussion thanks.


( first row is for reference )

brand model Price € GPIO pair CPU Lan Ports idle watt Surface area cm² Storage ports WiFi / BT url
Raspberry Pi Pi 5 B (4GB) 52 12 Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz. 1x 1GbE 3 47 SD
radxa[^NEU] X4 90 12 N100 ▼ 1x 2.5GbE 18W ? 47.6 M.2[^boot], eMMC[^boot] W6, BT5.2
HardKernel ? ODROID H4 109 ?? N97 ▲ 1x 2.5GbE N.C -> 60W ? 144 eMMC, M.2*, SATA* https://www.hardkernel.com/shop/odroid-h4/

last update: 2025-08-31

[^NEU]: Seem unavailable on the europe market..

[^boot]: Might not be bootable ! TBC

[–] Rick_C137@programming.dev 2 points 2 months ago

Thanks @Malix@sopuli.xyz,

Actually, no HTTP/2 do not require SSL/TLS!

Although the standard itself does not require usage of encryption,[46] all major client implementations (Firefox,[47] Chrome, Safari, Opera, IE, Edge) have stated that they will only support HTTP/2 over TLS
~source:https://en.wikipedia.org/wiki/HTTP/2#Encryption~

it's Mozilla etc.. that force it !

WebPages hosted on the TOR Network (for example) do not need SSL/TLS certificates ! so what we can't have the benefit of HTTP/2 WTF

To the developers of LibreWolf, can you solve this limitation ?

[–] Rick_C137@programming.dev 1 points 2 months ago* (last edited 2 months ago)

Thank you @tasankovasara@sopuli.xyz

Let me re phrase your answer:
... should be available in your distro repository...

indeed I've downloaded a couples of thing but nothing had what I was needed, but with the information within those packages I've found https://mailfud.org/geoip-legacy and it works like a charms

5
How force HTTP/2 ? (programming.dev)
submitted 2 months ago* (last edited 2 months ago) by Rick_C137@programming.dev to c/librewolf@lemmy.ml
 

Hi,

I'm using FreeNginx and in my configuration i have

http2 on;

but when I make a vist on http://localhost/ it's http/1.1 that kick...

I've found^1

Firefox already has HTTP/2 AFAIK.
The entry is called network.http.spdy.enabled.http2 but it's set to "false" by default,

I don't have this in LibreWolf, I created it, to see if it does something, but it's still the HTTP/1.1 that is used.. Any ideas ?

Thanks.

 

cross-posted from: https://programming.dev/post/34280775

Hi,

I've recently installed FreeNginx[^FN]

I would like to use the geoip_module to have some "Stats" about my visitors..\

on the documentation we can read:

... using the precompiled MaxMind databases ...

.
.
.

But on the MaxMind website I'm facing a wall:

Sorry, we were not able to create your account. Please ensure that you are using an email that is not disposable, and that you are not connecting via a proxy or VPN.

So not working... And anyway I'm not a fan of using something compiled and more over not open source...

So do you know another solution to get GeoIP data with FreeNginx ?

Thanks.

[^FN]: https://freenginx.org/
https://programming.dev/post/12566209?sort=Old

3
submitted 2 months ago* (last edited 2 months ago) by Rick_C137@programming.dev to c/linux@lemmy.ml
 

Hi,

I've recently installed FreeNginx[^FN]

I would like to use the geoip_module to have some "Stats" about my visitors..\

on the documentation we can read:

... using the precompiled MaxMind databases ...

.
.
.

But on the MaxMind website I'm facing a wall:

Sorry, we were not able to create your account. Please ensure that you are using an email that is not disposable, and that you are not connecting via a proxy or VPN.

So not working... And anyway I'm not a fan of using something compiled and more over not open source...

So do you know another solution to get GeoIP data with FreeNginx ?

Thanks.

[^FN]: https://freenginx.org/
https://programming.dev/post/12566209?sort=Old

[–] Rick_C137@programming.dev 1 points 10 months ago

I don't see python on your image :)

11
submitted 11 months ago* (last edited 10 months ago) by Rick_C137@programming.dev to c/python@programming.dev
 

Hi,

I've discover haml and pug [^1] ( both web template engine )

It's totally Pytonic ! ( and make even more sense to use it with python rather than JS 🤮 )

I've look, if it exist for Python, but so far, I've found only

The first, only convert pug into another template :/
The second, didn't pass the alpha version.
The third, require dependence, not maintained etc.. \

So I didn't found a Python package that could do haml/pug to html directly, without too much dependence...

For example:

From

html
  head title Example for Python discuss
  body
    h1 Hello world
    p This is a paragraph.

To

<html>
  <head>
    <title>Example for Python discuss</title>
  </head>
  <body>
    <h1>Hello world</h1>
    <p>This is a paragraph.</p>
  </body>
</html>

Do you know if such thing exist ?
If not, I will build my own (FLOSS). ( I'm open to any advice to do so :) )

Thanks

[^1]:Pug is a template engine heavily influenced by Haml and implemented with JavaScript 🤮 for Node.js

 

cross-posted from: https://programming.dev/post/21294559

Hi,

I'm following my previous post
How encrypt email with a GnuPG public key ? [ solved ]

So I managed to encrypt the email body with GnuPG public key.. But I don't figure how I can do the same for the title ?!
ThunderBird manage it.. any idea how ?
asked on Official Thunderbird forum

Thanks.

12
submitted 11 months ago* (last edited 11 months ago) by Rick_C137@programming.dev to c/python@programming.dev
 

Hi,

I'm following my previous post
How encrypt email with a GnuPG public key ? [ solved ]

So I managed to encrypt the email body with GnuPG public key.. But I don't figure how I can do the same for the title ?!
ThunderBird manage it.. any idea how ?
asked on Official Thunderbird forum

Thanks.

[–] Rick_C137@programming.dev 1 points 1 year ago (1 children)

I finally manage to encrypt the body trough ptyhon-gnupg ( warning their documentation is still in alpha stage. )

now, remain to encrypt the subject (ThunderBird compatible) if you have any clues I'm all ears

When time permit I will publish my code in a pastbin.

Wubba Lubba dub-dub**

[–] Rick_C137@programming.dev 1 points 1 year ago* (last edited 1 year ago)

indeed, but a lot of Linux distribution come with it :)
otherwise it's installable.

 

Hi,

I'm already using

from smtplib import SMTP_SSL
from email.message import EmailMessage

To send emails.

Now I would like to be able to encrypt them with the public key of the recipient. ( PublicKey.asc )

an A.I provide me this

import smtplib
from email.message import EmailMessage
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.ciphers.aead import AESGCM

# Load the ECC public key from the .asc file
with open('recipient_public_key.asc', 'rb') as key_file:
    public_key_bytes = key_file.read()
public_key = ec.EllipticCurvePublicKey.from_public_bytes(
    ec.SECP384R1(),
    public_key_bytes
)

# Create the email message
msg = EmailMessage()
msg.set_content('This is the encrypted email.')
msg['Subject'] = 'Encrypted Email'
msg['From'] = 'you@example.com'
msg['To'] = 'recipient@example.com'

# Encrypt the email message using the ECC public key
nonce = bytes.fromhex('000102030405060708090a0b0c0d0e0f')
cipher = AESGCM(public_key.public_key().secret_key_bytes)
ciphertext = cipher.encrypt(nonce, msg.as_bytes(), None)

# Send the encrypted email
server = smtplib.SMTP('smtp.example.com')
server.send_message(msg, from_addr='you@example.com', to_addr='recipient@example.com')
server.quit()

# Save the encrypted email to a file
with open('encrypted_email.bin', 'wb') as f:
    f.write(ciphertext)

I like the approach, only one "low level" import cryptography

but the code seem wrong. if the body has been encrypted as ciphertext I don't see this one included while sending the email.

How are you doing it ? or do you have good tutorial, documentations ? because I found nothing "pure and simple" meaning not with of unnecessary stuff.

Thanks.

 

cross-posted from: https://programming.dev/post/19958073

Hi,

I'm looking for a solution to archive files in a decentralized system. that would meet those requirement:

  • FLOSS
  • date-stamp the upload of the file.
  • immutable storage ~ WORM
  • anonymous (like TOR)

I was considering IPFS but it does not date-stamp the upload :'( you can make a description-file but this is unreliable, as you can set any date..

I'm lost between hyphanet.org and Freenet.org ?!
are those the same project ?

According to A.I:

Hyphanet is focused on secure, private, and efficient communication and data sharing, with an emphasis on enabling users to monetize their data while maintaining control over their data sovereignty.

is that true ? I can't found the information on their website...

view more: next ›