#💽Programming Chat v2

1 messages · Page 104 of 1

timid quartz
#

Idk you tend to do lots of funny things

timid quartz
#

code something idk

spare quartz
#

idk im just thinking about them rn

timid quartz
#

think about code…or smth…

spare quartz
#

there is a problem im facing rn

#

i just dont know how to execute it rn so im watching youtube

#

(essentially how would i defer the execution of a lambda until the thing that made it is ready to run it)

#

AHA

#

AN EXECUTOR SERVICE!

timid quartz
timid quartz
# spare quartz AN EXECUTOR SERVICE!

ExecutorService
ExecutorServiceFactory
ExecutorServiceFactoryBuilder
ExecutorServiceFactoryBuilderSingleton
ExecutorServiceFactoryBuilderSingletonStrategy

spare quartz
#

OK.

timid quartz
spare quartz
spare quartz
spare quartz
#

show breadmod to a kff or forge or neoforge or fabric dev to instantly kill them

#

(our recipes now use BigDecimals and ULongs)

spare quartz
#

kotlin for forge

timid quartz
#

Kotlin Fat Fuck?

pastel tinsel
#

true

spare quartz
#

ben you dont even know what a kotlin is

timid quartz
#

(For the better)

spare quartz
#

he's a ts programmer aera

#

you've really fallen from grace

timid quartz
#

I had to argue for not using TS for Guardsman v3 against him and Sky

#

But they are so stuck in their ways

#

But if knowing Kotlin would turn them into you…they can use TS

timid quartz
#

Who is out there actually using the JVM for new projects in 2025 smh there’s no future in it

spare quartz
#

Who is out there actually using Rust for new projects in 2025 smh there's no future in it

timid quartz
#

There’s so many opportunities in rust smh

spare quartz
#

rosetto...............

boreal helmBOT
timid quartz
#

fat

spare quartz
#

what the fuck aera

#

this you??

timid quartz
#

cursed

boreal helmBOT
spare quartz
#

what is wrong with you!!!!!!

#

leave the japanese womans fursona alone.

#

go play with bens

timid quartz
#

I harass him enough

spare quartz
#

n oyo udont

timid quartz
#

?av @spare quartz

upbeat badgeBOT
#
signin.aws.amazon.com
Server Avatar
spare quartz
#

me

boreal helmBOT
timid quartz
#

LOL

spare quartz
#

kys

timid quartz
#

You after eating 500 lemons

spare quartz
#

hai hai hai

timid quartz
#

うるさいも!!

lone sky
#

🥀

timid quartz
spare quartz
#

it used to look like this but i didnt want to repeat the same logic

timid quartz
#

Kotlin should have guard statements

#
func greet(person: [String: String]) {
    guard let name = person["name"] else {
        return
    }


    print("Hello \(name)!")


    guard let location = person["location"] else {
        print("I hope the weather is nice near you.")
        return
    }


    print("I hope the weather is nice in \(location).")
}
spare quartz
#
val name = person["name"] ?: return
val location = person["location"] ?: run { println("alpha"); return }
println("beta $location")
#

its called an elvis operator

timid quartz
#

?:

#

It looks confused

#

Like your whole language

spare quartz
#

rich coming from the person who didnt even know the operator existed

timid quartz
#

uhm yeah cause I’m not a copelin user

spare quartz
#

cause you're lame and think go is good

timid quartz
#

better than Kotlin :3

#

no JVM

spare quartz
#

Kotlin/Native

timid quartz
#

but who even uses that

#

we all know Kotlin is primarily a JVM language

spare quartz
timid quartz
#

one of the big draws is Java compat

spare quartz
#

you said "Kotlin" which just means the language itself

#

the language is compilable to 4 environments

#

i could've said WASM or JS in place of it

#

(and if you count the work of Graal, that too)

timid quartz
#

still…go isn’t kotlin…therefor better

spare quartz
#

you're not bayachao

#

so you're infinitely worse

timid quartz
#

neither are you

#

so you are too

spare quartz
#

nope

#

you dont know me irl

timid quartz
spare quartz
#

trust

lavish dove
timid quartz
spare quartz
spare quartz
#

WE DID IT

#

RECIPE ENTIRELY WITHIN A CAP!!!

timid quartz
#

🧢

spare quartz
timid quartz
#

what is a cap

spare quartz
#

reread the conversation up here

timid quartz
#

oh capabilities

spare quartz
timid quartz
# spare quartz

an innocent rust user being overtaken by the mind plague that is the jvm

spare quartz
#

GOOD!

flint belfry
#

you two fighting over programming languages is kinda like those videos of the two dogs behind a fence barking at eachother but the moment the gate/fence opens they stop barking

flint belfry
#

not translating that

timid quartz
flint belfry
spare quartz
#

no if he were a bulldog he'd have autism

flint belfry
#

this is qsp

#

we ALL have autism

spare quartz
#

aerasto doesn't

#

he's a rust user

flint belfry
rustic vine
flint belfry
spare quartz
#

harry is disabled in another way

#

he lives in america

rustic vine
#

Wht

spare quartz
#

im so sorry for your loss

flint belfry
spare quartz
#

no

#

i moved

flint belfry
#

time to check your github

rustic vine
#

Where

flint belfry
#

your still in texas

spare quartz
#

thank you i needed the time to ge tthis image

flint belfry
#

yes

#

its a scifi discord so its full of people with weird hyperfixations

#

hell i have autism and adhd so

#

proves my point further 😭

spare quartz
#

no its just you

