#💽Programming Chat v2

1 messages · Page 43 of 1

lavish dove
#

but its not working

spare quartz
#

are you sure you're using the right assembler syntax

lavish dove
#

no x86asm sgdt gdrspot hlt gdtrspot: dq 0

spare quartz
#

eeeeeehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#
xor eax, eax
sgdt [eax]
#

are you able to do something like this

#

(yes i know that'll overwrite the IVT but you're in protected mode I ASSUME so it shuoldnt matter)

lavish dove
#

I feel like a fuckin dumbass

lavish dove
#

wait is there

#

oh yeah theres no ivt

spare quartz
#

if you're in real mode when this is run there should be an ivt put there

#

otherwise your bios couldn't work

lavish dove
#

I am making the bios

spare quartz
#

ogh

#

right

#

well carry on then

lavish dove
#

waah its still zero 😭

#

wait

#

I got the best idea

#

ill put it at zero

spare quartz
lavish dove
#

that sgonna fall and kill them all

#

I feel so fuckin dumb

#

cuz how does lgdt [1] not work

spare quartz
#

i dont think theres a modr/m for an absolute address

lavish dove
#

I dont know what that graph means but ill put it in bx si lol

spare quartz
lavish dove
#

Oh

#

That's cool

spare quartz
#

depending on your debugger it might suck at reading them in the right address/operand length so make sure to understand it at least a little

lavish dove
#

It's the qemu debugger

spare quartz
#

does qemu have a debugger

lavish dove
#

It's the qemu info registers command

#

Lol

spare quartz
#

oh you mean thru gdb?

lavish dove
#

oh its just to describe the arguments

#

No in the qemu monitor

spare quartz
#

oh

lavish dove
#

You said debugger so I was thinking qemu debugger

#

idk

#

it doesnt show me the gdt register in bochs

spare quartz
#

VirtualBox and Bochs both freeze for me if i try reading off the RTC

lavish dove
#

oof

#

idk how to fix that

#

if you type in "replace cmos battery" in bochs it might work 🤣

#

woah

#

if i remove the lgdt instruction gdt = 0xfff

#

why is it setting it to zero instead of the fucking value I give it

spare quartz
#

you're sure lgdt is set at the right memory address

lavish dove
#

no

spare quartz
#

cause remember its an indirect reference

#

i still cant really read your assembler that well so i couldnt tell anyways 😭

lavish dove
#

well its set to the pointer in the gdt

spare quartz
#

try a mov from the pointer to something like eax

lavish dove
#

its zero

#

wth

spare quartz
#

probably something youll like

lavish dove
#

when I read it with xp in qemu monitor it gives zero

#

but when I dump-guest-memory and check that its there

spare quartz
#

emm

#

do you have your bios code as an ELF

#

it probably wont work on our computer since we've got hooks n stuff but i wanna see how it runs

lavish dove
spare quartz
#

can you pack it into an iso?

lavish dove
#
org 0xf000:0
bits 16

here:
inc edx

cli
cld
mov   al,80h
out   70h,al

mov edi, 0x1000
mov eax, 0x2000 | 3

; levels 4-2
mov dword [edi], eax
add eax, 0x1000
mov dword [edi+0x1000], eax
add eax, 0x1000
mov dword [edi+0x2000], eax
add eax, 0x1000

; level 1
mov edi, 0x4000
mov eax, 0x1000 | 3
mov ecx, 512
nextentry:
  mov dword [edi], eax
  add edi, 8
  add eax, 0x1000
  loop nextentry

mov ecx, 0xC0000080          ; Set the C-register to 0xC0000080, which is the EFER MSR.
rdmsr                        ; Read from the model-specific register.
or eax, 1 << 8               ; Set the LM-bit which is the 9th bit (bit 8).
wrmsr                        ; Write to the model-specific register.

mov edi, 0x1000
mov cr3, edi

mov eax, cr0                 ; Set the A-register to control register 0.
or eax, 1 << 31 | 1 << 0     ; Set the PG-bit, which is the 31nd bit, and the PM-bit, which is the 0th bit.
mov cr0, eax                 ; Set control register 0 to the A-register.           

mov eax, dword GDT64.ptr

mov al, 0xFF
mov byte [0], al

hlt

jmp 8:dword code64

bits 64
code64:
  hlt

times (0x1000)-($-$$) db 0
GDT64:
  .null: dq 0
  .code:
    dq 0x00a09a0000000000 ; 64-bit code
  .dat:
    dq 0x0000920000000000 ; 64-bit data
  .ptr:
    dw ($ - GDT64) - 1
    dq GDT64
  .end:

db "GDTEND"

bits 16
times (65536-12)-($-$$) db 0
jmp 0xf000:0 ; it seems to load here?
db "hello"
times (65536)-($-$$) db 0```
spare quartz
#

okay lemme run this

lavish dove
#

its firmware

#

it doesnt even have 0xaa55 at the end 😭

spare quartz
#

blehhh

lavish dove
#
mov al, 0xFF
mov byte [0], al
``` this works
spare quartz
#

our CPU is weird so we can call an iso however we want

lavish dove
#

oh its the minecraft cpu

spare quartz
#

i think thisll work

lavish dove
#

I shouldve tried running it as a normal bios

spare quartz
#

okay the loader didnt like that

lavish dove
spare quartz
#

im just gonna adjust your org to 0x500

lavish dove
#

it doesnt work when it runs as bios 😭

lavish dove
spare quartz
#

well yeah but again if i put it where OUR bios is ugly stuff will happen

spare quartz
lavish dove
#

lmao

#

sory

spare quartz
#

