Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jazerus
May 24, 2011


HappyHippo posted:

First time I read this I thought it said it causes the car to crash

after toyota's firmware code i would believe that a car company could design a car that crashes due to url parsing

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!

HappyHippo posted:

First time I read this I thought it said it causes the car to crash

Might have if it was a Tesla issue.

Woodsy Owl
Oct 27, 2004

Athas posted:

Does anyone know if These People also put a space before the parens in function calls?

Heck no, what language spec permits you to put a space before the left parenthesis of a function call?

My only argument for a single space before the left parenthesis in a method declaration is slighty improved legibility.

It’s not like I’m advocating a tab before the left parenthesis of a method declaration. That would be psychotic.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
MonoDevelop like a decade ago ...

I think people do it because it resembles application in functional languages ... except it's not partial ...

Like here's a bit from F# docs:
code:
let rec fib n = if n < 2 then 1 else fib (n - 1) + fib (n - 2)

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

Woodsy Owl posted:

Heck no, what language spec permits you to put a space before the left parenthesis of a function call?

? C-like languages usually let you put whitespace anywhere between tokens. The only language I'm aware of where whitespace between an identifier and parenthesis could have syntactical significance is Prolog (and possibly only the pre-standard version).

And then there's Sinclair BASIC, which let you put space inside identifiers. :pervert:

RPATDO_LAMD
Mar 22, 2013

🐘🪠🍆

Woodsy Owl posted:

Heck no, what language spec permits you to put a space before the left parenthesis of a function call?

C allows you to put whitespace pretty much anywhere except the middle of a word.

code:
#include                                                  <stdio.h>
int
  main
    (
      void
        )
          {
            printf    
              (
                "H"
                  "e"
                    "l"
                      "l"
                        "o"
                          " "
                            "W"
                              "o"
                                "r"
                                  "l"
                                    "d"
                                      "!"
                                        )
                                          ;
                                            return
                                              0
                                                ;
                                                  }
                                                    ;

RPATDO_LAMD fucked around with this message at 09:26 on Apr 27, 2019

feedmegin
Jul 30, 2008

Zopotantor posted:

And then there's Sinclair BASIC, which let you put space inside identifiers. :pervert:

Old FORTRAN too iirc, it was a Thing back in the day.

Athas
Aug 6, 2007

fuck that joker

feedmegin posted:

Old FORTRAN too iirc, it was a Thing back in the day.

Wasn't FORTRAN the other way around, in that you could elide spaces and it would still tokenise? E.g 'ifxtheny' would parse as 'if x then y' (except that FORTRAN did not have 'if' statements as such, so this concrete example is not correct).

iospace
Jan 19, 2038


RPATDO_LAMD posted:

C allows you to put whitespace pretty much anywhere except the middle of a word.

code:
#include                                                  <stdio.h>
int
  main
    (
      void
        )
          {
            printf    
              (
                "H"
                  "e"
                    "l"
                      "l"
                        "o"
                          " "
                            "W"
                              "o"
                                "r"
                                  "l"
                                    "d"
                                      "!"
                                        )
                                          ;
                                            return
                                              0
                                                ;
                                                  }
                                                    ;


We have such sights to show you: https://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest

Soricidus
Oct 21, 2010
freedom-hating statist shill

Athas posted:

Wasn't FORTRAN the other way around, in that you could elide spaces and it would still tokenise? E.g 'ifxtheny' would parse as 'if x then y' (except that FORTRAN did not have 'if' statements as such, so this concrete example is not correct).

i believe original fortran had both behaviors: you could put spaces in identifiers and omit spaces between tokens. it just ignored spaces completely.

some basic implementations used to allow eliding spaces as you describe; i still have FORT=1TO100:NEXTT in my muscle memory for a delay loop. i don't remember being able to put spaces inside identifiers, but then i never used more than a single letter for an identifer anyway ...

ultrafilter
Aug 23, 2007

It's okay if you have any questions.



At one point, there was an obfuscated Perl contest.

iospace
Jan 19, 2038


ultrafilter posted:

At one point, there was an obfuscated Perl contest.

So normal Perl code?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Yeah, I couldn't help but be reminded of this the first time I saw that.

RPATDO_LAMD
Mar 22, 2013

🐘🪠🍆
When passed through OCR software, 93% of Paint Splatters are Valid Perl Programs

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

I was disappointed because when it shows the paint splatters, if the text generated from them is not valid, it just shows the text "not valid" - I'd be cool to show the actual text that wasn't considered valid perl alongside it, just so you can have examples of text that ISN'T a perl program.

Soricidus
Oct 21, 2010
freedom-hating statist shill

which becomes somewhat less impressive when you actually look at why those programs are “valid”; in practically every case it’s as simple as “ocr program emits an extremely short sequence of Latin letters and numbers, and it turns out a single identifier is a valid program”.

there were one or two that almost look like they might be interesting until you notice that there’s a # early on in the output so yeah that’s a valid perl comment, big whoop