flint belfry
flint belfry
#

(and at least im not a programmer)

flint belfry
#

lol

spare quartz
flint belfry
#

wow die

rustic vine
#

Huh

rustic vine
flint belfry
#

oh 😭

#

i dont know either tbh besides the fact im Not Normal

spare quartz
flint belfry
#

@lone sky your the worst best example

#

😃

lone sky
timid quartz
#

once I have a dhcp address

#

How do I like…use that

spare quartz
#

RAW socket

#

write the ethernet frame which uses the local interfaces MAC address

#

then write an IP frame over that with your newly allocated address

timid quartz
#

oh so

#

manually

#

makes sense

spare quartz
#

well unless you had another way to tell the OS to make a new interface for your ip

timid quartz
#

but same deal

timid quartz
#

Something like socket(AF_INET,RAW_SOCKET,...)

#

Cause it seems like it’s harder to write to a WiFi NIC than it is an Ethernet NIC

spare quartz
#

Good enough

timid quartz
# spare quartz Good enough

huh ok in my quest I have discovered that 802.11 NICs tend to present frames to the OS as Ethernet frames and not as 802.11 frames

#

unless you're in monitor mode in which case you'll get the 802.11 frame along with management AND data frames

#

AUGH KOTLIN AND COMPOSE INVADING MY BRAIN ROT

pastel tinsel
#

oh atp already posted that lmfao

#

guess we both got it from twitter

spare quartz
#

Waaaah my glasses broke

#

Needed to use tape to fix it

spare quartz
#

i read yes

#

bleh

#

the tape on the corner of my vision is so weird to look at

#

it makes it look like the polycarbonate is broken when it can't be 😭

timid quartz
spare quartz
#

yes

timid quartz
#

no response then

#

lame

spare quartz
#

well idk what i would've responded with

#

and when i read them my glasses were broken

timid quartz
#

¯_(ツ)_/¯

spare quartz
#

(and had melted chocolate on one lens)

timid quartz
#

please do not eat your glasses

spare quartz
#

okay well

#

i think i was gonna eat chocolate

#

but then i passed out

#

and woke up with them like tha

flint belfry
spare quartz
#

okay but im literally blind

flint belfry
#

Good. Keep being blind.

#

means you never can touch nor see another computer again

spare quartz
timid quartz
timid quartz
spare quartz
timid quartz
#

ok so

#

fun part

#

wellll

#

maybe

#

yeah

#

raw socket on rust needs a library

#

maybe I could see how the library does it tho

spare quartz
#

depends on OS (even permission wise)

#

i believe you usually need some form of system access (either thru root or Administrator on windows)

timid quartz
#

cause it doesnt have raw sockets directly exposed

spare quartz
#

yeah what i mean is thats probably why the rust stdlib doesn't have support for them

timid quartz
#

m ic

spare quartz
#

java.lang.IllegalStateException: Entity class org.bread_experts_group.breadmod.registry.entity.actual.BigItemContainer has not defined synched data value 8

#

but i haveeeeeeee

#

oh you have to be kidding me

#

i love sloppy coding

timid quartz
#

zig has std.posix.socket

spare quartz
#

is that a raw socket or UNIX socket

timid quartz
#

seems like it's kinda like C

spare quartz
#

oh

#

probably just a general form then

#

might be a direct connection to the C's socket

#

多くの人には届かなくても、いつも聞いてくれる人がOSTER projectのファンでよかったって思えるようなものを作り続けよう

timid quartz
#

mm what kind of packet could I even send

spare quartz
#

wdym

timid quartz
#

ig an icmp ping could work

spare quartz
#

oh

#

well anything

timid quartz
#

well I wanna do smth to get a response

spare quartz
#

UDP is the easiest by far in terms of construction

#

its just size/checksum/data

#

TCP is (somewhat) simple to write a state machine for

#

and ICMP is also really easy to write (unless you want proper safety with enums where it becomes tedious, its a directory of opcodes)

spare quartz
#

remote computers (or even middleware) will completely ignore them if its wrong

rustic vine
#

#❗┃other message

#

this sounds goated

#

hopefully they're hiring

#

thats so much free data

spare quartz
#

true

spare quartz
timid quartz
#

@spare quartz I figured I might as well run dhcp over my raw stuff too

spare quartz
#

okay, just make sure you can support UDP broadcasting

#

(your initial DHCP line will be to query who the gateway is)

timid quartz
#

hmmmmmmm

#

ok so if I dont fragment

spare quartz
#

back

timid quartz
#

I can just set it to 0

spare quartz
#

my bluetooth connection is dead

timid quartz
#

cool

spare quartz
#

this means stay below your MTU though

#

if you exceed that the peer will hate you

timid quartz
#

:3

#

rrgh ok so flags bitfield raaagh

#

network order

#

big endian

#

ugh all of this has to be big cringean

spare quartz
#

big goodian

timid quartz
#

well ok

#

the flags would just be 010

#

palindromic

spare quartz
#

what is the size of the flags field again

timid quartz
#

3 bits

spare quartz
#

then you dont need to worry about endian

timid quartz
#

yeah

spare quartz
#

bit order will always be on the right for least significant

timid quartz
#

welllll I'm going to uhm

#

so

spare quartz
#

if its on the left for network ops you should kys and not deal with it

timid quartz
#

uhm

#

3 bit flag + 13 bit fragment offset (0)

#

010 + 0*13

#

well honestly

#

i could just

#

have it all 0

#

idc if the peer fragments my packets cause it can handle that

spare quartz
#

im pretty sure DF is aimed towards middleware

#

(like a router in between a line to a remote computer)

#

HOLY SHIT AAAA MENTIONED

timid quartz
#

Probably just gonna have my thing cry if it gets a fragmented IP packet

#

Unless I only get fragmented IP packets

spare quartz
#

your router will most likely not fragment anything

#

at least before you get into IP with a very large message

timid quartz
#

if the upper layer is smart it’ll send its packets with a max size of an ip payload so it doesn’t have to fragment

#

Me when I send a 500000 word message over UDP

spare quartz
#

too big for udp ❌

rustic vine
spare quartz
#

yeah

rustic vine
#

😭

spare quartz
timid quartz
#

ugh maybe I should like

#

use a crate for actual bitfields

#

rather than have to pray I'm comparing with the correct endianness

spare quartz
timid quartz
spare quartz
#

TRUE!

#

my mist ake .

timid quartz
#

volitional form

#

that's what it is

#

for ichidan verbs (る verbs) you change る to よう

spare quartz
#

nono i could piece that together from the dictionary info

#

on non-五段 stem; indicates suggestion or invitation

#

i just didn't know what it meant by stem during construction

timid quartz
#

my professors often called the stem "pre-ます form"

#

so like 見ます minus ます = 見

spare quartz
#

need sausage

#

.....

#

pick up that can

timid quartz
#

ok system is little endian

#

must do conversion manually

spare quartz
#

did you just check if it was

timid quartz
#

yes

spare quartz
#

on any conventional (still extant) system it will always be little endian (x86 / ARM / RISC)

#

the only big endian systems that come to mind at the moment are PowerPC

#

(there is also mixed endian but such systems are nonexistant in the grand scheme of things)

timid quartz
#

me when I mix your endians

#

rrrrgh ok

#

growl

spare quartz
#

what i would usually say to do is create an endian flipper based on the local architecture but im unsure how much rust says there

#

in ada you'd just check System, in java ByteOrder.nativeOrder...

timid quartz
#

there's a cfg macro you can use in rust

spare quartz
#

you're a kotlin user and fanboy

timid quartz
#

yes :3c

timid quartz
#

WHAT

#

ok so

#

max ip packet is 65515

spare quartz
#

question mark

timid quartz
#

well for data

#

cause header is 20 bytes

#

and max 16 bit uint is 65535

spare quartz
#

oh

timid quartz
#

so max ip payload is 65515

spare quartz
#

the header might be smaller than 20 bytes

#

depends on the line

#

but yes

timid quartz
#

? no

#

for v4 it should be 20 bytes

spare quartz
#

IP VJ compression

timid quartz
#

wont happen im not doing that :3

spare quartz
#

well it means im not wrong

#

and it depends on your line

timid quartz
#

ok yapper

spare quartz
#

stupid

#

but the actual limit is the MTU

#

which for most devices is 1,500 bytes

timid quartz
#

ok vj compression is for tcp/ip

#

not for just ip

spare quartz
#

ys

#

depends on the line

timid quartz
#

what line!

spare quartz
#

you realize ethernet isnt the only carrier of IP yes.

timid quartz
#

yeeeees

spare quartz
#

it also goes thru PPP and crap

#

which may say to use the compression.

#

so it depends on the LINE

timid quartz
#

oh tha tkind of line

spare quartz
#

i wish to become like him

timid quartz
#

rrrgh

#

must make sure

#

to serialize payload data correctly

spare quartz
#

use wireshark to check_

timid quartz
#

wireshark ❤️

spare quartz
#

cellular phones will not give you cancer. only hepatitis

timid quartz
#

mmmm

#

should assume that payload will already be big endian

spare quartz
#

yes

#

there is no logical way to attribute endianness to the payload since its any data

timid quartz
spare quartz
#

this code sucks ass. session terminated

timid quartz
#

this code is beautiful

#

session restored

spare quartz
#

session classified

timid quartz
#

hmm I should have all of those even despite the default values

#

cause im gonna have to read them

spare quartz
#

AERASTO WAKE UP!!!

#

NEW IED CAME OUT

timid quartz
#

mm I wonder if I can use this to read ip packets now

spare quartz
#

tr y it

timid quartz
#

hmmmm

spare quartz
#

?

timid quartz
#

need..ipproto_raw...

#

or I could maybe...just udp and try to listen

spare quartz
#

what is an .. " " " ipp rot o _ ra w "

timid quartz
#

to interact directly with layer 3

#

rather than level 4

spare quartz
#

004041

#

actually yeah that makes me have a question

#

how exactly are you binding

timid quartz
#

good question

#

Socket has a bind method

spare quartz
#

okay but how does that work

#

cause most OS binds are tied to a specific protocol over IP

timid quartz
#

yeaaah hence I uhm

#

maybe that's why it doesnt have ipproto_raw

spare quartz
#

blegh glasses have bad blur gain

#

need water

timid quartz
#

seems like with C you can just

#

bind a raw ip socket to an ip

#

odd

#

well ok maybe protocol = None will do the trick

spare quartz
#

'i hope this isnt inconclusive

timid quartz
#

mm

#

im gonna need something to send it some data

spare quartz
#

telnet

timid quartz
#

I can ping myself ig

#

or yeah telnet

#

ayy icmp packet

#

I do not like this very much

spare quartz
spare quartz
timid quartz
#

this is better

#

damn ip packets are 64kb today I realized

lone sky
timid quartz
spare quartz
#

was this not your last?

