Off-and-on trying out an account over at @tal@oleo.cafe due to scraping bots bogging down lemmy.today to the point of near-unusability.

  • 152 Posts
  • 3.41K Comments
Joined 2 年前
cake
Cake day: 2023年10月4日

help-circle
  • my ptrace_scope file has 0 set inside it, which i assume is the least restricted from what i’m understanding and shouldnt be causing the issue?

    Yeah, then that restriction isn’t the problem. Sorry; I guessed wrong.

    but just on an off chance i tried to run the echo command, and even with sudo it says i dont have permission. so I dont know whats up with that.

    It won’t help here, but for future reference, what you likely did is this:

    $ sudo echo 0 >/proc/blah/whatever
    

    sudo runs a command as root. The file redirection, however, is done by the current shell, which isn’t run as root, not by echo. So echo 0 is run as root, and then bash tries to open /proc/blah/whatever and doesn’t have permission to do so, and that’s what fails.

    If you need to do this in the future, you can do this:

    $ sudo -s
    # echo 0 >/proc/blah/whatever
    

    we currently have 14 matches

    It might be okay to hit that, as I don’t know if scanmem avoids trying to scan all regions that it can’t read. That does mean that it is able to ptrace() it and find some matches. Did you try to keep going with additional searches to see if it could actually find the value and change it?


  • Issue is, not only do do my emulators not recognize these buttons, but is seems Linux Mint doesn’t know they exist at all. Even bringing up a program to map buttons to keys doesn’t show any input when those buttons are pressed.

    Generally, USB HID permits lots of buttons to be reported. While I can’t say that it’s absolutely certain that 8bitdo requires some sort of proprietary protocol to expose the button events for some of those buttons, my bet is that they’re reporting them.

    I don’t know what program you’re using, but there are at least three APIs that I can think of that they might be using.

    • (Old) Linux joystick API. $ jstest /dev/input/js0 to see what’s going on there (assuming a single game controller on the system). In the joystick package on Debian. I have seen systems before that have this disabled to try to deal with programs that double-report button events for joysticks visible both under the joystick API and the libevent one.

    • (New) event API. $ evtest. All of your other stuff, like mice and keyboards, will also be visible here, and you’ll have to tell evtest which device you want to see events from. In the evtest package on Debian.

    • Steam has its own input API, Steam Input. Steam Input will internally be using one of the above, but it could be fiddling with things, like, not sending button events or something, and a lot of games on Linux under Steam will be using Steam Input.

    There are also other (thinner) libraries that will map one of the two kernel APIs to their own API, like SDL. Couldn’t advise what your emulator might be using without knowing what emulator you’re trying to use.

    I also have an old Logitech F710 around here somewhere that has a switch on it to cause the controller to report (on Windows) via (old Windows) DirectX or (old Windows) XInput. In the DirectX mode, it doesn’t report as much information. Probably not what you’re seeing, but thought I’d mention it as a possibility.


  • $ man 2 ptrace
    
    /proc/sys/kernel/yama/ptrace_scope
       On  systems  with  the  Yama  Linux  Security Module (LSM) installed (i.e., the kernel was configured with CONFIG_SECU‐
       RITY_YAMA), the /proc/sys/kernel/yama/ptrace_scope file (available since Linux 3.4) can be used to restrict the ability
       to trace a process with ptrace() (and thus also the ability to use tools such as strace(1) and gdb(1)).   The  goal  of
       such  restrictions  is  to prevent attack escalation whereby a compromised process can ptrace-attach to other sensitive
       processes (e.g., a GPG agent or an SSH session) owned by the user in order to gain additional credentials that may  ex‐
       ist in memory and thus expand the scope of the attack.
    
       More precisely, the Yama LSM limits two types of operations:
    
       •  Any operation that performs a ptrace access mode PTRACE_MODE_ATTACH check—for example, ptrace() PTRACE_ATTACH.  (See
          the "Ptrace access mode checking" discussion above.)
    
       •  ptrace() PTRACE_TRACEME.
    
       A process that has the CAP_SYS_PTRACE capability can update the /proc/sys/kernel/yama/ptrace_scope file with one of the
       following values:
    
       0 ("classic ptrace permissions")
              No  additional  restrictions  on  operations that perform PTRACE_MODE_ATTACH checks (beyond those imposed by the
              commoncap and other LSMs).
    
              The use of PTRACE_TRACEME is unchanged.
    
       1 ("restricted ptrace") [default value]
              When performing an operation that requires a PTRACE_MODE_ATTACH check, the calling process must either have  the
              CAP_SYS_PTRACE  capability in the user namespace of the target process or it must have a predefined relationship
              with the target process.  By default, the predefined relationship is that the target process must be  a  descen‐
              dant of the caller.
    
              A  target  process can employ the prctl(2) PR_SET_PTRACER operation to declare an additional PID that is allowed
              to perform  PTRACE_MODE_ATTACH  operations  on  the  target.   See  the  kernel  source  file  Documentation/ad‐
              min-guide/LSM/Yama.rst (or Documentation/security/Yama.txt before Linux 4.13) for further details.
    
              The use of PTRACE_TRACEME is unchanged.
    
       2 ("admin-only attach")
              Only  processes  with  the  CAP_SYS_PTRACE  capability  in  the user namespace of the target process may perform
              PTRACE_MODE_ATTACH operations or trace children that employ PTRACE_TRACEME.
    
       3 ("no attach")
              No process may perform PTRACE_MODE_ATTACH operations or trace children that employ PTRACE_TRACEME.
    
              Once this value has been written to the file, it cannot be changed.
    
    $ cat /proc/sys/kernel/yama/ptrace_scope
    0
    $
    

    If you don’t have 0 there, you might try, as root, echo 0 > /proc/sys/kernel/yama/ptrace_scope and see if everything starts magically working.

    If it does, to make said setting persist, you might want to add “kernel.yama.ptrace_scope=0” to /etc/sysctl.conf to apply that setting at boot.

    Also, probably won’t address your issue alone, but I use scanmem, a Linux CLI program, for memory-modifying cheating. If there’s some failure in trying to do its ptrace thing, it might display an error message in the console. If you want, rather than changing the systemwide ability to use ptrace, you could also just run scanmem as root (you could also do the same with GUI programs, but more hassle, and honestly, I’ve never gone to look up how to make that work under Wayland, just Xorg, where # xauth merge ~/.Xauthority will do it).

    EDIT: It looks like the Fedora guys were thinking about changing their default away from 0, and if the Nobara people just did so, that might be what’s triggering that.

    EDIT2: I thought that Debian did it too, since I remember smacking into that at one point, but I don’t see anything in my sysctl.conf, and I can still happily scanmem; it’s 0 on my system. Sounds like what happened was that they changed it to 1, decided that that was a bad idea, and then put it back to 0, so I probably tried using it during that window.

    EDIT3: Just to clarify, ptrace() is the system call that most processes use to access another process’s memory, and is probably what your memory-cheat program is using to try to look at (and modify) the memory of that other process.



  • That’s because, according to the rumours, the jailbreak method can only be done with a physical version of one particular game.

    The game in question is Star Wars Racer Revenge, which, before the rumours, was selling for around $50. Now, listings on eBay are as high as $500, meaning that the price has increased tenfold.

    At a certain point, if you want an open system, it’s gotta be cheaper and less hassle to just get a PC than trying to start with a closed system and pay $500 to try and set up a brittle jailbreak of it.

    EDIT: I guess maybe some of these people are trying to get control of their environment specifically to cheat specifically in competitive multiplayer games in a console environment, and I suppose that it wouldn’t be the same on a PC for them, or maybe to pirate console-exclusive games that can’t be emulated, but outside of those very specific niches…



  • Almost all video game genres are overwhelmingly dominated by closed-source, commercial software. FOSS generally isn’t competitive there.

    I’d give FOSS the upper hand in traditional roguelikes and playing card solitaire implementations, maybe. Maybe chess AIs. Purely-text interactive fiction of the stuff that one might find on The Interactive Fiction Archive isn’t mostly FOSS, but is frequently non-commercial.

    That’s a pretty small portion of what game stuff is out there.

    But, yeah, for most non-game stuff, I’d agree; I’d rather use the FOSS options.



  • And even aside from the “ton”/“tonne” difference, it used to be “tun”:

    https://www.etymonline.com/word/ton

    ton(n.1)

    [measure of weight or capacity], late 14c., “the quantity necessary to fill a tun or ask of wine;” the word is identical to tun (q.v.) “large barrel for wine, ale, or other liquid,” often one of definite capacity.

    The “weight-and-capacity” sense was (eventually) given its own spelling. The spelling with -o- became established 18c. (OED says “from c. 1688”); it is attested from 14c (tonne), and, though not phonetic, may have been retained partly because of the prevalence of Old French tonne, Medieval Latin tonna in legal forms and statutes in England.






  • high-carbon products like steel, aluminium, and cement

    considers

    I think that one problem with this is that stuff like steel and cement goes into capital goods, which means that it can make EU-produced stuff produced using those capital goods uncompetitive in other markets, which may not be desirable to Brussels.

    So, okay. Say EU producers of goods complain that competitors are producing goods more-cheaply than they can, because they are emitting a lot of carbon dioxide in doing so. The EU says “okay, we will impose a carbon tax to price in the cost of externalities”.

    Say that there’s a producer of, oh, sports cars. Okay, fine, so now EU and non-EU producers are on level footing in selling into the EU market. Also, if they are selling sports cars into an external market, then I assume that the EU isn’t assessing such a tax.

    But…not all goods are sports cars.

    https://www.worldstopexports.com/cement-exports-by-country/

    It looks like Egypt is a major cement exporter.

    Say a company is thinking about building a sports car factory. It might do it in Germany. Or it might do it in Egypt.

    In Egypt, that sports car factory can be built using inexpensive steel rebar and cement.

    In Germany, it can’t.

    The cement and steel isn’t directly an input to the sports car (well, some steel probably is used in the car, but setting that aside)…but it could affect the cost of producing that sports car, because it affects capital goods used in the production of that sports car.



  • In supermarkets, if you don’t have their app/loyalty card you have to pay higher prices. They frame it as a “discount” or “savings” for having the app, but clearly it’s just a punishment for not giving them your info and allowing them to track/advertise at you.

    Actually, I’m happy about that particular instance, since I don’t like being tracked, and grocery stores are one of the few businesses that generally provide the option to choose whether I want to sell my data. A number of companies don’t have the option to have a privacy-friendly option. If you want to do business with them, they’re gonna sell your data.

    Like, say Google had a “no log, no profile” premium option for YouTube — I’d probably get that, since there’s lots of interesting content on YouTube, and it’s hard to make an alternative… But the only option they provide is data-mining. You can buy your way out of the ads, but that’s all they have on offer.

    I’d rather just pay for the goods and services I buy with money, all traditional-like, rather than with my data and privacy.