

Try the nightly build:


Try the nightly build:
I would look at the tools that the preservation groups use for doing this. The optical media layouts are funky and IIRC using dd on the block device is not enough to archive a bit-for-bit copy. There are details about the track layout and so on that need to be recorded separately. This is why formats like BIN/CUE exist.


What exactly is the problem that you’re trying to solve?
Oh I see. If the URL puts the sensitive information after the anchor, like https://example.com/bsod#sensitive-info-goes-here then the browser would never send that part to the server. Everything after the anchor is just used locally by the browser to scroll the page to a specific place (or in this case for the javascript to read and process).
You’d need to check every time you scan a QR code though that the # is in the URL and it’s not malformed. Trivially replacing the # with a ? would turn the private URL into one that sends all the data in the GET request. It’s training users to do something risky.
Oh and it also assumes that the javascript hasn’t been tampered with to upload the data somewhere.
I don’t like it.
So it’s leaking information about your system to an external site?
That’s just what we need.
Yeah I mean to you it might be pretty simple lego :) but I’m sure lots of people would benefit from it. Even if not to use the same exact setup then to provide an example or starting point for DIY.
Are you planning on sharing the source?
The | and |= operators for dict were added in 3.9 which was released in 2020, so it’s a relatively recent feature.
I like having an operator for set union but I don’t like that a |= b has different semantics to a = a|b. This violates the principle of least surprise, since the former is supposed to be a shorthand for the latter.


I’ve only recently adopted AI, and only sparingly, mainly for debugging, tests and help with documentation.
I wonder who came up with the name and the logo 🤣


It’s worth learning nftables, it’s actually pretty cool.


This guy is unhinged, and if you’re going to recommend his channel then you should watch this first: https://www.youtube.com/watch?v=r2SG4T0wymk&t=1360s
Perhaps he’s not a great recommendation after all.
inline is a hint to the compiler and doesn’t guarantee that your function will be inlined, even when it’s declared as such in the same compilation unit.
You can read the GCC docs about the inline keyword: https://gcc.gnu.org/onlinedocs/gcc/Inline.html
However it is possible to inline functions across compilation units. This is called Link-Time Optimization (LTO) and you can enable this in GCC using -flto. You must pass this flag at both compile and link time. Using LTO, you don’t need to even declare the function as inline or define it in the same compilation unit. The compiler and linker can choose the optimization based on the function size and whatever optimization heuristics they use.
I tested this with a toy example:
$ cat main.cpp
#include <iostream>
#include "lib.hpp"
int main(int argc, char* argv[])
{
set_int(13);
int x = get_int();
std::cout << x << std::endl;
return 0;
}
$ cat lib.hpp
#ifndef __LIBHPP
#define __LIBHPP
void set_int(int x);
int get_int();
#endif
$ cat lib.cpp
#include "lib.hpp"
static int val = 0;
void set_int(int x)
{
val = x;
}
int get_int()
{
return val;
}
$ cat Makefile
CPPFILES=main.cpp lib.cpp
OBJFILES=${CPPFILES:.cpp=.a}
CFLAGS=-O3 -flto
LDFLAGS=-O1 -flto
all: main
.PHONY: clean
clean:
rm -f main ${OBJFILES}
main: ${OBJFILES}
g++ ${LDFLAGS} -o $@ $^
%.a: %.cpp
g++ ${CFLAGS} -o $@ -c $<
$ make clean && make
rm -f main main.a lib.a
g++ -O3 -flto -o main.a -c main.cpp
g++ -O3 -flto -o lib.a -c lib.cpp
g++ -O1 -flto -o main main.a lib.a
$ objdump -S main | grep -A 11 "<main>:"
0000000000000770 <main>:
770: 48 8d 3d a9 08 20 00 lea 0x2008a9(%rip),%rdi # 201020 <_ZSt4cout@@GLIBCXX_3.4>
777: 48 83 ec 08 sub $0x8,%rsp
77b: be 0d 00 00 00 mov $0xd,%esi
780: c7 05 aa 09 20 00 0d movl $0xd,0x2009aa(%rip) # 201134 <_ZL3val>
787: 00 00 00
78a: e8 91 ff ff ff callq 720 <_ZNSolsEi@plt>
78f: 48 89 c7 mov %rax,%rdi
792: e8 59 ff ff ff callq 6f0 <_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@plt>
797: 31 c0 xor %eax,%eax
799: 48 83 c4 08 add $0x8,%rsp
79d: c3 retq
The disassembly shows that there are no calls to set_int or get_int in main.
Compare this to the disassembly without optimization:
$ make clean && make
rm -f main main.a lib.a
g++ -o main.a -c main.cpp
g++ -o lib.a -c lib.cpp
g++ -o main main.a lib.a
$ objdump -S main | grep -A 21 "<main>:"
000000000000088a <main>:
88a: 55 push %rbp
88b: 48 89 e5 mov %rsp,%rbp
88e: 48 83 ec 20 sub $0x20,%rsp
892: 89 7d ec mov %edi,-0x14(%rbp)
895: 48 89 75 e0 mov %rsi,-0x20(%rbp)
899: bf 0d 00 00 00 mov $0xd,%edi
89e: e8 93 00 00 00 callq 936 <_Z7set_inti>
8a3: e8 a1 00 00 00 callq 949 <_Z7get_intv>
8a8: 89 45 fc mov %eax,-0x4(%rbp)
8ab: 8b 45 fc mov -0x4(%rbp),%eax
8ae: 89 c6 mov %eax,%esi
8b0: 48 8d 3d 69 07 20 00 lea 0x200769(%rip),%rdi # 201020 <_ZSt4cout@@GLIBCXX_3.4>
8b7: e8 a4 fe ff ff callq 760 <_ZNSolsEi@plt>
8bc: 48 89 c2 mov %rax,%rdx
8bf: 48 8b 05 0a 07 20 00 mov 0x20070a(%rip),%rax # 200fd0 <_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GLIBCXX_3.4>
8c6: 48 89 c6 mov %rax,%rsi
8c9: 48 89 d7 mov %rdx,%rdi
8cc: e8 6f fe ff ff callq 740 <_ZNSolsEPFRSoS_E@plt>
8d1: b8 00 00 00 00 mov $0x0,%eax
8d6: c9 leaveq
8d7: c3 retq
IIRC Tor Browser makes its own connections to Tor within the application, it doesn’t use the Tor daemon even if one is running.