I will defend perl’s honor. I am the white knight perl needs in 2019

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

Soricidus posted:

i believe original fortran had both behaviors: you could put spaces in identifiers and omit spaces between tokens. it just ignored spaces completely.

Yup.

quote:

While FORTRAN is very picky about the placement of certain program elements on a card, it is
supremely disinterested otherwise. For example, the keyword PROGRAM, which begins a FORTRAN
program, may be typed,

PROGRAM
PRO GRAM
PR OG RAM

or even,

P R O G R A M

This is partly due to the difficulty in repairing a typographical error when using a keypunch
machine. Likewise, whitespace is not required between syntactic objects in a program. In other
words the FORTRAN executable statement,

DO 30 I = 10, 100

can also be written,

DO30I=10,100

Such forms can lead to serious errors. Imagine, for example, what would have occurred if the
programmer accidentally punched a decimal point instead of a comma in the compressed example
above.

Karate Bastard
Jul 31, 2007

Soiled Meat

Bruegels Fuckbooks posted:

I was disappointed because when it shows the paint splatters, if the text generated from them is not valid, it just shows the text "not valid" - I'd be cool to show the actual text that wasn't considered valid perl alongside it, just so you can have examples of text that ISN'T a perl program.

Haha buddy the images are like right there buddy just ocr them buddy smdh

Soricidus
Oct 21, 2010
freedom-hating statist shill

Bruegels Fuckbooks posted:

I was disappointed because when it shows the paint splatters, if the text generated from them is not valid, it just shows the text "not valid" - I'd be cool to show the actual text that wasn't considered valid perl alongside it, just so you can have examples of text that ISN'T a perl program.

here's an example of text that isn't a perl program:
code:
.
there that didn't take long, it was literally the first thing i tried

Soricidus
Oct 21, 2010
freedom-hating statist shill
for an actual coding horror: a custom wireshark dissector that does http requests

not a dissector for http requests, it actually makes them, creating new network traffic in the process of analysing old network traffic

this is the logical outcome of implementing everything as rest apis. this is the future

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
like wha? :psyduck:

Is it not something that can be done with bpf and tshark -T ek or json??? Does it just log some packets or is there something else going on?

Soricidus
Oct 21, 2010
freedom-hating statist shill
it's used to debug an app's network traffic, and it makes additional requests to the app's servers to add more information to the output

also it does it by calling io.popen on a curl process because they couldn't get an actual http library to work, but that's really just incidental at this point

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Oracle

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.




You mean http://bad.solutions?

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

this redirect is my greatest legacy and service to the world

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



uncurable mlady posted:

this redirect is my greatest legacy and service to the world

Thank you for your service. May it shine eternal

e: oof they want $130/yr for no.solutions - that'd be a spendy joke

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

HappyHippo posted:

First time I read this I thought it said it causes the car to crash
You read it right. While they didn't bother digging into the remote code execution printf %n lets you write arbitrary values into memory so it's a great setup for ROP chaining or just a standard buffer overflow. All car stereos entertainment units are attached to the CAN bus for remote volume controls so it's just a hop skip and a jump from track title to slamming the accelerator on full and swerving hard right.

Why don't entertainment systems use read-only CAN modules? Because gently caress you.

zergstain
Dec 15, 2005

Harik posted:

You read it right. While they didn't bother digging into the remote code execution printf %n lets you write arbitrary values into memory so it's a great setup for ROP chaining or just a standard buffer overflow. All car stereos entertainment units are attached to the CAN bus for remote volume controls so it's just a hop skip and a jump from track title to slamming the accelerator on full and swerving hard right.

Why don't entertainment systems use read-only CAN modules? Because gently caress you.

You’re saying it’s physically possible for the entertainment system to override the throttle? I just watched a couple of YouTube videos on CAN. Wouldn’t the entertainment system being a low priority solve that problem?

And steering has no business being under computer control on a car without self-driving capability.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Lanekeeping and automatic parallel parking are nowhere near "self-driving", but are useful features nevertheless.

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

zergstain posted:

You’re saying it’s physically possible for the entertainment system to override the throttle? I just watched a couple of YouTube videos on CAN. Wouldn’t the entertainment system being a low priority solve that problem?

And steering has no business being under computer control on a car without self-driving capability.

It could be possible, although likely that car is not set up in such a way that you can successfully exploit the entertainment system for spurious brake/steering controls.

Absurd Alhazred
Mar 27, 2010

by Athanatos
They might have left the capability there for future implementations.

ErIog
Jul 11, 2001

:nsacloud:

Harik posted:

Why don't entertainment systems use read-only CAN modules? Because gently caress you.

That would be more of a CAN'T bus.

zergstain
Dec 15, 2005

Jabor posted:

Lanekeeping and automatic parallel parking are nowhere near "self-driving", but are useful features nevertheless.

