LibreMonk

joined 1 year ago
MODERATOR OF
[–] LibreMonk@linkage.ds8.zone 1 points 1 month ago

A smart attack would be coupled with a clear message. Have the malware clobber them with anti-evil messages and just like that you have a sound free speech defense.

[–] LibreMonk@linkage.ds8.zone 1 points 1 month ago

Consider florida, where if you are caught with shrooms that are wet, freshly picked, they cannot convict you for carrying contraband because you do not necessarily know what you picked.

Laws are often based on intent. In some cases, penalties vary depending on intent. It would be an unacceptably brutally harsh law to judge someone under a presumption of harmful intent for something they might have no awareness of.

QR codes can have icons on them. Certainly if I created such a t-shirt, I would put some cool looking icon in the center of it. Someone being dragged through the system might argue “i did not know that qr code was real.. i just liked the cat in the middle of it”.

[–] LibreMonk@linkage.ds8.zone 0 points 1 month ago

“Malice” implies intent. Accidents are not malicious. Neglect in the worst case. So certainly any charges could not be based on malice.

[–] LibreMonk@linkage.ds8.zone 1 points 1 month ago

Not sure but I think QR codes that hold wi-fi creds would more likely be automatically processed by phones. Seems like an adequate attack surface. Maybe dodgy creds could overflow or do some kind of DB attack. Or even legit creds could lead someone to connect to a malicious hot-spot captive portal that the attacker carries.

[–] LibreMonk@linkage.ds8.zone 3 points 2 months ago* (last edited 2 months ago)

It depends on which license you look at. E.g. from https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt:

c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.

It was a while since I looked at this but IIRC the BY license was fine in its early versions but none of the others were. Then I vaguely recall seeing links in later versions of the BY license as well (but that may have been hasty reading on my part since i'm not seeing it in the BY 4.0 ATM). Anyway, it’s a mess.

 

I do not have unlimited Internet at home and sometimes need to fetch something big like a linux ISO image. I can walk into a library or cafe with an Android phone, but my old phone is pegged on internal storage and SD card space.

In principle, I should be able to use an OTG adapter to attach a USB drive to the phone, correct? From there, I have a couple questions:

  • is root access needed to mount the USB drive to a mount point of some kind on AOS 5?
  • can any FOSS torrent clients be configured to use an arbitrary mount point?
[–] LibreMonk@linkage.ds8.zone 2 points 2 months ago* (last edited 2 months ago) (1 children)

That doesn’t really work. The URL is an inherent part of the CC license. Archive.org might do link replacement but that does not change the license.. it merely corrupts/misrepresents the license. Users of CC-licensed work are still bound by the actual text of the license. IIRC the URL was to refer to something that changes over time, thus making the license dynamic when archive.org works off of snapshots.

[–] LibreMonk@linkage.ds8.zone 3 points 2 months ago

I vaguely recall Richard Stallman bad-mouthing public domain in favor of free licensing. I don’t recall the details but I imagine the artist would at least want attribution, which I doubt the public domain ensures.

Of course if we could have predicted his death there are many trivial ways we could have ensured his will is expressed and executed. But it may not be a lost cause.. whoever controls the estate would likely know or believe that he wanted to liberate his work.

 

A rock star (who shall remain unnamed) told me he wanted to give away his latest work to the public domain. I helped him get the work in open non-proprietary formats.

I told him in principle that Creative Commons licensing would be what he is after, but that it has problems. Creative Commons license text contains links to the creative commons website which then hooks in more licensing terms. There is nothing wrong with the terms but the CC website is jailed in Cloudflare’s walled garden and the URL is part of the licensing text.

I told the artist he would be liberating his work but at the same time he would be technically subjecting users to a bullying US tech giant who makes content arbitrarily exclusive by shutting out some demographics of people and also abusing the privacy of those who are privileged to obtain access to the license text.

I suggested modifying the CC license to remove the CC URL and exclude Cloudflare from being a license gatekeeper, noting of course the big pitfall: if the work is not exactly CC, then it cannot use the CC name, thus the work cannot simply be treated as such by platforms which depend on the easy cookie-cutter CC license. The work cannot simply be copied to a platform that is designed for CC works.

But by rebelling he could perhaps make a splash by casting a spotlight on suppression by Cloudflare. The burden/encumberance of his unique license would trigger a discussion that might get Creative Commons to gain some wisdom and nix the hypocrisy of Cloudflare-dependent licensing.

The artist is a rebel at heart and so he agreed. But I did not act fast. Then he died unexpectedly. All of our discussions were verbal, so his will in this regard is undocumented and thus non-existent from a legal standpoint. I think this means the naturally copyrighted work in question is forever all rights reserved and cannot be liberated, correct?

Or is it a matter of tracking down who in his will inherits the rights to the works in his estate and seeing if they concur with a liberated release?

[–] LibreMonk@linkage.ds8.zone 1 points 5 months ago* (last edited 5 months ago)

One annoying limitation is that the last page and a penultimate page cannot have different behavior in the picturecommand option. I thought I was fucked for ½ a day. But hacked around that by using the pagecommand and nesting \ifthenelse{\AM@page = (penultimate page №)}{\begin{picture}(0,0)\put(50,-50){…}… inside the pagecommand. Makes me wonder what’s the point of having the picturecommand. There is a picturecommand* which only executes on the 1st page, and apparently no equivalent for pagecommand -- but we can test the internal variable anyway.

 

Suppose you feed a multi-page PDF into \includepdf. If you only want pagecommand or picturecommand to take effect on some pages, you normally must split the construct up into multiple invocations. E.g.

\includepdf[pages=1], pagecommand={\doStuffOnPageOne}]{file.pdf}
\includepdf[pages=2-], pagecommand={\doStuffOnPagesAfterOne}]{file.pdf}

