#garfield Logs

Dec 26 2022

#garfield Calendar

12:08 AM rue_mohr: yup
12:19 AM rue_mohr: but your gone
12:19 AM rue_mohr: the cpu can only operate one of us at a time
12:39 AM rue_shop3: each time you turn away from the computer, your process is suspended and I execute for a bit
12:39 AM rue_shop3: ditto vise versa
12:44 PM MoonyMoon: rue_mohr, XD
12:44 PM MoonyMoon: indeed
02:12 PM Tom_L: https://imgur.com/a/6iGsfPi
04:19 PM MoonyMoon: *
04:19 PM MoonyMoon: *
04:19 PM rue_mohr: yep
04:20 PM MoonyMoon: void readInBuff(char* p) {
04:20 PM MoonyMoon: while( (read(fd, p++, 1)) == 1 ) {
04:20 PM MoonyMoon:
04:20 PM MoonyMoon: if ( *p == '\n' ) {
04:20 PM MoonyMoon:
04:20 PM MoonyMoon: p--;
04:20 PM MoonyMoon: *p = 0x00; //make it into an actual "string"
04:20 PM MoonyMoon: break;
04:20 PM MoonyMoon: }
04:20 PM MoonyMoon: }
04:20 PM MoonyMoon: }
04:20 PM MoonyMoon: my function is hanging :|
04:20 PM rue_mohr: what kind of exploit is it?
04:20 PM MoonyMoon: no exploit :D
04:20 PM MoonyMoon: just copying memory
04:20 PM MoonyMoon: from an input stream to a string
04:21 PM rue_mohr: why not replace the \n with 00
04:21 PM rue_mohr: so that \n\n wont break it
04:22 PM rue_mohr: hmmm
04:22 PM MoonyMoon: im expecting \r\n
04:22 PM MoonyMoon: and relacing \r
04:22 PM MoonyMoon: but expand on why \n\n would break
04:23 PM rue_mohr: because it'll try to replace the character before the \n, with 0
04:23 PM rue_mohr: in a 1 byte string
04:24 PM MoonyMoon: i want to acumulate many bytes in my string :|
04:24 PM rue_mohr: mhm
04:24 PM rue_mohr: so
04:24 PM MoonyMoon: would my functio not acumulate?
04:24 PM rue_mohr: use a function that reads up to the \n to read it all at once
04:25 PM rue_mohr: then do a check on the last bytes, replacing them with 0 as you want
04:25 PM rue_mohr: \n\n wont tho
04:25 PM rue_mohr: it'll put a byte in, then try to replace the byte before it with 0
04:25 PM MoonyMoon: thats what MY function is suposed to do, is there a library function taht deos that/
04:26 PM rue_mohr: fscanf
04:26 PM rue_mohr: ah you want to use a handle tho
04:26 PM MoonyMoon: yes
04:26 PM MoonyMoon: no fshit
04:27 PM rue_mohr: there is, where do we find it...
04:27 PM rue_mohr: I kinda just woke up
04:27 PM MoonyMoon: ok I will be using sprintf after a gleam my stuff
04:27 PM MoonyMoon: glean*
04:28 PM MoonyMoon: *sscanf
04:28 PM rue_mohr: well
04:28 PM rue_mohr: I'm missing something
04:28 PM rue_mohr: in perl, there is a function called
04:28 PM rue_mohr: uh
04:29 PM MoonyMoon: I gtg but be back
04:29 PM rue_mohr: chomp
04:29 PM rue_mohr: your gone
04:30 PM rue_mohr: back to bed for me then
07:25 PM rue_shop3: MoonyMoon, if you didn't full screen all your programs and burry them all under multiple layers maybe you could see irc messages as they happen...
07:25 PM rue_shop3: JUST SAYIN
07:34 PM MoonyMoon: Thats what you think :D
07:37 PM MoonyMoon: its mostly the multiple desktops XD
07:41 PM rue_shop3: 1 app/monitor isn't awesome
07:41 PM rue_shop3: anyhow, was that the issue?
07:43 PM MoonyMoon: nothing, same ol'
07:44 PM MoonyMoon: no i was on athother desktop with a movie.
07:44 PM rue_shop3: the code
07:44 PM MoonyMoon: but I havent sorted out my function yet
07:44 PM rue_shop3: was a buffer underrun the error
07:44 PM rue_shop3: ah
07:44 PM MoonyMoon: I'll get ther eventually
07:44 PM rue_shop3: want to write a new jukebox system togethor?
07:45 PM rue_shop3: if your focused we could work on it togethor
07:45 PM rue_shop3: I'm building a power supply for an eprom programmer right now tho
07:45 PM MoonyMoon: hmm.
07:45 PM MoonyMoon: I would like to. I have has an interest in that for years.
07:45 PM MoonyMoon: but
07:46 PM MoonyMoon: I want to get some real shit going with my BananaPhone project first.
07:46 PM rue_shop3: OH
07:46 PM rue_shop3: your trying to do the text transactions!
07:47 PM rue_shop3: yea, I wrote that all into my SSLS library
07:47 PM rue_shop3: "super simple linux serial"
07:47 PM rue_shop3: linux serial being a NIGHTMARE of WTF IS THIS!?
07:49 PM MoonyMoon: HA.
07:49 PM MoonyMoon: meditation break***
07:59 PM rue_shop3: I'd like to redo the jukebox in php as a single page without frames
08:52 PM MoonyMoon: GAAAAAAAAAAAAA!
08:52 PM MoonyMoon: fixed it!
08:53 PM MoonyMoon: void readInBuff(uint8_t* p) {
08:53 PM MoonyMoon: while( (read(fd, p++, 1)) == 1 ) {
08:53 PM MoonyMoon:
08:53 PM MoonyMoon: if ( *(p-1) == '\n' ) { //off by one gave me the forever hang. :|
08:53 PM MoonyMoon:
08:53 PM MoonyMoon: *(p-2) = 0x00; //had to push this back by one logically ;D
08:53 PM MoonyMoon: break;
08:53 PM MoonyMoon: }
08:53 PM MoonyMoon: }
08:53 PM MoonyMoon: }
08:53 PM Tom_L: ]
10:01 PM rue_mohr: dude...
10:05 PM rue_mohr: so WHAT IS the function that reads up to EOF or \n
10:06 PM MoonyMoon: dunno, but mine does it fine now so whatever.
10:07 PM rue_mohr: I want to see if I can show you how it could look if you know about the other function
10:07 PM MoonyMoon: well.. good luck :D
10:07 PM rue_mohr: well I want to know the name of the function myself anyhow
10:07 PM MoonyMoon: want to hear another wierd thing?
10:08 PM rue_mohr: sure
10:11 PM MoonyMoon: ill tel you later actually ;) sleep time is now.
10:11 PM MoonyMoon: Gnight :)
10:12 PM rue_mohr: I one day hope to properly express how frustrating and pointless talking to you over irc is
10:12 PM rue_mohr: if I dont seem to be forthcomming with help, its cause I severly doubt helping will be worth the effort.
10:13 PM rue_mohr: heh, GPTchat isn't aware of line endings
10:14 PM rue_mohr: its closer tho
10:15 PM rue_mohr: while ((n = read(fd, line, sizeof line)) > 0) {
10:15 PM rue_mohr: // Find the first newline character in the buffer
10:15 PM rue_mohr: char *newline = strchr(line, '\n');
10:15 PM rue_mohr: if (newline != NULL) {
10:15 PM rue_mohr: // Truncate the buffer at the newline character
10:15 PM rue_mohr: *newline = '\0';
10:15 PM rue_mohr: }
10:17 PM rue_mohr: huh, maybe the function I'm looking for doesn't exist..
10:17 PM rue_mohr: I'd probably just use a FILE sturcture
10:20 PM rue_mohr: gets() reads a line from stdin into the buffer pointed to by s until either a terminating newline or EOF, which it replaces with a null byte ('\0').
10:21 PM rue_mohr: interesting
10:21 PM rue_mohr: gets is obsolete and depreciated because it was subject to buffer overruns
10:21 PM rue_mohr: but nothing repalced its functionality
10:23 PM rue_mohr: solutions get complex because they start to interfear with the
10:24 PM rue_mohr: damnit I need a good brick wall I can talk to with some freaking texture
10:31 PM rue_mohr: I think I'd make a BIG buffer, read in a huge chunk of the file, and ... this doesn't count anyhow, cause your reading from a serial port
10:31 PM rue_mohr: what was I doing before you asked for help and left?
10:31 PM rue_mohr: regulator for the eprom programmer