what device does I/O port 0x70 reference

lavish dove
#

I removed it trying to find out why the memory at gdt was zero

lavish dove
spare quartz
#

like

#

PS/2 system control?

#

or something else

lavish dove
#

to disable unmaskable

#

interrupts

spare quartz
#

*The CMOS and RTC registers *

spare quartz
#

oh

#

welp i need to make those two devices give me a second

#

or i can just ignore it

lavish dove
#
org 0xf000:0
bits 16

here:
inc edx

cli
cld
mov   al,80h
out   70h,al

mov edi, 0x1000
mov eax, 0x2000 | 3

; levels 4-2
mov dword [edi], eax
add eax, 0x1000
mov dword [edi+0x1000], eax
add eax, 0x1000
mov dword [edi+0x2000], eax
add eax, 0x1000

; level 1
mov edi, 0x4000
mov eax, 0x1000 | 3
mov ecx, 512
nextentry:
  mov dword [edi], eax
  add edi, 8
  add eax, 0x1000
  loop nextentry

mov ecx, 0xC0000080          ; Set the C-register to 0xC0000080, which is the EFER MSR.
rdmsr                        ; Read from the model-specific register.
or eax, 1 << 8               ; Set the LM-bit which is the 9th bit (bit 8).
wrmsr                        ; Write to the model-specific register.

mov edi, 0x1000
mov cr3, edi

mov eax, cr0                 ; Set the A-register to control register 0.
or eax, 1 << 31 | 1 << 0     ; Set the PG-bit, which is the 31nd bit, and the PM-bit, which is the 0th bit.
mov cr0, eax                 ; Set control register 0 to the A-register.           

o32 lgdt [dword GDT64.ptr]

hlt

jmp 8:dword code64

bits 64
code64:
  hlt

GDT64:
  .null: dq 0
  .code:
    dq 0x00a09a0000000000 ; 64-bit code
  .dat:
    dq 0x0000920000000000 ; 64-bit data
  .ptr:
    dw ($ - GDT64) - 1
    dq GDT64
  .end:

bits 16
times (65536-12)-($-$$) db 0
jmp 0xf000:0 ; it seems to load here?
db "hello"
times (65536)-($-$$) db 0```
#

lgdt then hlt

spare quartz
#
[04:25:18;680/WARN [Thread-15/Processor] 0x0000:000000000000055D 0xB9: mov ecx, 0xC0000080
[04:25:18;681/ERROR[Thread-15/Unnamed Logger, Error] java.lang.IllegalArgumentException: Missing two-byte opcode (0F) for 0x32 [0x0000000000000564]
#

ughhh i hve to make another instructino

lavish dove
#

heheehehehe

spare quartz
#

looks like 0x0f32 is "rdmsr"

#

we dont have model specific registers so ill just no-op it i guess

lavish dove
#

to turn on long mode

spare quartz
#

oh

#

our cpu is meant to destroy itself if it reads off a 64-bit GDT entry but

#

if it does do that then your code works

lavish dove
#

nice

#

(my code is not working in any emulator)

#

a few days ago I copied ovmf exactly and it still didnt work

#

but I noticed that ovmf and seabios had a bunch of tables at the start of their rom

#

so idk whats with that

spare quartz
#

ours has a lot better introspection so if it does fail i can try and send you the logs of what its reading

#

Reads the contents of a 64-bit model specific register (MSR) specified in the ECX register into registers EDX:EAX.

#

good enough

lavish dove
#

lol

#

it would probably be zero on an unsupported machine anyways

spare quartz
#

The MSRs and the ability to read them with the RDMSR instruction were introduced into the IA-32 Architecture with the Pentium processor. Execution of this instruction by an IA-32 processor earlier than the Pentium processor results in an invalid opcode exception #UD.

lavish dove
#

😭

spare quartz
#
[04:34:58;204/WARN [Thread-16/Processor] 0x0000:0000000000000584 0x01: lgdt 0x000005AC [0x00000594 / 0x0017]
[04:34:58;204/WARN [Thread-16/Processor] 0x0000:000000000000058A 0xF4: hlt 
#

heres what my cpu said

#

(your org is 0x500 just to reiterate)

#

is the segment of 0x17 correct?

lavish dove
#

the gdt is only a few bytes after lgdt

#

so it should be the same segment

#

Thanks

lavish dove
#

o32 lgdt [dword GDT64.ptr]
its not using any segments cs:di or atleast I dont think so 😭

spare quartz
#

nono

#

the lgdt instruction is reading the 2 values your pointer is pointing to (0x000005AC)

#

which are the offset/segment pair [0x00000594 / 0x0017]

lavish dove
#

oh god theres a segment in the pointer

spare quartz
#

yeah

#

the "0x0017" there is probably causing it to read at the wrong data

lavish dove
#

no wonder its zero the pointer is pointing to the wrong memory 😭 thanks bro

spare quartz
#

hooray our fake cpu actually helped someone 🎉

#

holy shit??

#

i can get rid of all those ugly spring libraries??!?!

lavish dove
#

woah

#

holy shit

#

bro I made my own shitty spring and now I can replace it with good one

lavish dove
#

I tried replacing the size with segment, and adding the segment to the linear address, and it still didnt work 😢

#

when I read the pointer to a 32 bit register its zero, to a 16 bit register its the correct number

lavish dove
#

@spare quartz I copied all of rom to 0 and it works now

#

I think

#

It thinks its jumping into 32 bit mode instead of 64 bit mode for some reason

lavish dove
#

im in long mode @spare quartz

#

my joy is indescribable

#

idk whats wrong with the gdt being up where the qemu motherboard loaded it

#

it was working because of org 0x500 I think

lavish dove
#

omfg

#

there are tables I was missing

#

apparently to get all your rom loaded correctly you haved to look at this weird table

#

thats somewhere.. below tthe first megabyte

spare quartz
#

BDA? EBDA?

#

something hardware mapped?

lavish dove
#

ebda

#

im talking about this v

spare quartz
#

OH SMBIOS

lavish dove
#

I only knew the first thing about it yet but im reading it

spare quartz
#

i barely know anything smm related

lavish dove
#

from what im reading its just a bunch of tables

#

taht were written by the motherboard

#

with ram, specific cpu info, etc

#

or I haved to write it cuz im making the firmware

#

😭

#

the Entry Point Structure is located somewhere in physical memory from address 0x000F0000 to 0x00FFFFF

#

oh god

lavish dove
#

its so secretive that the manuals just say its impossible to touch

spare quartz
#

i just know x86 defines exactly one instruction for smm

#

and its just to return from it

lavish dove
#

yea

#

I DO

#

LETS GOO

#

idk how to set it up though

#

well it also means I haved to make acpi too 😭

spare quartz
#

organization

#

InternetProtocolControlProtocol...

#

(additionally InternetProtocolV6ControlProtocol)

#

i took a day break so oosp

lavish dove
spare quartz
#

funnily enough my isp doesn't give me an ipv6 address

lavish dove
spare quartz
#
InternetProtocolControlConfigurationRequest(
    options=ListBuilder([VanJacobsonCompressedTCPIPOption(
        compressedSlotID=Boolean(true),
        maxSlotID=Int(15),
        type=InternetProtocolOptionType(IP_COMPRESSION_PROTOCOL)
    ), IPAddressProtocolOption(
        address=Inet4Address(/0.0.0.0),
        type=InternetProtocolOptionType(IP_ADDRESS)
    )]),
    broadcastAddress=Int(255),
    identifier=Int(1),
    protocol=PPPProtocol(INTERNET_PROTOCOL_CONTROL_PROTOCOL),
    type=ControlType(CONFIGURE_REQUEST),
    unnumberedData=Int(3)
)
spare quartz
#

rust sucks

#

this is why

lavish dove
#

lmao

rustic vine
#

3b1b makes such good content

flint belfry
#

@spare quartz found your setup

spare quartz
spare quartz
spare quartz
rustic vine
spare quartz
#

THE OLDEST BRANCHES OF MATH IN MESOPOTAMIA

timid quartz
# spare quartz

Ok but your language could be printed out on a paper full of Turkish

timid quartz
#

what

spare quartz
#

im trying to find these kani ji ..

spare quartz
#

でdeびbiるru
コkoネneクkuショshoんn

timid quartz
#

カタカナで「ん」を書きことが忘れたよ

spare quartz
#

go talk to bayachao not me

#

its even on the logo art

lavish dove
#

holy sht

#

64 kilobytes is only 65536 bytes

spare quartz
#

64 kibibytes you mean?

lavish dove
#

kiB

#

idk

spare quartz
#

yeah KiB

#

KB is 64,000 flat

#

writing a wikipedia article rn

#

(cause the last edit was 2022...)

lavish dove
#

lol

#

gigachad

#

well thats annoying

#

every bios is only written in 64 kib

#

wait seabios is 256 kib wtf

#

oh that fits in bios expansions

#

my dumbass thought I could make my own memory map for my bios (all rom is automatically written to the system area) lmao

#

well the good thing is that it seems like every bit in the first megabyte is free

spare quartz
#

this table stuff is hard

lavish dove
spare quartz
#

okay

#

nearly done

#

(replacing this btw)

lavish dove
spare quartz
#

yes

#

RFC 1661

lavish dove
#

w

spare quartz
lavish dove
#

I remember seeing a edit message that one isnt allowed to put data without it being reworded source especially if they made it

spare quartz
#

well that's weird

lavish dove
#

The Triple P.

spare quartz
#

cause i made a giant edit to the page FPCON (force protection condition) using a DOD manual

#

and thats still up

lavish dove
#

(they didnt catch it)

spare quartz
#

no no theres been multiple edits

lavish dove
#

they still didnt catch it

spare quartz
#

(i wrote a lot)

#

and the sources i used are kinda weird, [1]:39:E4.4.2.2-10

lavish dove
#

I just dos'd you

#

good luck surviving the next few days

#

HOLY SHIT THIS IS ANNOYING

#
.nextb:
inc eax
cmp dword [eax], dword "HELL"
jne .nextb
``` I couldnt find the firmware rom (after increasing its size) so I tried doing it in the 12 bytes that did get read and it went all the way up to the 12 bytes
#

it found the code to find the rom but not the fucking rom 😭

spare quartz
#

okay is pushed 😁

spare quartz
#

ったく。。。

wise pollen
#

system.out.println("Hello, world!");

lavish dove
spare quartz
#

(good grief)

lavish dove
#

no way

#

Why isnt my mozc working

#

つたく

spare quartz
#

try ltu

lavish dove
#

how do I get the little tsu

spare quartz
#

Cause that’s full tsu

lavish dove
#

spare quartz
#

there

lavish dove
#

my keybinds dont work sometimes rn too

spare quartz
#

tidal silo
#

Anyone got any good video or tutorial recommendations on scripting shotguns?

lavish dove
#

I would just take normal gun

#

but make it have multiple rays

spare quartz
#

my head hurts so much

#

lmk to fix IP address neogociation when i wake up

#

(also send a Code-Reject to CCP)

#

always so close to getting IP

#

ALSO DO TERMINATE-REQUEST/ACK

timid quartz
spare quartz
#

Stupid Hong Kong IPs trying to run all sorts of stuff on me

#

They never get pass the TLS

timid quartz
spare quartz
#

😭

#

There’s this one HK server in specific that just spitfires a ton of requests

#

all with different TLS parameters

#

Even if it does go through it doesn’t know the server crashes the thread if it’s not exactly SSTP_DUPLEX_POST

timid quartz
#

theyll stop pinging you

spare quartz
#

I don’t have a way to do that very well

#

And sending a geo ip request sounds painful

spare quartz
#

okay

#

fully awake now

#

LCP TERM: No network protocols running

#

im not sure what ips to send,,,

timid quartz
#

your ips?

spare quartz
#

which usually negociates to each peer what their ip should be

#

i just dunno how to send it correctly/what ips would be accepted

lavish dove
#

why does kvm want it before

#

want lgdt before setting efer

#

and tcg want it on far jump

timid quartz
spare quartz
#

ayways its jusut hanging rn

timid quartz
#

I mean how are you even gonna assign it an ip like what

spare quartz
#

probably have to make this thing a tiny router too

timid quartz
#

but you aren't ieee

#

or well

#

iana

spare quartz
#

what do they have to do with anything

timid quartz
#

or is it icann

#

idk

spare quartz
#

you're probably referring to WAN IP assignments

#

those aren't relevant here

timid quartz
#

ur not one of the people in charge of-

#

yes corr

#

how?

spare quartz
#

because vpns/routers don't rely on WAN..?

timid quartz
#

tf are you negotiating an ip for then

#

ur literally sending the packets over wan

spare quartz
#

aera

#

how do you think multiple computers on the same network access the internet through one router?

timid quartz
#

you're making a virtual tunnel sure but underpinning that is the normal wan

spare quartz
#

what does the router do?

timid quartz
#

nat

spare quartz
#

correct

#

thats it

#

NAT does not need to care about wan assignments

#

i was half thinking of writing a DHCP server but that would be way too complex me thinks

timid quartz
#

but then does a vpn not just kinda do what like idk an http server would

spare quartz
#

sorta

timid quartz
#

where it's just exchanging encrypted packets

#

over wan

spare quartz
#

if you're just creating a link to a single party then it would be a "proxy"

#

a VPN would be more like

#

establishing a virtual router to some other computer network (like an intranet)

timid quartz
#

im just confused why there needs to be ip negotiation when you could just say like "ok this ip requested a connection so they get these packets"

spare quartz
#

SSTP punches a hole using HTTP, then negociates IP thru PPP

timid quartz
#

wait wait unless you're like

#

ok wait I think I get it

#

cause you do make a virtual network

#

and the vpn is another middlebox?

spare quartz
#

im not fully certain on what middlebox means

#

pls elaborate

timid quartz
#

well like nat is a middlebox

#

cause it sits in the middle

#

and does stuff to network packets

spare quartz
#

eeeehhh

#

that would be more PPP in this case

#

PPP is what's handling the actual VPN management stuff, then IP/IPCP goes over it and that's whats actually transmitting the data around to different computers

#

and then SSTP is an encapsulation over PPP

#