It gets ugly fast when there are some commands you want performed on every page, and some on select pages, because then you must write and maintain redundant code.

Fuck that. So here’s a demonstration of how to write code inside pagecommand and picturecommand that is page-specific:

\documentclass{article}

% Demonstrates use of the pdfpages package with page-by-page actions that are specific to select pages.

\usepackage{mwe}        % furnishes example-image-a4-numbered.pdf
\usepackage{pdfpages}
\usepackage{pdfcomment}
\usepackage{ocgx2}      % furnishes the ocg environment (PDF layers, but not really needed for this demo)
\usepackage{fancybox}   % furnishes oval box
\usepackage{fontawesome} % furnishes \faWarning

\begin{document}

\makeatletter
\includepdf[pages=1-,pagecommand={%
  % \makeatletter ← ⚠ does not work in this scope; must wrap the whole includepdf construct
  \pdfcomment[icon=Note, hoffset=0.5\textwidth, voffset=5em]{%
    (inside pagecommand, executing on every page)\textLF\textLF
    \texttt{\textbackslash AM@page} variable: \AM@page\textLF\textLF
    Side-note: the voffset option has no effect when the value is positive (5em in this case)% 
  }%
  \ifthenelse{\AM@page = 1 \OR \AM@page = 2 \OR \AM@page = 12}{%
    \pdfcomment[icon=Insert, hoffset=0.5\textwidth, voffset=-6em]{%
      (inside pagecommand, affecting only pages 1, 2, and 12)\textLF\textLF
      \texttt{\textbackslash AM@page} variable: \AM@page\textLF\textLF
      Strangely, the voffset option only works if it is negative.% 
    }%
  }{}
  % \makeatother
}, picturecommand={%
  \put(50,715){Inside the picture environment:}
  \put(50,700){%
    \begin{tabular}[t]{llp{0.6\textwidth}}
      internal \texttt{\textbackslash @tempcnta}    variable (useless):     &\the\@tempcnta&\\
      internal \texttt{\textbackslash @tempcntb}    variable (useless):     &\the\@tempcntb&\\
      internal \texttt{\textbackslash AM@pagecnt}   variable (useless):     &\the\AM@pagecnt&\\
      internal \texttt{\textbackslash AM@abs@page}  variable (useless):     &\AM@abs@page&\\
      internal \texttt{\textbackslash AM@page}      variable (interesting): &\AM@page & \faWarning Inside picturecommand, this number is 1 higher than the actual page number! But it’s correct inside pagecommand (see the annotation note to check).\\
      internal \texttt{\textbackslash AM@pagecount} variable (interesting): &\AM@pagecount&\\%
    \end{tabular}
    % lastpage: \AM@lastpage% broken
    \ifAM@firstpage
    We might expect this to trigger on the 1st page, but it never does. Likely because the page counter is incremented before picturecommand is invoked. It would perhaps work in the pagecommand construct.
    \fi
  }
  \put(500,770){% The ocg environment is irrelevant and unnecessary.. just here to demo PDF layers.
    \begin{ocg}{section labels}{sl1}{on}\color{blue}
      \Large\rotatebox{-45}{\setlength{\fboxsep}{6pt}\Ovalbox{Section~A}}
    \end{ocg}}}]%
{example-image-a4-numbered.pdf}
\makeatother
\end{document}
 

It would sometimes be useful to write conditional code that depends on boolean values defined in a parent package. E.g. the \pdfcomment package has the boolean “final”, which disables all PDF annotations in the document (\usepackage[final]{pdfcomment}). There is some other logic in my document that should also be disabled when that boolean is true. I tried simply using:

\ifpc@gopt@final\else%
…code that should not run when final is true…
\fi

pdflatex gives: “Undefined control sequence”

More generally, many draft options are often useful for controlling logic within the document for which a parent uses a draft option. Also when defining a custom letterhead in the scrlttr2 class there are booleans for many items that may or may not be wanted in the letterhead.

Has anyone managed to read a parent boolean?

(update) This thread gives useful options for many situations. But it does not completely answer the question because there are non-draft related booleans.

SOLVED

The \ifpc@gopt@final is reachable but only inside a \makeatletter stanza. Thus:

\makeatletter
\ifpc@gopt@final\else%
…code that should not run when final is true…
\fi
\makeatother
[–] LibreMonk@linkage.ds8.zone 1 points 5 months ago* (last edited 5 months ago)

Someone tells me “look into \scantokens instead of rewriting to a file”. After a brief look, I have to say: No. Fucking. Way. That looks like a rabbit hole that leads to the center of the planet. No thanks.. I don’t need to spend weeks more on this digging through (what looks like) the most raw low-level code that makes assembly languages look like tinker toys.

Low level TeX code really seems like a strange beast. Something you should learn in your early teens while the brain is still highly plastic. I wish I learnt it because I would better understand all the bizarre and obscure glitches I run into with LaTeX. But I think I might be past the point where benefit outweighs the pain.

 

Some might find it useful to import a text file and put the contents into a PDF annotation. E.g. a PDF is in language A and you want to make a translation available in language B, in a PDF annotation.

Here’s how:

\documentclass{article}

\usepackage{mwe}
\usepackage{pdfpages}
\usepackage{pdfcomment}
\usepackage{newfile}
\usepackage{xstring}
\usepackage{catchfile}

% heredoc holding text that normally breaks the \pdfcomment command:
\begin{filecontents*}{\jobname_sample.txt}
line one

line two
tricky symbols: _&%
\end{filecontents*}

% normally the above file is whatever you supply to be imported into the PDF annotation. The heredoc is just to provide a self-contained sample.