timid quartz
#

my last?

spare quartz
#

was that not how you were reading before

timid quartz
#

udp packet :3

flint belfry
timid quartz
#

this is wrong

spare quartz
#

issue?

timid quartz
#

type is 1

#

protocol*

#

not 17

#

oh I see

#

destination unreachable?

#

cause type 3 code 3

#

wait but then after that

#

there suh

#

oh there's an icmp destination port unreachable

#

and then the udp packet after

spare quartz
timid quartz
#

yeah

spare quartz
#

you might have a partial read

timid quartz
#

mmmaybe idk

#

idk why there's an icmp unreachable message though

#

should be reachable

#

mmmmmmmmm mwait

#

unless it's because my socket

#

isn't marked as udp

#

aha

#

mmm putting UDP as the protocol results in no read though

#

wait

#

yeah no read

#

weird

spare quartz
#

i hate logic like this

timid quartz
#

idk somehow it must not be binding right

#

huh ok @spare quartz

#

if I do Type::RAW with Protocol::UDP I get nothing

#

but if I do Type::RAW with no protocol I see the ICMP and weird UDP packet

#

but if I do Type::DGRAM with Protocol::UDP I get just the UDP data (as I'd expect)

spare quartz
#

im confused

timid quartz
#

me too

spare quartz
#

what are Type and Protocol

timid quartz
#

so in the libc function socket

#

it's a 1:1

#

domain is IP (could be something like a local "unix" socket though); type is socket (TCP-like), datagram (UDP-like), or raw; protocol is UDP, TCP, ICMP, etc

spare quartz
#

raw and protocol seem antithetical

timid quartz
#

protocol could also be IPPROTO_RAW

spare quartz
#

well what does that do

timid quartz
#

it does what's in the name

#

u get raw IP

spare quartz
#

okay so why aren't you using that

spare quartz
#

domain as an int is stupidly stupid

#

even for C

timid quartz
spare quartz
#

well why not just

#

ignore the icmp packet

#

just keep reading past it

#

Is that fucking comic sans

Quoting U.S. Marines (@USMC)

#Marines with the @31stMeu execute a live-fire range aboard a UH-Y1 Venom in Queensland, Australia.
︀︀
︀︀Marines took part in the live-fire range to sustain aerial marksmanship and expand mission capabilities.
︀︀
︀︀#USMC #SemperFi #Aviation

**💬 10 🔁 32 ❤️ 487 👁️ 11.0K **

timid quartz
#

I could read_exact byte by byte

#

but I don't think it's a short read

spare quartz
#

does your read function signal the amount of actually read bytes?

timid quartz
#

I believe so yes

spare quartz
#

print that in tandem with the data (or slice, preferably)

#

if it ends after udp length its partial read

#

it'd be really strange if the read was not partial, i wouldn't have any idea on what would cause that

timid quartz
#

56 bytes

#

highlighted all 56

#

althought

spare quartz
timid quartz
#

huh

#

for the icmp packet

#

why does the ip header say total length 36

#

it's only like 28

spare quartz
#

did not work

#

oh, didnt set descriptor

timid quartz
#

hmm ok

#

similar issue arises in C

#

ohhhhhhh @spare quartz the weird udp packet is a part of the icmp packet

spare quartz
#

OHHHHH

#

i remember now

timid quartz
spare quartz
#

that makes sense now

timid quartz
#

hm I wonder why it doesn't see the udp packet though

#

cause wireshark does

spare quartz
#

FORGED IN THE MOLTEN PLASTIC OF SHANDONG, CHINA

timid quartz
#

this coding project sucks

#

ide terminated

spare quartz
#

:<

timid quartz
spare quartz
#

yes

#

when kade asked me to make him an sstp thing for his dumb printer

#

i had to implement the entirety of PPP/IP/TCP/UDP/ICMP

timid quartz
#

mmm right

#

I feel like that situation was a tad different

timid quartz
#

because uhhh

#

idk exactly how you interfaced with PPP but the rest of the stack you had more direct control over

spare quartz
#

i mean SSTP is virtually identical to an Ethernet line, just over TLS

timid quartz
#

oh right SSTP

spare quartz
#

PPP is the analog to your Ethernet

timid quartz
#

right but you had SSTP

spare quartz
#

SSTP doesn't really add anything

timid quartz
#

which uses the TCP stack on the host machine

spare quartz
#

yes

timid quartz
#

you're not directly interfacing with a physical nic

spare quartz
#

which should be parallel to your RAW

timid quartz
#

whereas I'm trying to do some weird shit like that

spare quartz
#

and neither are you!

#

you're interfacing with a POSIX RAW!!!

#

thats not a nic

timid quartz
#

I think it's different

#

if it was as simple as just making a raw udp socket I feel like I would have gotten that by now

spare quartz
#

well

#

maybe ill try and make a raw socket in kotlin

#

i just need to find whatever windows does for it instead

timid quartz
#

I am on macos that could be causing something idk

spare quartz
#
Winsock service providers for the IP protocol may support a socket type of SOCK_RAW. The Windows Sockets 2 provider for TCP/IP included on Windows supports this SOCK_RAW socket type.

There are two basic types of such raw sockets:

The first type uses a known protocol type written in the IP header that is recognized by a Winsock service provider. An example of the first type of socket is a socket for the ICMP protocol (IP protocol type = 1) or the ICMPv6 protocol (IP procotol type = 58).
The second type allows any protocol type to be specified. An example of the second type would be an experimental protocol that is not directly supported by the Winsock service provider such as the Stream Control Transmission Protocol (SCTP).
timid quartz
#

but my thought is like

#

what you did was

#

essentially

#

sstp.send_data(ppp.encapsulate(ip.encapsulate(...)))

spare quartz
#

basically

timid quartz
#

and sstp under the hood is interacting with your os's network stack

#

whereas I'm trying to interact with the OS network stack directly

spare quartz
#

well no

#

SSTP is just another encapsulate like PPP over TLS which is over TCP

#

what im saying is

#

your socket RAW should be analogous to the PPP part of that encapsulate chain

#

so i do not know why it isn't

#

what the

#

okay win32..

timid quartz
#

I think it's more analogous to the IP encapsulated by PPP

#

because I'm not interacting with L2 with the raw socket

spare quartz
#

sorry i mean after encapsulation

#

but yes

#

okay

#

win32 just got a LOT more interesting for me

#

i might gotta write a whole BSL Socket

#

@timid quartz thisi s why i hate you

#

i was supposed to give YOU something to code

#

not myself indirectly

timid quartz
spare quartz
#

Ws2_32.dll

spare quartz
timid quartz
#

mm

#

I am reading that macOS is restrictive and could be blocking stuff

spare quartz
#

the worst part about making apis

#

having to make it extensible for* the future

timid quartz
#

I may have to try this on Linux

#

what im reading is stuff about BPF (Berkley Packet Filter) and system integrity protection potentially still bocking stuff

spare quartz
#

something windows might actually be good in!

#

win32 exposes this

timid quartz
#

I did see that yeah but

#

I did not wanna have to write something to put together a UDP packet yet but I might do that

spare quartz
#

hmm

#

SocketImpl..

#

or well, i need to figure out how to load the right socket for the os

timid quartz
#

checksums...annoying...

#

just let me send my data in peace

#

I dont wanna have to deal with integer overflow

spare quartz
#

good enough

timid quartz
#

ok cool I can take the easy way out for rn

spare quartz
#

time to see my error code

#

its smart!

timid quartz
#

hmmm

#

send failed: Os { code: 39, kind: Uncategorized, message: "Destination address required" }

#

but the destination address is ther

#

that's the ip packet im sending

#

@spare quartz did I fuck it up?

spare quartz
#

sorry watching something right now

#

it'd be a lot more helpful if you wrote a formatter for an ip struct

timid quartz
#

ok

spare quartz
#

but yes i see the two addresses.

  • packet might be misaligned
  • partial write
  • something else? (i dont know how you're aquiring that error message)
timid quartz
#

ohhh could be partial write

#

m nope

timid quartz
# spare quartz it'd be a lot more helpful if you wrote a formatter for an ip struct
UdpDatagram {
    src_port: 0,
    dst_port: 22994,
    length: 6,
    checksum: 0,
    data: [
        104,
        101,
        108,
        108,
        111,
        0,
    ],
}
Ipv4Packet {
    version_ihl: 69,
    dscp_ecn: 0,
    total_length: 34,
    identification: 0,
    flags_frag_offset: 0,
    ttl: 128,
    protocol: 17,
    checksum: 0,
    src_addr: 16777343,
    dst_addr: 16777343,
    payload: [
        0,
        0,
        89,
        210,
        0,
        6,
        98,
        85,
        104,
        101,
        108,
        108,
        111,
        0,
    ],
}
[69, 0, 0, 34, 0, 0, 0, 0, 128, 17, 55, 206, 1, 0, 0, 127, 1, 0, 0, 127, 0, 0, 89, 210, 0, 6, 98, 85, 104, 101, 108, 108, 111, 0]
spare quartz
#

0099-31-4-359

#

are you sure the addresses are correct?

#

they appear to be in the wrong endian in that structure, are you flipping them before instantiation

timid quartz
#

im doing to_be_bytes but idk

spare quartz
#

im seeing 0x100007F

#

10.00.00.7F = 1.0.0.127

timid quartz
#

trolled

#

ok so

#
UdpDatagram {
    src_port: 0,
    dst_port: 22994,
    length: 6,
    checksum: 0,
    data: [
        104,
        101,
        108,
        108,
        111,
        0,
    ],
}
Ipv4Packet {
    version_ihl: 69,
    dscp_ecn: 0,
    total_length: 34,
    identification: 0,
    flags_frag_offset: 0,
    ttl: 128,
    protocol: 17,
    checksum: 0,
    src_addr: 2130706433,
    dst_addr: 2130706433,
    payload: [
        0,
        0,
        89,
        210,
        0,
        6,
        98,
        85,
        104,
        101,
        108,
        108,
        111,
        0,
    ],
}
[69, 0, 0, 34, 0, 0, 0, 0, 128, 17, 60, 201, 127, 0, 0, 1, 127, 0, 0, 1, 0, 0, 89, 210, 0, 6, 98, 85, 104, 101, 108, 108, 111, 0]
#

still same thing but I flipped a thing

spare quartz
#

how are you getting the error code

timid quartz
#

wdym how

spare quartz
#

you are working at RAW

#

there should not be such error reporting there

timid quartz
#

sock.send(&ip_bytes).expect("send failed");

#

this is the line

spare quartz
#

"Destination address required" ?

timid quartz
#

I wonder if it's still trying to handle the ip header

lone sky
timid quartz
#

that would be the most probable explanation

spare quartz
#

10014

#

uuuhhh need to open an arena and allocate the struct

timid quartz
#

HEY

#

IT WORKED

spare quartz
#

good!

timid quartz
#

I just had to uh?

#

idk why that's necessary

#

maybe L2 needs it in some way

#

I wonder what happens if I

#

although uh

#

netcat doesnt receive them...maybe bsd restrictions striking again

spare quartz
timid quartz
#

I should try doing this on linux and see what happens

#

linux might be less...restrictive

spare quartz
#

run it in macos single user mode 👍

timid quartz
#

oh huh

#

malformed somehow

spare quartz
#

misalignment

#

read the packet data

timid quartz
#

gonna misalign you

spare quartz
#

thats assault

timid quartz
#

also weird

#

macos is definitely tampering with my stuff

#

I set the identification field to 0

#

but it's not 0 in that packet

#

yeah

#

macos is messing with my stuff confirmed

#

area inside brackets is the actual packet I'M trying to send and I know that because the length is 0x22 = 34

#

although my length might be swapped around it's not

#

stupid macos just lemme write stuff

spare quartz
#

turn off sip bro

#

just turn off sip

timid quartz
#

💀

#

Yknow it…

#

Lemme check

spare quartz
#

(im not actually certain if turning off sip will do anything)

#

(i usually just do it cause its more restrictive than windows)

timid quartz
#

sip out here just trying to protect your system integrity

spare quartz
#

okay but i wanna edit system

#

it doesnt need to lock down /Library/

#

im trustable

timid quartz
#

ur mad at poor sip for doing its job

#

yeah sip is on and I don’t rlly wanna turn it off

spare quartz
#

0202 = 2.2 = neat that works

timid quartz
spare quartz
#

WSAProtocol(serviceFlags1=[XP1_GUARANTEED_DELIVERY, XP1_GUARANTEED_ORDER, XP1_GRACEFUL_CLOSE, XP1_IFS_HANDLES])

timid quartz
#

oh

spare quartz
#

enumerating protocols rn

#

idk if graalvm has a very stable FFI

#

it likes to segfault in jvm.dll sometimes

#

trying eclipse temurin

timid quartz
#

It is POURING rn

spare quartz
#

its gotten super windy here

#

the air is still hot so not very pleasant but the clouds are dark

timid quartz
#

lightning struck a tree behind my house

timid quartz
spare quartz
#

thats interesting

#

strong winds here aren't super very common where i am (without rain)

#

but theres a wind farm a few miles away

#

(most power here is gas or solar)

timid quartz
#

what could be happening is dry downbursts

spare quartz
#

some nuclear too

timid quartz
#

where rain falls from clouds in a localized group but evaporates again before it reaches the ground

spare quartz
#

boooring

timid quartz
#

especially if it’s been super hot that could be happening

spare quartz
#

i want rain

#

well we do have a weather statement here about excessive heat

#

but thats every single day in the summer

#

aww cmon

#

how does the airport weather station have rain but not me

#

just move to the south a bit..

#

theres a massive cloud to the right side of my window

timid quartz
#

cursed to never get rain

#

go to somewhere in the southeast you’ll get tons

spare quartz
#

i am in the southeast

timid quartz
#

spare quartz
#

not super but basically just outside the city

timid quartz
#

you’re not in the Deep South

spare quartz
#

south central texas.

timid quartz
#

Texas is more mid-south

spare quartz
#

what

#

are you talking about the equator

#

the only "more south" is latinoamerica

timid quartz
timid quartz
spare quartz
#

should've clarified you were talking about the contiguous us

#

i dont know if you're referring to the state or planet dummy

timid quartz
#

yes the CONUS

#

Go to any state highlighted dark red especially ones closer to FL

#

you will get buckets of rain in the summer

spare quartz
#

nooo i dont wanna

timid quartz
#

…and the winter

spare quartz
#

dont a lot of the countries there have swamps

#

I MENA

timid quartz
#

“countries”

spare quartz
#

STATES

#

im sorry im tired

timid quartz
#

COUNTRIES

#

Uhh yes there is low lying swamp and marsh but that’s really more towards the coast

#

You can live more inland and not have much

spare quartz
#

sounds boring

timid quartz
#

rain…..

spare quartz
#

id rather live in ohio

timid quartz
#

who is getting rain and who is not rn

spare quartz
#

(and the temperatures are also not great, but it beats the possible 120 heat index)

timid quartz
#

lol southeast US has bad bugs in the summer too

spare quartz
#

(winters are also brutal but i prefer that)

timid quartz
#

especially gnats and mosquitoes I hate those things

#

sand gnats raaaah

#

@rustic vine pls relate

spare quartz
#

do not roll in the grass in ohio

#

you will experience 1 billion of those spiky grass things and 1 trillion gnats eating you

#

(except in the winter where you better be wearing bulky clothes)

timid quartz
#

mmmm spiky grass things ❤️

#

also spike balls ❤️

spare quartz
#

idk why plants invented these

#

literally just worse solar panels

timid quartz
#

We would throw these at each other all the time in elementary school

spare quartz
#

okay giant cloud appears to be blowing towards my direction

#

thats good

#

hopefully some rain

spare quartz
#

spiky grass things im referring to are green/white and they get everywhere on your socks if you have shorts

spare quartz
#

no

#

you have brown death plant

timid quartz
spare quartz
#

ik its the image perspective but those look giant

timid quartz
#

They are big yes

spare quartz
timid quartz
#

You are talking about this (we have these too)

timid quartz
spare quartz
timid quartz
#

no :(

#

I bet you didn’t even have roly-polies

spare quartz
#

dude we have those here in texas

timid quartz
#

oh good :)

#

essential childhood bug

spare quartz
#

i found some around the power meter ground tunnel a few years ago

timid quartz
#

best kind of isopod

spare quartz
#

im horrified of all other bugs though

#

except bees

#

bees and rollie pollies im okay with

timid quartz
#

mmm I don’t rlly like bees too much

#

respect for pollinating and for honey but pls stay in your own corner

spare quartz
#

idk i just dont think you're bee pilled enough

#

go play with hornets loser

timid quartz
#

says the one who didnt have spike balls

spare quartz
#

weirdo

timid quartz
#

?

spare quartz
#

this you

timid quartz
#

nice selfie?

spare quartz
#

kys

#

btw whats your favorite timezone

timid quartz
#

mmmm

#

ok even though I’m an east coast resident

#

gotta go UTC

spare quartz
#

WRONG

#

its everything BUT HST and AKST

#

get it right

timid quartz
#

more specifically Zulu time

timid quartz
spare quartz
#

hawaii and alaska

timid quartz
#

If I don’t know about them they probably don’t deserve to exist

#

ok

timid quartz
spare quartz
#

idk did they

#

and who

timid quartz
#

Yeah

#

Maybe not Alaska but

spare quartz
#

they're totally separate geographically so i wanted a confirmation

#

(plus theres nothing on the western side of alaska)

#

(except for radar)

spare quartz
#

that weather looks so fine ...

timid quartz
spare quartz
#

NOT THAT KIND OF RADAR

#

MILITARY RADAR

#

!!!

timid quartz
#

But there IS that kind of radar up there too :3

spare quartz
#

and theres also weather satellites in its area too if you count those

#

stupid weather nerd 🤮

#

timid quartz
#

weather is so cool….

spare quartz
#

未Aerasto

#

親ばやちゃお

lone sky
#

according to translator

#

but i know what one of those things says

#

spare quartz
#

here it means pro-

#

i should really use CTRL + < more

#

[WSAProtocol(serviceFlags1=[XP1_GUARANTEED_DELIVERY, XP1_GUARANTEED_ORDER, XP1_GRACEFUL_CLOSE, XP1_IFS_HANDLES], serviceFlags2=0, serviceFlags3=0, serviceFlags4=0, providerFlags=[PFL_MATCHES_PROTOCOL_ZERO])

#

WindowsGUID time...

#

00020026-0000-0000-0000-000000000000

#

does not seem right

#

oh, didnt use offset

timid quartz
#

ok time to try raw socket on leenux

#

shall attempt in C first

spare quartz
#

1B193412-F74B-A74C-86E0-DFD7C32B5445

#

that seems more right

#

switched it to use little endian

#

1234191B-4BF7-4CA7-86E0-DFD7C32B5445

#

found this on a random website

#

so its the right decoding

timid quartz
#

some weirdness is afoot

#
[ 69, 0, 0, 31, -90, -28, 64, 0, 64, 17, -107, -25, 127, 0, 0, 1, 127, 0, 0, 1, -68, -124, 89, -46, 0, 11, -2, 30, 104, 105, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
#

this is what i've got

#

the weirdness starts happening around the total length

#

oh wait I was reading that a bit wrong

#

lemme write it out

#

version and IHL - 69 (0x45) ✅
DSCP and ECN - 0 ✅
total length - 31 ✅
identification - some weird shit (-90 then -28)
flags and fragment offset...64 then 0
ah I see it's the do not fragment flag ok
ttl - 64 ✅
protocol - 17 ✅
checksum yeah whatever
src and dest addresses being 127.0.0.1 ✅
and I guess the rest is the udp packet, probably negatibe cause my ports are weird
udp length is 11, check out yeah it's good

#

ok

spare quartz
#
[WSAProtocol(serviceFlags1=[XP1_GUARANTEED_DELIVERY, XP1_GUARANTEED_ORDER, XP1_GRACEFUL_CLOSE, XP1_IFS_HANDLES], serviceFlags2=0, serviceFlags3=0, serviceFlags4=0, providerFlags=[PFL_MATCHES_PROTOCOL_ZERO], guid={1234191B-4BF7-4CA7-86E0-DFD7C32B5445}, catalogID=1001, protocolChain=[0, 0, 0, 0, 0, 0, 0], version=2, addressFamily=Hyper-V [34], addressMax=36, addressMin=36, socketType=Stream-oriented [1], protocol=Internet Control Message Protocol (ICMP) [1], protocolMaxOffset=0, endian=BIG_ENDIAN, securityScheme=No security scheme [0], maximumMessageSize=0, providerReserved=0, name=Hyper-V RAW)]

#

my first protocol

timid quartz
spare quartz
timid quartz
spare quartz
#

h w ahu rrt

spare quartz
#

ayyy

#

my protocol enumerator works

spare quartz
#

every protocol my computer supports

lone sky
#

can vouch for y'all to play it

spare quartz
#

even have unix sockets

#

and it supports unicode

#

@timid quartz crazy idea

#

if i can get a bluetooth socket in bsl...

#

minecraft over bluetooth?

timid quartz
#

minecraft over bayachao

spare quartz
timid quartz
#

ew what is that

spare quartz
#

plugs into a Mappable enum

#

(basically an enum with a representation other than its ordinal)

#

almost every protocol in the world uses it

timid quartz
#

but like what doe sit do

spare quartz
#
interface Mappable<E, T> where E : Enum<E>, E : Mappable<E, T> {
    val id: T
    val tag: String

    fun stringForm(): String = "$tag [$id]"
    fun other(): E? = null

    companion object {
        inline fun <reified E, T> EnumEntries<E>.id(
            n: T
        ): MappedEnumeration<T, E> where E : Enum<E>, E : Mappable<E, T> = MappedEnumeration(
            this.firstOrNull {
                it.id == n
            } ?: this.first().other() ?: throw IndexOutOfBoundsException("Missing ID for $n"),
            n
        )
    }
}
#
enum class WSAAddressFamily(override val id: Int, override val tag: String) : Mappable<WSAAddressFamily, Int> {
    AF_INET(2, "Internet Protocol, version 4"),
    AF_IPX(6, "NWLink IPX/SPX"),
    AF_APPLETALK(16, "AppleTalk"),
    AF_NETBIOS(17, "NetBIOS"),
    AF_INET6(23, "Internet Protocol, version 6"),
    AF_IRDA(26, "Infrared Data Association (IrDA)"),
    AF_BTH(32, "Bluetooth"),
    AF_HYPERV(34, "Hyper-V"),
    OTHER(-1, "Other");

    override fun toString(): String = stringForm()
    override fun other(): WSAAddressFamily = OTHER
}
#

.stringForm = "Bluetooth [32]"

timid quartz
#

oh ic

#

so you're basically saying an enum can be mapped to another type

spare quartz
#

yes

#

as long as its comparison operator isn't crap

#

i haven't found a use outside strings/numerics for mappings but its possible

timid quartz
#
#[repr(u8)]
enum MyEnum {
  One = 1,
  Two,
  Three,
}
#

:3

#

also u could just tag it

spare quartz
#

?

spare quartz
#

EnumClassWhatever(val alpha: X) {
Something(X)
}

timid quartz
#

anyways im playing severance in roblox rn

spare quartz
#

Ok.

lone sky
spare quartz
#

ハンカチカバンの上に投げ捨てて置いてたら普通に忘れてドカ鬱😃

lone sky
spare quartz
#

much better

#

now i can add the entries i need

#

@lone sky A BAYACHAO HAS HIT THE AYUTADA TOWERS

timid quartz
lone sky
timid quartz
spare quartz
spare quartz
#

therefore i shall NOT comment on what squid could possibly mean

#

due to obvious japanese people are japanese people

timid quartz
#

hm

#

what to do now...

#

that i know raw socket wont rlly work on macos...

#

how to continue........ . .. . ..... .... . .. . ..

#

and NO disabling sip is not on the table

spare quartz
#

do it in recovery mode!!!!!

timid quartz
#

what no

spare quartz
#

you're just not UNIX pilled enough

timid quartz
#

not disabling sip...

spare quartz
#

okay

#

thats EVERY address family

#

what a pain

#

formatted every protocol

lone sky
#

you know you need to.

#

you know you want to.

timid quartz
#

you will not hack into my macbook

lone sky
#

☣️

spare quartz
#

AHA IT WORKS

#

there we go

#

but first sleep .

timid quartz
#

RAAAAAAAAAAAAHHHHHHHHHHHHHHHH

spare quartz
spare quartz
#

でびコネ
列リ途中!
「キミは幸せでいてね。」

#

She couldn’t really be using キミ, right? That has to be their name ??

timid quartz
spare quartz
#

she’s normal.

timid quartz
#

ABnormal*

spare quartz
#

no, she doesn’t have AB blood

spare quartz
#

anywyas

#

back to Win32 development

#
MSAFD RfComm [Bluetooth] ({9FC48064-7298-43E4-B7BD-181F2089792A}, version 2, #1014)
    Address Family / Socket Type: MappedEnumeration(enum=Bluetooth [32], raw=32) / MappedEnumeration(enum=Stream-oriented [1], raw=1)
    Protocol: MappedEnumeration(enum=Bluetooth Radio Frequency Communications (RFCOMM) [3], raw=3) [+ 0]
    Addresses: 30 .. 30 byte(s)
    Message Size: 0 byte(s)
    Endian / Security: BIG_ENDIAN / MappedEnumeration(enum=No security scheme [0], raw=0)
    [0] [[0, 0]]
    Service flags: [XP1_GUARANTEED_DELIVERY, XP1_GUARANTEED_ORDER, XP1_GRACEFUL_CLOSE, XP1_IFS_HANDLES]
                   [0, 0, 0]
    Provider flags: [PFL_MATCHES_PROTOCOL_ZERO]
MSAFD Tcpip [RAW/IP] ({E70F1AA0-AB8B-11CF-8CA3-00805F48A192}, version 2, #1012)
    Address Family / Socket Type: MappedEnumeration(enum=Internet Protocol, version 4 [2], raw=2) / MappedEnumeration(enum=Raw [3], raw=3)
    Protocol: MappedEnumeration(enum=Other [-1], raw=0) [+ 255]
    Addresses: 16 .. 16 byte(s)
    Message Size: 32768 byte(s)
    Endian / Security: BIG_ENDIAN / MappedEnumeration(enum=No security scheme [0], raw=0)
    [0] [[0, 0]]
    Service flags: [XP1_CONNECTIONLESS, XP1_MESSAGE_ORIENTED, XP1_SUPPORT_BROADCAST, XP1_SUPPORT_MULTIPOINT, XP1_IFS_HANDLES]
                   [0, 0, 0]
    Provider flags: [PFL_HIDDEN, PFL_MATCHES_PROTOCOL_ZERO]
#

the two things i wanna look at

spare quartz