As a regular user that’s fine, but if your script might be run as root then there’s a possibility that you delete the special file /dev/null which would cause a great deal of problems for your system and probably be hard to debug if you don’t realise it has happened. I’ve heard of people doing this before so I think it is possible although I’ve never tried it.
Edit: yeah I just saw your edit and I agree :)


rm -rf ${TEMPDIR:-"/invalid"}
This on the other hand I like a lot. Now I will not stop doing my other additional checks, but for good habit this can’t be wrong.
I believe this is considered to be best practise, but I included the other options just for the sake of completeness.
Happy to help.


Some solutions:
set -e
TEMPDIR=$(mktemp -d)
# script exits if mktemp returns error
or
TEMPDIR=$(mktemp -d || echo "/invalid")
# TEMPDIR gets the value "/invalid" if mktemp fails
or
TEMPDIR=$(mktemp -d)
TEMPDIR=${TEMPDIR:-"/invalid"}
# TEMPDIR gets the value "/invalid" if mktemp returns an empty value
or
TEMPDIR=$(mktemp -d)
rm -rf ${TEMPDIR:-"/invalid"}
# rm is passed "/invalid" if TEMPDIR is empty
My personal preference is the last one. Any time you call rm -rf you provide a default value to variables to ensure that if they are empty they get some other value instead.


Your post history:

I’m subscribed to all of these communities, so in my feed it appears as spam. Could you please stop?


GrapheneOS has ported its code to QPR1 before Google even released it, but still doesn’t have permission to ship that work.
Huh? What do they need permission for?
I had no idea that GrapheneOS was so dependent on Android as an upstream project.


Really interesting work, but I’m extremely sceptical that image attestation is a good idea. Think of the privacy implications of having a unique private key tied to your device and emitted in every photo that you take. On top of that are all of the anti-consumer practises that are already enabled by hardware attestation methods that prevent us from running our own software etc.
This is a very double-edged technology.
It also suffers the usual problem of these kinds of systems in that it only works for people who are already honest and not producing fake images. The people who really want to make fakes will find a way around the system either by exploiting their hardware somehow, or just by taking a photograph of the fake image with a secured camera.
The trade-off of privacy and device ownership for an illusion of trust doesn’t seem to be worth it, in my opinion.
Are girls allowed?