Dev and Maintainer of Lemmy Userdata Migration

  • 4 Posts
  • 17 Comments
Joined 2 months ago
cake
Cake day: April 20th, 2024

help-circle
  • We have to vote for the people who will admit to that and get rid of them. The U.S. is going to have to choose between a leader who tries to install good people to run the government and one who intends to install people bent on dismantling the government and giving loyalty to the leader alone.

    I largely share your thoughts. I honestly expected Biden to at least be prepared enough to counter the usual Trump tactics of making things up and using strong words to impress his base while deflecting blame or critical questions.

    Instead, we got Trump basically having free rein to appear strong with simple (and wrong) answers to complex questions, twisting the truth to support his positions and straight up lying and deflecting when finally confronted with something.

    I’m not a big fan of Biden, but IMO he’s the obvious, rational choice out of two candidates way past their prime - if you’re into rationality over the antics of a con artist.

    But this isn’t a fair fight, and Biden isn’t the showman Trump managed to be today. Biden was barely audible and mostly on the defensive while appearing weak, Trump was the opposite of that. I can’t imagine any Trump voter switching teams after the debate, but I can image more than a few more emotionally motivated democrats second guessing their choice.



  • An dieser Stelle reposte ich nochmal zwei einfache Wege, um seinen User (Settings und abonnierte/geblockte Communities) von einer Lemmy Instanz auf eine andere umzuziehen, beispielsweise von feddit.de auf feddit.org, von meinem ursprünglichen Post unter feddit.de/c/main ( https://alexandrite.app/feddit.de/post/11325409)


    Weg 1, falls man noch einen Browser mit aktiver Session auf feddit.de hat:

    Lemmy bietet seit Version 0.19 eine Funktion an, um die user data zu ex- und importieren. Das geht normalerweise über einen Button in den Settings des Webinterfaces, das geht aktuell bei feddit.de nicht.

    Aber der zugrundeliegende API-Aufruf funktioniert noch, solange man noch mit einem Browser auf feddit.de eingeloggt ist:

    1. Man gehe auf https://feddit.de/api/v3/user/export_settings und speichert die zurückgegebene Datei als irgendwas.json
    2. Man nehme einen (neuen) Account auf einer stabilen Instanz der Wahl, gehe auf /settings und lade irgendwas.json über den Import-Button hoch.
    3. Voilà, man genieße die neue Instanz.

    Das funktioniert mit jeder Instanz >=0.19, man muss lediglich das “feddit.de” in der URL ersetzen. Und wenn das Webinterface funktioniert, geht das auch über den Export- Button in den Settings.


    Weg 2:

    Für die Leute, die keine offene Browser Session haben, hier ein kleines, aber funktionales Bash Script, welches im Ausführungsverzeichnis eine myFedditUserData.json erstellt, welche bei anderen Instanzen importiert werden kann.

    Anforderungen:

    • Linux/Mac OS X /Windows mit WSL
    • jq installiert (Unter Ubuntu/Debian/Mint z.B. per sudo apt install -y jq

    Anleitung:

    • Folgendes Script unter einem beliebigen Namen mit .sh Endung abspeichern, z.B. getMyFedditUserData.sh
    • Script in beliebigen Textprogramm öffnen, Username/Mail und Passwort ausfüllen (optional Instanz ändern)
    • Terminal im Ordner des Scripts öffnen und chmod +x getMyFedditUserData.sh ausführen (Namen eventuell anpassen)
    • ./getMyFedditUserData.sh im Terminal eingeben
    • Nun liegt im Ordner neben dem Script eine frische myFedditUserData.json

    Anmerkung: Das Script ist recht simpel, es wird ein JWT Bearer Token angefragt und als Header bei dem GET Aufruf von https://feddit.de/api/v3/user/export_settings mitgegeben. Wer kein Linux/Mac OS X zur Verfügung hat, kann den Ablauf mit anderen Mitteln nachstellen.

    Das Script:

    #!/bin/bash
    
    # Basic login script for Lemmy API
    
    # CHANGE THESE VALUES
    my_instance="https://feddit.de"			# e.g. https://feddit.nl
    my_username=""			# e.g. freamon
    my_password=""			# e.g. hunter2
    
    ########################################################
    
    # Lemmy API version
    API="api/v3"
    
    ########################################################
    
    # Turn off history substitution (avoid errors with ! usage)
    set +H
    
    ########################################################
    
    # Login
    login() {
    	end_point="user/login"
    	json_data="{\"username_or_email\":\"$my_username\",\"password\":\"$my_password\"}"
    
    	url="$my_instance/$API/$end_point"
    
    	curl -H "Content-Type: application/json" -d "$json_data" "$url"
    }
    
    # Get userdata as JSON
    getUserData() {
    	end_point="user/export_settings"
    
    	url="$my_instance/$API/$end_point"
    
    	curl -H "Authorization: Bearer ${JWT}" "$url"
    }
    
    JWT=$(login | jq -r '.jwt')
    
    printf 'JWT Token: %s\n' "$JWT"
    
    getUserData | jq > myFedditUserData.json
    

    @elvith@feddit.org hat mein Script auch in PowerShell nachgebaut, welches unter Windows ohne WSL auskommt: https://gist.github.com/elvith-de/89107061661e001df659d7a7d413092b

    # CHANGE THESE VALUES
    $my_instance="https://feddit.de" # e.g. https://feddit.nl
    $target_file = "C:\Temp\export.json"
    
    ########################################################
    #Ask user for username and password
    $credentials = Get-Credential -Message "Logindata for $my_instance" -Title "Login"
    
    $my_username= $credentials.UserName
    $my_password= $credentials.GetNetworkCredential().Password
    
    # Lemmy API version
    $API="api/v3"
    
    # Login
    function Get-AuthToken() {
        $end_point="user/login"
        $json_data= @{
            "username_or_email" = $my_username;
            "password" = $my_password
        } | ConvertTo-Json
    
        $url="$my_instance/$API/$end_point"
    
        (Invoke-RestMethod -Headers @{"Content-Type" = "application/json"} -Body $json_data -Method Post -Uri $url).JWT
    }
    
    # Get userdata as JSON
    function Get-UserData() {
        $end_point="user/export_settings"
    
        $url="$my_instance/$API/$end_point"
    
        Invoke-RestMethod -Headers @{"Authorization"="Bearer $($JWT)"} -Method Get -Uri $url
    }
    
    $JWT= Get-AuthToken
    
    Write-Host "Got JWT Token: $JWT"
    
    Write-Host "Exporting data to $target_file"
    Get-UserData | ConvertTo-Json | Out-File -FilePath $target_file
    

  • Misleading title.

    In the string of images uploaded online, we get a look at file repositories, a rough map of the proposed Moon location, and shots of some early conceptual images and set pieces. As the story goes, CDPR originally intended for the Moon to be a featured location in the base game but recognised that it was too ambitious a goal, so they cut the content and instead decided to use it for an expansion – which ultimately never surfaced.

    Cyberpunk 2077’s development has officially ended, so there’s no chance this will ever see the light of day.









  • er relativiert und vergleicht Dinge, die nicht verglichen gehören

    In der Theorie und rein moralisch betrachtet sind das unterschiedliche Dinge, das ist richtig. In der Praxis sieht es aber, zumindest meiner Meinung nach, anders aus:

    Einem Großteil der Bevölkerung geht es seit Jahren zunehmend schlechter. Das hat viele Faktoren: Wirtschaft, Pandemie, Krieg(e). Das Ungerechtigkeitsgefühl ist groß, die Politikverdrossenheit meist noch gößer. Das Volk fühlt sich weder repräsentiert noch ernst genommen.

    Vor diesem Hintergrund des Dauerstresses kommt es nun seit Jahren immer wieder zu solchen Meldungen: Messerstecherei hier, Gruppenvergewaltigung da, Kalifatherbeirufung en masse dort. Ein signifikanter Teil erlebt diese Nachrichten und fragt sich, nicht ganz zu Unrecht, wie das weitergehen soll und fühlt sich persönlich bedroht. Überspitzt stellvertretend ausgedrückt: “Wir lassen die seit vielen Jahren in unser Land, finanzieren ihnen mit unseren Steuern das Leben und im Gegenzug müssen wir solche Untaten tolerieren und in Angst leben? Wo bleiben denn die Ärzte und Ingenieure, wir kriegen doch höchstens Raketenwissenschafter aus Palästina. Wir müssen was tun, bevor es zu spät ist!”

    Da ist es vielen auch eher egal, dass es so viele Erfolgsgeschichten zur Integration gibt. Es ist egal, dass genau diese Feindseligkeit gegen eine ganze Bevölkerungsgruppe das Ziel vieler solcher Attacken ist. Es ist egal, dass viele Moslems diese Taten ebenso als abscheulich empfinden. Die Politik soll endlich hart durchgreifen, ihr Volk schützen und eine harte Linie fallen. Genug ist genug!

    Dabei wird natürlich ignoriert, dass es keine einfache Antwort gibt. Wir sind schließlich keine Diktatur, sondern eine Demokratie mit mehr oder weniger funktionalem Rechtssystem. Deportationen sind teilweise schwierig bis quasi unmöglich, Aktion statt Reaktion oft nicht Teil unseres Systems.

    Ich kann sehr gut nachvollziehen, dass viele Leute willentlich oder, weil sie es nicht besser wissen, die Vergleiche ziehen und sich bedroht fühlen. Die extremen Parteien bieten einfache Antworten auf kritische Fragen, die sonst kaum eine Partei offen ansprechen will. Ob diese Antworten auch nur annähernd realistisch sind und ob sonstige Positionen der eigenen entsprechen, wird oft unwichtig.



  • Wenn du auf der Ebene diskutieren möchtest, dann sage ich: “religiöser Extremismus”? Reine Vermutung ohne Faktenbasis. Dann kann man es aber auch gleich lassen.

    Ich habe Religion gar nicht in die Diskussion gebracht, sie spielt für mich keine Rolle. Zumindest zu diesem Zeitpunkt ist auch schlichtweg nicht bekannt, ob der Täter überhaupt religiös ist. Das Gegenteil deiner Aussage:

    Es war eben (vermutlich) kein religiöser Extremismus. Weil die Gründe für den Angriff (vermutlich) nicht in der persönlichen Religionsauffassung des Täters lagen , sondern in der Islamfeindlichkeit der Opfer

    wäre genauso eine Vermutung ohne Faktenbasis.

    Du argumentierst da gegen einen Strohmann, den du selber gebaut hast. Der sehr positiv geframte Teil mit dem Freiheitskampf der Unterdrückten ist der Teil, der mir in dem Kontext sehr sauer aufstößt.







  • The problem isn’t necessarily “stuff not sent over vpn isn’t encrypted”. Everyone uses TLS.

    Never said it was. It’s a noteworthy detail, since some (rare) HTTP unencrypted traffic as well as LAN traffic in general is a bit more concerning than your standard SSL traffic contentwise, apart from the IP.

    For this to be practical you first need a botnet of compromised home routers

    This is more of a Café/Hotel Wi-Fi thing IMO. While it may take some kind of effort to get control over some shitty IoT device in your typical home environment, pretty much every script kiddie can at least force spoof the DHCP server in an open network.


  • Interesting read.

    So, in short:

    • The attacker needs to have access to your LAN and become the DHCP server, e.g. by a starvation attack or timing attacks
    • The attacked host system needs to support DHCP option 121 (atm basically every OS except Android)
    • by abusing DHCP option 121, the attacker can push routes to the attacked host system that supersede other rules in most network stacks by having a more specific prefix, e.g. a 192.168.1.1/32 will supersede 0.0.0.0/0
    • The attacker can now force the attacked host system to route the traffic intended for a VPN virtual network interface (to be encrypted and forwarded to the VPN server) to the (physical) interface used for DHCP
    • This leads to traffic intended to be sent over the VPN to not get encrypted and being sent outside the tunnel.
    • This attack can be used before or after a VPN connection is established
    • Since the VPN tunnel is still established, any implemented kill switch doesn’t get triggered

    DHCP option 121 is still used for a reason, especially in business networks. At least on Linux, using network namespaces will fix this. Firewall mitigations can also work, but create other (very theoretical) attack surfaces.