Does the Mazda in question have those features? Typically you keep your hands on the wheel when in motion. If the lanekeeping system detects the car is moving out of the lane, does it physically wrench the wheel from your grip?

Absurd Alhazred
Mar 27, 2010

by Athanatos
I drove a Mazda with some driver-assist features along with a MobilEye and let me tell you, I feel like in the long run this would get me in more accidents than save me. I will rue the day US insurers make those mandatory.

Ola
Jul 19, 2004

zergstain posted:


And steering has no business being under computer control on a car without self-driving capability.

Electric power steering is basically a computer adding steering torque when it detects steering input.

VW came out with this in the late 2000s and actually had a form of self driving as well, automatic steering during parallel parking, with manual throttle.

Nth Doctor
Sep 7, 2010

Darkrai used Dream Eater!
It's super effective!


Harik posted:

You read it right. While they didn't bother digging into the remote code execution printf %n lets you write arbitrary values into memory so it's a great setup for ROP chaining or just a standard buffer overflow. All car stereos entertainment units are attached to the CAN bus for remote volume controls so it's just a hop skip and a jump from track title to slamming the accelerator on full and swerving hard right.

Why don't entertainment systems use read-only CAN modules? Because gently caress you.

I gasped when I heard them say their first experiment after learning about the printf call was to use the one that loads a pointer. At the time I couldn't think of a worse idea than jumping around to random memory addresses with that bug.

zergstain
Dec 15, 2005

Ola posted:

Electric power steering is basically a computer adding steering torque when it detects steering input.

VW came out with this in the late 2000s and actually had a form of self driving as well, automatic steering during parallel parking, with manual throttle.

I think I’d prefer hydraulic power steering.

I’d forgotten about automatic parallel parking when I made my first post, but now I do remember hearing about cars with that. Automatic lanekeeping is new to me though.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Absurd Alhazred posted:

I drove a Mazda with some driver-assist features along with a MobilEye and let me tell you, I feel like in the long run this would get me in more accidents than save me. I will rue the day US insurers make those mandatory.

Historically "automatic" safety devices + cars don't mix.

In the 90's they passed a law that was supposed to make airbags mandatory, but there was an exemption to this if the car had "alternate safety devices", and that's how we ended up with all those lovely "automatic" seat-belts back then (notice how no new cars have automatic seatbelts!)

Similarly, there is a safety device in my jeep that is supposed to cut the engine when the car rolls over. Unfortunately, the criteria for this device activating is if the device "detects gasoline" - which can happen if you know, fill the car up with gas and there's a slight leak in the evap system (which is a known defect in my model of Jeep). This has led to my Jeep cutting the engine in the middle of traffic no fewer than three loving times.

I find it difficult to believe that automobile technology progresses from "seat belt with a fifty page user manual" in the 90's to "car shuts itself off because it thinks it's flipped over when it really only has a full tank of gas" in 2018 to "car drives itself with no problems at all" in 202X.

Ola
Jul 19, 2004

zergstain posted:

I think I’d prefer hydraulic power steering.

I’d forgotten about automatic parallel parking when I made my first post, but now I do remember hearing about cars with that. Automatic lanekeeping is new to me though.

It's actually electro-hydraulic, with hydraulic pressure made by an electric motor instead of an engine accessory belt. No idea about CANBUS security though, wouldn't surprise me if the planets could align and adjusting the volume sent you into a ditch.

Adbot
ADBOT LOVES YOU

Absurd Alhazred
Mar 27, 2010

by Athanatos

Bruegels Fuckbooks posted:

Historically "automatic" safety devices + cars don't mix.

In the 90's they passed a law that was supposed to make airbags mandatory, but there was an exemption to this if the car had "alternate safety devices", and that's how we ended up with all those lovely "automatic" seat-belts back then (notice how no new cars have automatic seatbelts!)

Similarly, there is a safety device in my jeep that is supposed to cut the engine when the car rolls over. Unfortunately, the criteria for this device activating is if the device "detects gasoline" - which can happen if you know, fill the car up with gas and there's a slight leak in the evap system (which is a known defect in my model of Jeep). This has led to my Jeep cutting the engine in the middle of traffic no fewer than three loving times.

I find it difficult to believe that automobile technology progresses from "seat belt with a fifty page user manual" in the 90's to "car shuts itself off because it thinks it's flipped over when it really only has a full tank of gas" in 2018 to "car drives itself with no problems at all" in 202X.

Mostly it beeps at you for things like "you are at 11 above the speed limit instead of 10" but only for the first few seconds, so that it actively discourages you from maintaining around that speed; either remain above or below, absolutely counter-productive, and "there is a car in front of you that has braked", which is great, except that I am looking forward so I saw that car and was reacting to it by slowing down, so I assumed something else had gone wrong, so I came to an abrupt halt. Or "there is a car in your blind spot", which admittedly could be useful.

I think one of the systems will actually brake for you if you get too close to a car within city limits or something.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply