Search found 5 matches

by Fruity
Wed Mar 13, 2024 5:42 am
Forum: Tricks 'n' Tips
Topic: Linux console dimensions
Replies: 0
Views: 438

Linux console dimensions

Maybe someone need it.

Structure winsize
ws_row.w ; rows
ws_col.w ; columns
EndStructure

#STDIN_FILENO = 0 ; file descriptor of standard input
#TIOCGWINSZ = $5413 ; IOCTL request to get terminal window sizes

OpenConsole()

ws.winsize

If ioctl_(#STDIN_FILENO, #TIOCGWINSZ, @ws) = 0
PrintN ...
by Fruity
Sat Oct 28, 2023 10:49 am
Forum: Tricks 'n' Tips
Topic: libcurl.pbi
Replies: 134
Views: 55981

Re: libcurl.pbi

Does it work on Linux?
by Fruity
Tue Aug 15, 2023 4:30 am
Forum: Tricks 'n' Tips
Topic: md5crypt (salted)
Replies: 2
Views: 1066

Re: md5crypt (salted)

It was bash scrpit with this comments that I used. Comments from that script are unchanged. I understand code, but this algo is so strange and this is reason of this comments
by Fruity
Tue Aug 15, 2023 4:25 am
Forum: Tricks 'n' Tips
Topic: Simple ping/ICMP for windows (IPv4)
Replies: 4
Views: 3540

Re: Simple ping/ICMP for windows (IPv4)

My dirty realization of ping in Linux

Note:
you need liboping to be installed (sudo apt install oping)
timeout.d in procedure in seconds


ImportC "/lib/x86_64-linux-gnu/liboping.so.0"
ping_construct()
ping_host_add(*obj, *host)
ping_send(*obj)
ping_destroy(*obj)
ping_setopt(*obj, opt.i, *val ...
by Fruity
Tue Aug 15, 2023 4:10 am
Forum: Tricks 'n' Tips
Topic: md5crypt (salted)
Replies: 2
Views: 1066

md5crypt (salted)

I've created md5crypt (salted) algorythm
Maybe someone need


DeclareModule md5crypt
UseMD5Fingerprint()
Declare.s md5crypt(pass$, salt$)
Declare HexToBuffer(in.s)
EndDeclareModule

Module md5crypt
Procedure.s stringToHex(in.s)
For x = 1 To Len(in)
out.s + Hex(Asc(Mid(in, x, 1)))
Next ...