% Create \pdfcommentfile, which is a version of \pdfcomment that can read from a file:
\makeatletter
\gdef\pdfcommentfile#1{%
  \begingroup
  \everyeof{\noexpand}%
  \long\edef\temp{\noexpand\pdfcomment{\@@input{#1}}}%
  \temp
  \endgroup
}%
\makeatother

\CatchFileDef{\cfile}{\jobname_sample.txt}{} % side-effects: replaces blank lines with “\par” and drops percent symbols

% Replace blank lines with \textLF and replace special symbols with those that are safe for \pdfcomment. Warning: this is probably not a complete list of all constructs that break \pdfcomment!
\StrSubstitute{\cfile}{\par}{\string\noexpand\string\textLF\ }[\pdfannotationtxt] % the hard space is after textLF is a bit unfortunate; not sure how to do a normal space there
\StrSubstitute{\pdfannotationtxt}{\%}{\string\noexpand\string\%}[\pdfannotationtxt]
\StrSubstitute{\pdfannotationtxt}{_}{\string\noexpand\string\_}[\pdfannotationtxt]
\StrSubstitute{\pdfannotationtxt}{&}{\string\noexpand\string\&}[\pdfannotationtxt]

% the \pdfcomment command cannot directly handle the above substitutions (nor can it handle the original unsubstituted version). So we write the new version to another file:

\newoutputstream{filteredresult}
\openoutputfile{\jobname_filtered.txt}{filteredresult}
\addtostream{filteredresult}{\pdfannotationtxt}
\closeoutputstream{filteredresult}

\begin{document}
\pdfcommentfile{\jobname_filtered.txt}
\includepdf{example-image-a.pdf}
\end{document}

There should be a way to substitute the special characters and blank lines then feed it directly to \pdfcomment, but I’ve exhausted that effort. I’ve been in this LaTeX rabbit hole for days now trying to do something that should be simple. So this is as far as I go. The code above works but it’s ugly as fuck that we have to write the filtered text to file then read the file back in. The file i/o slows down compilation much more than what I consider reasonable.

 

cross-posted from: https://linkage.ds8.zone/post/363360

I am trying to do some simple character replacements on an input file and writing it to a file. The output produced by \StrSubstitute is quite bizarre. Here is a MWE:

\documentclass{article}

\usepackage{newfile}      % furnishes \newoutputstream
\usepackage{catchfile}    % furnishes \CatchFileDef
\usepackage{xstring}      % furnishes \StrSubstitute
\usepackage{stringstrings}% furnishes \convertword (a \StrSubstitute alternative)

% heredoc that creates source input file
\begin{filecontents*}{\jobname_sample.txt}
line one

line two
tricky symbols: _&%
\end{filecontents*}

\CatchFileDef{\cfile}{\jobname_sample.txt}{}

\begin{document}

% Replacements needed:
%   & → \&
%   % → \%
%   _ → \_
%   \newline\newline → \textLF (replace blank lines)
%
\StrSubstitute{\cfile}{&}{\&}[\mystring]
\StrSubstitute{\mystring}{\%}{\%}[\mystring]
\StrSubstitute{\mystring}{_}{\_}[\mystring]
\StrSubstitute{\mystring}{\newline\newline}{\\textLF}[\mystring]

\newwrite\myoutput
\immediate\openout\myoutput=\jobname_filtered_native.txt
\immediate\write\myoutput{\mystring}
\immediate\closeout\myoutput

\newoutputstream{filtered}
\openoutputfile{\jobname_filtered_newfile.txt}{filtered}
\addtostream{filtered}{\mystring}
\closeoutputstream{filtered}

\noindent\textbf{filtered catchfile}:\\
\mystring

\noindent\textbf{filtered catchfile (2nd attempt)}:\\
\convertword{\mystring}{\newline\newline}{\noexpand\textLF}
 
\end{document}

That uses two different techniques to write to a file, and both give slightly different yet wildly unexpected output:

$ cat sample_code_filtered_native.txt
line one \par line two tricky symbols: \protect \global \let \OT1\textunderscore \unhbox \voidb@x \kern .06em\vbox {\hrule width.3em}\OT1\textunderscore \&
$ cat sample_code_filtered_newfile.txt
line one \par line two tricky symbols: \global\let \OT1\textunderscore \unhbox \voidb@x \kern .06em\vbox {\hrule width.3em}\OT1\textunderscore \&

What triggered all that garbage to be created? This is what the output [b]should[/b] be:

line one\textLF
line two
tricky symbols: _&%

I also tried a 3rd way to write \mystring to a file, as follows:

\begin{filecontents*}{\jobname_myvar.txt}
  \mystring
\end{filecontents*}

That approach literally writes the string “\mystring” to a file, which is useless in this case.

(update) apparently a \string needs to prefix the substituted strings.

[–] LibreMonk@linkage.ds8.zone 2 points 6 months ago

Thanks for the tip. It seems to work but I have to say it’s a rough UX because the UI is really meant for a graphical browser. I could not even paste my UID and PW in to login.

[–] LibreMonk@linkage.ds8.zone 2 points 6 months ago

For the same reason, I suppose you would love text adventure games like Hitchhiker’s Guide to the Galaxy, where you have to come up with your action, as opposed to getting visual aids which come like a loaded question, steering you and somewhat robbing you of control.

[–] LibreMonk@linkage.ds8.zone 2 points 6 months ago* (last edited 6 months ago) (2 children)

indeed.. #NeonModemOverdrive failed for me too.

So, how did you do post to lemmy.ml? Did you use cURL? If so, I would love to see the sample code.

 

Suppose you resist a bank that forces you to access your account exclusively via some shitty phone app, which also requires you to buy a new smartphone. And suppose you refuse, so your only access to the bank account is via the card.

What happens when the time comes that (e.g.) the gov or a creditor demands a payment by credit transfer, not by card? Are you consequently forced by your obligation to make a payment to then buy a phone? Or do you have a right to manually order a payment from your bank by sending a written letter or something?

There is this law but I’m not sure it’s applicable:

REGULATION (EU) No 260/2012, Art.4: Interoperability

3. The processing of credit transfers and direct debits shall not be hindered by technical obstacles.

I think that law was really intended for the bank-to-bank segment of the transaction, not consumer to bank. I get the impression we have no codefied rights, just recommendations to lawmakers, such as:

The European Commission, in its 2012 Green Paper, insisted that standardisation in the mobile payments area should ensure full interoperability between mobile payment solutions, and favour open standards to ensure the mobility of consumers when they wish to change their telecom operator or bank.

In its Mobile Payments Initiatives Overview, the European Payments Council stated that different mobile payment solutions from multiple payment service providers should be able to coexist in the same mobile device. In its opinion, consumers should not be bound to a specific network operator or particular mobile equipment, but should be able to switch between payment service providers, with interoperability as a key feature needed to achieve these goals.

But to be fair that was written 10 years ago. Any headway?

 

The linked article leads to EC recommendations on mobile payment systems. This bit is interesting:

8.1 KC MPSPs should distribute the payment-related software and authentication tools, including personalised security credentials, installed in the mobile device via a secure “distribution channel” (e.g. software preloading managed by qualified vendors following auditable procedures; off-line Recommendations for the security of mobile payments / software loading at authorised agents or local branches; or on-line downloading from trusted entities using security procedures¹⁸).

footnotes:

18: Examples of on-line software downloading:

  • the user interface “app” (UI_App) is downloadable from a trusted “market store” with clear security policies and sound security measures (e.g. Apps Public Store requiring security evaluation and digital signature of “apps”);
  • the payment software application that is resident in the SE (SE_Applet) is downloadable inside the SE, using a secure channel between the central server and the SE itself (e.g. encrypted SMS messages, secure OTA services, internet banking services).

“Trusted entities” is where everything goes to shit. The banks blindly trust Google despite being scientifically proven to be relatively insecure. Even if Google had their own shit together, a surveillance advertiser cannot have the trust of anyone with a bit of street wisdom.

1
submitted 6 months ago* (last edited 6 months ago) by LibreMonk@linkage.ds8.zone to c/osm@feddit.uk
 

I somewhat urgently need a map, but for the past day or two there are no maps in #OSMand available for download. Can anyone confirm or deny this problem?

Is this related to the OSM outtage 6 days ago, which was supposedly resolved?

(edit) workaround -- download maps manually and side-load them. The maps are here:

https://osmand.net/list.php

Next question: how do you know which files cover a particular city if it’s not obvious from the filename?

 

cross-posted from: https://linkage.ds8.zone/post/341870

I signed an agreement with a creditor that obligates me to pay them using a bank inside the country. This was fine initially but then I moved out of the country and the acct was closed. Other banks will not open an account for me and the creditor refuses cash. So the creditor is treating me like a non-payer to a quite harsh extent.

I have over-simplified here but I just want to know very generally what the common practices are around the world for contract law situations where someone without much bargaining power signs a contract that obligates them to do something that’s only achievable if other 3rd-parties agree to serve them, and then those other 3rd-parties later refuse.

BTW, I am not interested in advice on situational hacks and angles like “find a friend to pay for you”. I want to know how courts treat the situation when all options have failed. Are people typically held accountable for agreeing to something which relied on actions of others?

(the situation is not in the Netherlands but I am still interested in answers as to how these kinds of situations are dealt with in the Netherlands)

/cc @law@a.gup.pe

 

cross-posted from: https://linkage.ds8.zone/post/341870

I signed an agreement with a creditor that obligates me to pay them using a bank inside the country. This was fine initially but then I moved out of the country and the acct was closed. Other banks will not open an account for me and the creditor refuses cash. So the creditor is treating me like a non-payer to a quite harsh extent.

I have over-simplified here but I just want to know very generally what the common practices are around the world for contract law situations where someone without much bargaining power signs a contract that obligates them to do something that’s only achievable if other 3rd-parties agree to serve them, and then those other 3rd-parties later refuse.

BTW, I am not interested in advice on situational hacks and angles like “find a friend to pay for you”. I want to know how courts treat the situation when all options have failed. Are people typically held accountable for agreeing to something which relied on actions of others?

(the situation is not in the UK but I am still interested in answers as to how these kinds of situations are dealt with in the UK)

 

cross-posted from: https://linkage.ds8.zone/post/341870

I signed an agreement with a creditor that obligates me to pay them using a bank inside the country. This was fine initially but then I moved out of the country and the acct was closed. Other banks will not open an account for me and the creditor refuses cash. So the creditor is treating me like a non-payer to a quite harsh extent.

I have over-simplified here but I just want to know very generally what the common practices are around the world for contract law situations where someone without much bargaining power signs a contract that obligates them to do something that’s only achievable if other 3rd-parties agree to serve them, and then those other 3rd-parties later refuse.

BTW, I am not interested in advice on situational hacks and angles like “find a friend to pay for you”. I want to know how courts treat the situation when all options have failed. Are people typically held accountable for agreeing to something which relied on actions of others?

(the situation is not in the US but I am still interested in answers as to how these kinds of situations are dealt with in the US; of course legal tender is a right the US gives to debtors, but I’m looking for more general legal concepts)

view more: next ›