(because PPP doesn't prescribe any security itself)

#

at least how im understanding it right now

#

of note

#

SSTP gives TLS capability to PPP by essentially hijacking an https request and making it have a content-length of a ulong max value

#

(which is why it runs on port 443)

#

theres also PPTP which is like SSTP, but it doesn't give security

timid quartz
#

is this the correct way to look at it

#

like the VPNs have this virtual network 21.x.x.x set up between them

spare quartz
#

yeah

timid quartz
#

ok that makes sense

spare quartz
#

i just need to figure out why my client isnt continuing the NCP phase of IPCP

timid quartz
#

nerd type shit

spare quartz
#

pppd just keeps issuing the same packet

#

shut up schoolboy

#

fixed Peer not responding (was sending echos with the wrong Magic)

#

still looping though...

#

wait

#

nvm

#

i fixed it!

#

now i just gotta figure out how to test the server

#

okay

#

just gotta implement IP

spare quartz
# spare quartz

@timid quartz if you can figure out what inet/dest translate to you get a cookie

#

i love being able to write names in ips

spare quartz
#

inet: "AERA"
dest: "GAY "

timid quartz
#

I mean idk

#

dest is obvious

#

inet is the source?

spare quartz
#

well there isnt exactly a concept of absolute source/dest but

#

inet is this computer yeah

timid quartz
#

makes sense

spare quartz
#

time to figure this out

#

osdamdoasd,soafwerf.

lyric mesa
#

this automod remains very silly in my opinion

spare quartz
#

implementing authorization

spare quartz
#

oh neat i can set custom response messages

#

i should probably make a console switch configruator

spare quartz
timid quartz
spare quartz
#

hooray

rustic vine
rustic vine
spare quartz
#

a tiny command line reader i made

#

for this vpn server

rustic vine
#

is it posix compliant

spare quartz
#

specifications are for nerds

#

anyways no

rustic vine
#

BOOOOOOO

#

BOOOOOOOOOOOOOOOOOOOOOOO

#

👎

spare quartz
#

it strictly enforces <dash><name><equ><value>[sp]

rustic vine
#

HUH

#

oh

#

BOOOOOOOOOOOOOOOOOOOOOOOOOO

spare quartz
#

you're a boo.

rustic vine
#

pls be posix compliant

spare quartz
#

NO

rustic vine
#

🥺

#

PLS

spare quartz
#

you will take the value dependent spaceless argument and like it

rustic vine
#

you will take xml and like it

spare quartz
#

also p.s. those censored values use a securerandom to randomize their length Trolley

#

protecting your door with concrete but leaving a window open

#

ultimately it looks weird

rustic vine
#

this would be cool ||if it were posix compliant 😄||

#

got u

spare quartz
#

but you aren't

rustic vine
#

ok

#

good point

#

thats a solid argument

spare quartz
#

which colors..

#

pprobably these..

#
[/107.132.83.172:1966;443     @ 02:51:28] (PAP) > PasswordAuthenticationRequest(
    password=String(passwordtest),
    peerID=String(usertest),
    broadcastAddress=Int(255),
    identifier=Int(1),
    protocol=PPPProtocol(PASSWORD_AUTHENTICATION_PROTOCOL),
    type=PAPControlType(CONFIGURE_REQUEST),
    unnumberedData=Int(3)
)
[/107.132.83.172:1966;443     @ 02:51:28] (PAP) < PasswordAuthenticationAcknowledge(
    message=String(Authentication FAIL, usertest),
    broadcastAddress=Int(255),
    identifier=Int(0),
    protocol=PPPProtocol(PASSWORD_AUTHENTICATION_PROTOCOL),
    type=PAPControlType(CONFIGURE_NAK),
    unnumberedData=Int(3)
)
[/107.132.83.172:1966;443     @ 02:51:28] kotlin.NotImplementedError: An operation is not implemented: LCP TERM: Failed to authenticate ourselves to peer

#

hooray it works

spare quartz
#

@flint belfry so uh, good progress so far, but IPv4 is gonna be hard to do since I don’t have clean raw sockets rn (which means at the worst I have to create a virtual router)

also there’s authentication now but it’s just user/pass rn

flint belfry
#

anything works it just can't be too complex since the thing this is going to run on dosent even have /dev/net/tun which most linux os's

#

also reminder that if you can't run this in tcp (which is preferred) udp still works since i can convert it to tcp

lavish dove
spare quartz
spare quartz
#

The client (on windows) will use your internet one, on Linux it’ll create a ppp<x> interface

#

Oh yeah, next time you have access to windows, could you test something for me

#

(my windows vpn doesn’t work cause of something to do with drivers)

#

Let me re wake up

#

ok am awake now

spare quartz
#

wow windows has a lot of interfaces

spare quartz
#

okay could you go into your vpn settings

#

and add a SSTP server

#

for javart.zip

#

and attempt to connect to it

flint belfry
#

are you going to do anything malicious with my traffic

spare quartz
#

like?

flint belfry
#

idk

spare quartz
#

if i wanted to leak your ip again, i could've a while ago

#

but like

flint belfry
#

lmfao

spare quartz
#

im trying to see if you're able to conenct to it

flint belfry
#

anything auth needed

#

or nothing

spare quartz
#

it doesnt matter

spare quartz
#

i assume you got an error for something about an "oplock"

flint belfry
#

correct

spare quartz
#

siiiiiighhh

#

i hate windows

#

that isn't something i can fix on my end

flint belfry
#

fuck what

spare quartz
#

and i can't tell you how to fix it... do you have wsl?

flint belfry
#

then what do w edo

flint belfry
spare quartz
#

too verbose

flint belfry
#

huh

spare quartz
#

seems too large for me to ask you to test that rn at this time

flint belfry
#

well is there absoultey anything we can do about oplock

#

i can run it in a linux vm but it would be nice to have windows

spare quartz
#

i dont know

#

whenever i tried to look up stuff about it, it just gave me driver docs

spare quartz
#

got IP structure

spare quartz
#

YOO

#

SO CLOSe

flint belfry
#

?

spare quartz
# flint belfry ?

im about to support one of the fundamental parts of IP really soon (pinging)

#

after this its tcp/udp

#

a bit scared since i have to "emulate" a lot of this stuff since i dont have access to raw sockets

#

this code is deep

flint belfry
#

reminder that if you can make it so i can ping other devices on the network that would be great since there's another 3d printer which i can't install anything on (its old and doesn't run Linux) would be nice to interact with as well

spare quartz
flint belfry
#

k

spare quartz
#

in fact i switched to using its real local ip for the vpn (might cause issues on clients with a lot of ips though)

flint belfry
#

huh

spare quartz
#

does work though

#

just as if that vpn was your network

#

lemme see if i can "ping" a local device thru it

spare quartz
#

was able to ping my router thru it

#

of course im not sending the ICMP reply packets yet so ping doesnt know, but

#

i think thats cool

flint belfry
#

wait hold on

#

if i couldnt connect to it

#

how tf can you

spare quartz
#

oh im using a linux vpn client

#

i think the vpn (client) breaking had something to do with the transition from windows 10>11

#

but thats a guess

#

dont downgrade your computer for this

flint belfry
#

i have windows 10 vms

#

let me try on there

#

the server is still on javart right

spare quartz
#

yueaj

flint belfry
#

ok ill try in a sec

spare quartz
#

let me know when to turn it on

flint belfry
#

I WAS TRYING TO CONNECT

#

AND WAS ABOUT TO SAY "its not even saying anything now"

spare quartz
#

you Buffoon

flint belfry
#

😭

spare quartz
#

i was just about to work on ping replies too..

#

let me turn it on

#

its on

flint belfry
#

assuming is ssttp or whatevr

#

its the fucking OPLOCK ERROR

spare quartz
#

umm if you have linux... available rn.. you could try the sstpc package

flint belfry
#

ok i have a ubuntu vm we can try this on

#

yeah

#

howdo i do this on ubuntu

#

if ubuntu dosent work i can make another vm

spare quartz
#

you know it might be this

spare quartz
#

just install that package and lemme get you the cmd line

#

sudo sstpc --log-level 400 --log-stderr javart.zip --cert-warn noauth noccp noipv6 novj ipcp-max-configure 1 ipcp-restart 1 defaultroute user testuser password passwordmeow

flint belfry
#

wrong reply

flint belfry
spare quartz
#

sudo apt install sstp-client

flint belfry
#

ummmm

spare quartz
#

my server says your IPCP worked

flint belfry
#

idk what that means

flint belfry
#

ima curl a ipchecker

spare quartz
#

try pinging something on interface ppp0

flint belfry
#

my ip :(

flint belfry
spare quartz
#

if you run curl the server will crash (which is good i guess?)

flint belfry
#

how do i ping on an interface

spare quartz
#

ping -I <intf>

flint belfry
#

is that an i or an l

#

fuck discord

spare quartz
#

uppercase eye

flint belfry
#

ok

#

what do i ping

spare quartz
#

maybe my ip

#

run ifconfig

flint belfry
#

ok

spare quartz
#

really you can ping anything on my local network which is scary, but

flint belfry
#

had to install net tools

#

PP0

#

?

spare quartz
#

ppp0

#

yes

flint belfry
#

my router is 192.168.1.1 which i assume is urs too

#

so ic ant do that

spare quartz
#

its the one labelled destination on ppp0

#

lemme log on to my router to get some ips-

#

yeah

flint belfry
#

uhhh

spare quartz
#

err, cancel that

flint belfry
#

on my side it just

#

isnt doing ahyting

spare quartz
#

yeah thats cause im not sending any replies yet

#

try pinging that ip

#

(or try pinging 192.168.0.1 which is my router ip)

flint belfry
#

no output

spare quartz
#

yeah you're ddosing my router

flint belfry
#

intresting

spare quartz
#

finally try my pc

flint belfry
spare quartz
#

ho

flint belfry
#

oops

spare quartz
#

who did you try pinging

flint belfry
#

i reversed the numbers

#

pung 192.168.0.169 instead of 96

#

wiat

#

did that fuckign crash it

spare quartz
#

yeah i set it to crash on anything not within the test parameters

#

oh... right... i deleted the keystore to try and fix the ssl thing.. give me a moment

#

god

#

nothing i do will make it accept the keystore

#

@flint belfry servers back up

#

try pinging my computer again

flint belfry
#

ok

spare quartz
#

neat

#

turned off server

#

time to work on replies..

#

and the only interface used was my wifi card 😁

#

(which looks much more painful internally than it does externally)

flint belfry
#

what was the resource usage if you know

#

i woudlnt assume anything too serious

spare quartz
#

i wasn't* profiling it,,, uhh lemme try

flint belfry
#

the printer camera stream uses like

#

5 mbs at lowest

#

20 i think at max

#

it depends on settings on the pritner

spare quartz
#

is that network speed or memory

#

heres what the server uses when its pinging with one line open

#

(not terribly great honestly, but it would take a lot longer to write this safely)

flint belfry
#

thats going to be able to run on that right.....

spare quartz
#

well yeah but i mean like

#

a month

#

kotlin lets me write a LOT faster

flint belfry
#

i still have connection to the printer but its hanging on by a thread

flint belfry
spare quartz
#

i'd expect you to be able to

#

i dunno about the memory constraints though

flint belfry
#

lemme check rq

#

holy shit the ssh connection to the printer is still alive

#

what a fucking miracle

spare quartz
#

hmm

#

well thats a terrible idea

flint belfry
#

you only have a gig to work with (979mb)

spare quartz
#

theoretically you could infinitely chain these vpn connections

spare quartz
#

like

#

this VPN server assigns you an ip thru ppp0 right

#

so what if you connected thru ppp0 to start a new vpn connection

#

then you have ppp1 in ppp0

flint belfry
#

but why would tyou want to do that

spare quartz
#

cause it'd be funny

#

ooo yeah

#

thats what would happen if curl were ran

flint belfry
#

are you going to have to hardcode every protocol 😭

spare quartz
#

yeah

#

well just the stuff running on IP

#

application stuff can be ignored

#

the woes of writing your own router

flint belfry
#

so if i were to like

#

use something like telnet (i wont be using it) itll combust??

spare quartz
#

what protocol does telnet use

#

User data is interspersed in-band with Telnet control information in an 8-bit byte oriented data connection over the Transmission Control Protocol (TCP).

flint belfry
#

tcp

spare quartz
#

id just need to code for TCP and itll work

flint belfry
#

well do keep in mind if i want to use your thing in the future beyond the printer and i have a rare use case i dont want it to implode 😭

spare quartz
#

well as far as i know theres very few things that use a protocol outside ICMP/TCP/UDP

flint belfry
#

uhhhhhhhh

spare quartz
#

like lemme get the list

flint belfry
#

oh wtf

#

rdp is its own thing??

spare quartz
#

huh

flint belfry
#

or

#

am i wrong because im looking at the proxmox firewall protocols list 💀

spare quartz
#

By default, the server listens on TCP port 3389[2] and UDP port 3389.

#

just code for TCP/UDP

flint belfry
#

oh

#

ok whatever then lmfao

#

also when i asked if you had to hardcode everything i thought you would need to make support for like literally everything
thank god its just udp and tcp

spare quartz
#

as far as i know IGMP, IPv6 encapsulation, OSPF, SCTP are all like, administrative stuff 99.99% of applications dont care about

spare quartz
#

anything built on top of TCP/UDP just needs to get served to the right ip/port and the applications handle it

flint belfry
#

about ipv6

spare quartz
#

oh yeah if i had to code ipv6 that would mean i would need to redo everything about ip

#

😁

flint belfry
#

dont lmfao

#

the pritner dosent use it and we dont need it

spare quartz
#

not saying ive already done that though

#

10 protocols so far

#

need me a setup that looks like this

flint belfry
#

and then you would cut metal in the casing

#

for no reason

spare quartz
#

no i had a reason for bending the optiplex metal

rustic vine
#

Huh

#

Have

#

Wait

#

@spare quartz did you not sleep???

spare quartz
#

i tried to at 3 am but my eyes just kept hurting

#

so i did a thing called drink a bit of soda and made them stop hurting

spare quartz
#

i didnt see the not

rustic vine
spare quartz
#

hey look

#

this project is pretty cool

#

even if its way beyond my league (initially) for a furry steam game

flint belfry
#

i cant belive im buying you that shit as your payment

#

😭

spare quartz
#

well idk how else to get you to spend it 😭

#

i dont have an account

#

at least im not asking you like, $100,000/year to talk to an ai like whatever tf openai is doing

spare quartz
#

am i pinging you too much? soz

#

damn i cant retroactively make it silent

lyric mesa
spare quartz
#

flags integer Edit the flags of a message (only SUPPRESS_EMBEDS can currently be set/unset)

#

bad api design

#

ddosing rn

lyric mesa
#

plus, i'm not sure if undoing push notifications is a concept...

spare quartz
#

thats for creating the message

spare quartz
lyric mesa
#

ya

lyric mesa
lyric mesa
#

ya i know now i meant... then-

spare quartz
#

just rewind your thought processes about 30 seconds

#

i tihnk thats how they work

#

painful

spare quartz
#

am not learning c

#

i could use assembly, though

#

(expect about 2 months of development for that)

#

also you'd need to buy me bayachao merch

#

a lot of it

timid quartz
spare quartz
#

the client i was using is highly sensitive to the data being sent

#

JDKs have a lot finer control over TLS/SSL ops

#

okay that should be ICMP pings done

#

now to test

#

oops, forgot to encapsulate

timid quartz
#

glad you’re using the better language

spare quartz
#

write this in rust

#

nerd.

timid quartz
#

Ngl I do wanna see how rust would be since you mentioned “OpenSSL restrictions”

spare quartz
#

well to be more specific

#

it was more of i was sending the data too quickly, and the client, being written in C, exceeded its buffer and segfaulted

#

to fix it i'd just include another buffer on the ada side as the stage, but

#

writing ada is a lot more arduous than kotlin (which is why it'd take longer)

#

it'd use maybe 20x less memory though

timid quartz
#

Can you not add a delay in Ada?

spare quartz
#

i'd consider that too brash

timid quartz
#

You have threading primitives so surely you have a wait

#

brash?

spare quartz
#

but again, just use a buffer

timid quartz
#

Idk I feel like you could encounter the same issue in Kotlin too

spare quartz
#

i did!

#

i solved it, again, using a buffer

timid quartz
#

Oh wait is your client in Kotlin

spare quartz
#

no

timid quartz
#

And your server in Ada

spare quartz
#

the client is some C code some guy wrote that goes over linux's pppd

#

the server is rn Kotlin

#

hm odd

timid quartz
#

how is a server buffer solving your problems then

#

and how come you couldn’t do this same thing in Ada

spare quartz
#

i've answered both of those already

spare quartz
spare quartz
rustic vine
#

A circular buffer solves all problems

spare quartz
rustic vine
#

CORRECT!

spare quartz
#

it's just an ArrayList of bytes 🧌

rustic vine
#

Goated datastructure

#

Nvm that's the sparse set

spare quartz
#

oh right

spare quartz
#

IPFrameEncapsulated isn't writing the actual frame

spare quartz
timid quartz
#

ah

spare quartz
#

handles lower level writing/reading w/ 'Write/'Read

rustic vine
#

Sparse sets are awesome I think people should just use them for everything

timid quartz
#

You can’t just write everything at once with that

#

weird

#

you’d think Ada would have something like that

spare quartz
#

you can*

#

it's just again weird to do

#

since your 'Writes wouldn't actually be written to the stream

#

they'd be intercepted into some resizable array/vector

#

and then you'd need to manually flush it

timid quartz
spare quartz
#

uh

#

you can do that in ada

#

i think you're confused about what an RST is

timid quartz
timid quartz
spare quartz
#

i usually just do String'Write(Stream, Data)

timid quartz
#

But then that causes the client to overflow its buffer?

spare quartz
#

because again, i was sending the data too quickly

#

e.g. as it came

#

the solution, is again, a buffer.... ....

#

which would be arduous because i'd need to make a new RST (your "Write")

timid quartz
#

So you can’t just take an arbitrary array, convert it to an array of bytes, and send that over Ada’s normal RST

spare quartz
#

you can

timid quartz
#

or otherwise somehow manipulate your buffer to interface with Ada’s RST

timid quartz
spare quartz
#

the problem is not "i cant send a buffer through an rst"

#

the problem is that the RST that is given to me via OpenSSL is sending it's data too quickly

#

and i'd need to make another RST on top of that

#

which intercepts data into a buffer

#

and is then manually flushed down the line

timid quartz
#

or you could make a buffer and write a flush method that takes a RST as an argument and call it whenever you need it flushed

spare quartz
#

that makes no sense

#

you cannot write arbitrary types to a buffer

#

the RST is what makes serilization possible

timid quartz
#

But you said that you could take a buffer and manipulate it into an array of bytes or some other RST-interface-able type

timid quartz
spare quartz
#

you can

#

that isn't the problem here

timid quartz
#

Oh I misread

spare quartz
#

the problem is the interception from 'Write to the RST which is redirected into a buffer

#

which isn't impossible mind you, it's just "i'd rather not do that"

#

and it'd be much easier to transcribe kotlin into ada later down the line if needs be

#

okay this is completely wrong

#

what is it doing??

timid quartz
#

idk it just sounds like you're overthinking your ada implementation

spare quartz
#

im not

#

writing to a buffer and then flushing the buffer is just the solution, but writing an intercepting rst to do that felt too painful at the time

timid quartz
#

like why wouldn't you be able to have a package Buffer that has some convenience methods for inserting into the buffer (not the stream) and that also has a procedure Flush (S : access Root_Stream_Type) that you call in your code that actually writes to the stream when you want it to?

spare quartz
#

because you can't insert into the buffer

#

and that just feels like a roundabout way to say what im doing

timid quartz
#

??

#

wdym you can't insert into the buffer

spare quartz
#

... you cannot 'Write into a buffer

timid quartz
#

Ok then don't 'Write into the buffer??

#

if you have like idfk

#

what's the right thing to use

spare quartz
timid quartz
#

a vector

spare quartz
#

aera these are networking protcools

#

theres more than just a single number or two

timid quartz
#

I know

#

have your buffer be like a vector of strings or bytes or whatever common type you could use

#

and then have your Flush procedure call RST'Write with your data

#

you don't lose the serialization?

spare quartz
#

hold on

#

let me just draw this out

#

your process is on the left

#

the dark red indicates private operating in the RST

#

your process does not let me Write/Read arbitrary types to the buffer automatically, while thru the RST does

timid quartz
#

Oh I think I see now

spare quartz
timid quartz
#

for the write you could either write as a string or byte array

#

and for read ig there is no better solution than to have a bunch of methods for whatever types you wanna read

#

that thinly wrap the RST

spare quartz
#

you've just reinvented the 'Write/'Read procedures 😭

spare quartz
#

yooo

#

@flint belfry

#

finally got the checksums working

#

pretty c

#

hmm

#

i dont think ping likes my packets a lot

#

there

#

hah

#

it even works with external stuff

#

cool

spare quartz
#

added Destination Host Unreachable

#

this means pings are fully* functional now

pastel tinsel
#

buffer jumpscar

pallid loom
#

what are we thinking

#

nextjs + react + materialui for frontend

express + prisma (sqlite) for backend

#

passwords are hashed using argon2id, each session has its own auth cookie the server checks on every sensitive request

flint belfry
#

i like the look

flint belfry
#

only do it once though since if you spam it your going to get banned

spare quartz
flint belfry
#

yes

spare quartz
#

Also I just woke up

flint belfry
#

take your time

#

wh

#

ITS 9:5 actually ive woke up at worser times

#

i cant blame you

spare quartz
#

but this happens

flint belfry
#

uhhh

#

why not make the interface your primary

spare quartz
#

how

flint belfry
#

idfk linux shit

#

also i wont be able to do that with that program i was talking about

#

everything will need to go through the vpn tunnel by the way

#

i cant just tell the software to go to this interface

#

so essentialy what wireguard does

spare quartz
#

okay i figured it out

flint belfry
#

ummmmmmmmmmmmmmmmmmmm

#

let me check if you got banned

spare quartz
#

i wont be able to connect anyways sincei h avent made tcp yet

flint belfry
#

whats ur ip

spare quartz
#

107.132.83.172

flint belfry
#

i doubt your on here but i see a couple of failed ips (lmfao get rekt)

flint belfry
#

yeah if you havent even made tcp then you cant even say anhything to the server lol

#

well try again when you do make tcp

timid quartz
spare quartz
#

you need an sstp client

#

oh yeah forgot to say

#

i added this tool

#

now to...

#

fake tcp..

#

this is gonna be painful to type out

timid quartz
spare quartz
#

yeah

#

that's how vpns work

timid quartz
spare quartz
#

how did you not know this

#

how do you think they hide your ip 😭

timid quartz
#

cause I've never looked at the internals of a vpn before

timid quartz
spare quartz
#

well yeah but even with a proxy its still retransmitting the packets

spare quartz
timid quartz
#

doing tcp over ip over ppp over sstp over tcp over ip

spare quartz
#

(at least for me) WiFi -> IP -> TCP -> TLS -> SSTP -> PPP -> TCP

#

wifi/ip part uncertain cause idk what im using for datalink

spare quartz
timid quartz
#

the way it was always intended

#

abandon everything else return to C

spare quartz
#

wrng

#

return to x86

#

lazy ass

timid quartz
spare quartz
#

no

timid quartz
#

eys

spare quartz
#

C is x86 for people who can't be bothered to pick up a manual

timid quartz
#

you and your manuals

#

not everything needs a 5 billion page manual

spare quartz
#

dont you LITERALLY have the giant things that are ansi/misra c

timid quartz
#

?

spare quartz
#

462 pages

timid quartz
#

sssh

spare quartz
#

vibe coder ^

timid quartz
#

no u

spare quartz
#

:X:

timid quartz
#

go use cursor

spare quartz
#

ITS NOT BEING PEDANTIC

timid quartz
#

and github copilot free

spare quartz
#

okay now i gottta add tcp options

#

*Options have up to three fields: Option-Kind (1 byte), Option-Length (1 byte), Option-Data (variable). *

timid quartz
#

u basically gotta reimplement all of tcp

spare quartz