Linux - Reddit – Telegram
Linux - Reddit
755 subscribers
4.17K photos
207 videos
39.8K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
hey everyone

metasploit isnt working after i did apt-get update/upgrade.

\> Executing “sudo msfdb init && msfconsole”

[sudo\] password for kali1:

[+\] Starting database

[i\] The database appears to be already configured, skipping initialization

Unable to find a spec satisfying metasploit-framework (>= 0) in the set. Perhaps the lockfile is corrupted?

Run `bundle install` to install missing gems.

i ran bundle install and the output was: could not locate gemfile..

if anyone knows whats going on here please let me know

https://redd.it/l5033v
@r_linux
X2x and sharing the clipboard

I used to use Synergy to allow one keyboard and mouse to work across multiple machines. The Synergy package used to be available in Debian but has long since disappeared from the repos and seems to be no longer maintained.

I have recently been messing around with x2x and ssh between Linux machines and it provides the same functionality for the keyboard and mouse, but unlike Synergy, does not also share the clipboard.

Is there any way to get x2x working with the clipboard? I would like to copy on one machine, move the mouse to a second and paste what I copied on the first.

Update: I just noticed that xsel works (and that may be sufficient), but Contol-C/Control-V does not. Obviously they use different mechanisims.

https://redd.it/l52wsy
@r_linux
Linux UI set

What's up my dudes!

I feel this might not be the right threat to ask something like this, as this is not entirely your cup of tea but I don't know where else to turn.

I'm going to make an animation in the linux debian envoirenment. I want it to be like the episode of modern family but then focused on the linux OS. I have screen recordings of someone using the OS to get the feel of how it works, but using the frames and apps from a screen recording kind of limits what I can do with it.

Does anybody know if there is an EPS/SVG/PNG set available of the UI? It would really save me a lot of time, and make my animated video a lot cooler

https://redd.it/l5a0on
@r_linux
Automating an entire Youtube channel with Terminal magic.

So I was wondering creating an entire youtube channel and running it with bash noscript cronjob.

One night I noticed there is a youtube channel which is doing nothing but making a compilation video of tik tok, there are lot of compilation video channels on youtube and those channels are just picking someone else content from other social media.

So I decided to create my own and running it with cronjob.

There are 3 things I have to do -

* Finding content using reddit
* Editing video using ffmpeg
* Uploading video on youtube with python.

Script link - [http://0x0.st/--T0.sh](http://0x0.st/--T0.sh)

You can watch a [Video explanation](https://youtu.be/PS5vBJELtj4)

Or read the text below -

# 1. Finding Content

I can use r/TikTokCringe to download 12 most upvotes tik tok video of that particular day. I can use youtube-dl to download these videos. It's pretty easy because in reddit if you add .json in the end of url you will get json output something like [this](https://www.reddit.com/r/TikTokCringe/top.json?limit=12).

So by using curl only this line is enough to download funny tiktok video -

youtube-dl $(curl -s -H "User-agent: 'your bot 0.1'" https://www.reddit.com/r/TikTokCringe/hot.json?limit=12 | jq '.' | grep url_overridden_by_dest | grep -Eoh "https:\/\/v\.redd\.it\/\w{13}")

# 2. Editing video

Now these tik tok videos are vertical videos so First thing I have to do is adding the blur background in vertical video, to make it horizontal video. So I can use ffmpeg to add blur background. After looking online a little I found a weird command to do this trick and now I can run this command to all files using a for loop -

for f in *.mp4; do ffmpeg -i $f -lavfi '[0:v]scale=ih*16/9:-1,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,crop=h=iw*9/16' -vb 800K blur/$f ; done

Now in last I have to merge the videos to finish my editing. I can also download a subnoscription request video from youtube to just add it in the end and then use ffmpeg concat function to merge all videos and making one compilation video.

for f in blur/*.mp4; do echo "file $f" >> file_list.txt ; done
ffmpeg -f concat -i file_list.txt final.mp4

Don't forget to delete vertical and horizontal videos after making a final.mp4 file.

# 3. Uploading Video

Now this is very simple google have an [article](https://developers.google.com/youtube/v3/guides/uploading_a_video). Explaining how you can upload a youtube video by using python. You can read this article. It's provide a python2 noscript which require your google account outh2 authorization keys and then you can run this noscript in last.

python2 $HOME/bw/.local/bin/upload.py --file="final.mp4" --noscript="Funny TikTok Compilation" --denoscription="Buy my merchandise - spamlink.ly" --keywords="tiktok,cringe" --category="22" --privacyStatus="public"

You can post video in privacy status public so this way you don't have to worry about anything.

​

>isn't that amazing?

This one simple noscript will run as cronjob daily and upload funny tik tok videos in 24 hours. Also these are most up voted tik tok on r/TikTokCringe So your video are pretty much high quality tik toks. So you will get good retention on your video. Also by running multiple channels like this you have a good chance of getting subscribers and you can find a way to monetize your channel and earn some Money.

I am very sure your videos will also get picked by stupid youtube algorithm.

BTW I am not going to do this thing by myself. Because I don't support putting someone else video and earning from it. I have my own youtube channel where I put original content. But since this is good idea I just wanted it to share with you.

https://redd.it/l5awi1
@r_linux
This media is not supported in your browser
VIEW IN TELEGRAM
100% installed on a pc,not on anything else(it's a bare bone Debian machine,surprised it can run on a Snapdragon 835)

https://redd.it/l5lajc
@r_linux
I automate sending birthday and festival wishes to my friends by running a bash noscript in cronjob.

​

One day one of my female friend got angry with me and stopped talking to me because I forgot her birthday and she never forget my birthday. So I was feeling very bad.

and this is not the first time. This happen every year. Not just with one friend with all my friends. Since I don't use any social media it's really hard for me to remember my friends birthdays.

I have no facebook to notify me about my friends birthday. Also no whatsapp so I can see status of my friends putting party pictures or others birthday wishes.

I never wish people on festivals too and we have so many festivals here in India.

But then I got this idea -

I also have a Video explanation or you can read text.

Script - https://pastebin.com/HZrUYynw

# Step 1 -

First my college group is on telegram so almost all my friends use telegram. So by using Telethon library I create a simple tgsend python noscript to send messages on telegram from my account by using terminal.

You need to get your telegram API ID and API HASH from telegram website but it's really easy. Not like Google API.

tgsend username "Sending Happy Birthday using Username"
tgsend +00123456789 "Sending Happy Birthday using Phone number"

# Step 2 -

After this I created a csv file which contain my friends - name, contact number, birthday. My list is huge because I included almost everyone I know - old friends, new friends, all classmates, people I see daily.

File is something like this -

$ cat contacts.csv
Jimmy, +1234567890, 02-May
Emma watson, +1231231234, 09-Jan
Hannah Montana, +1233123123, 21-Sep
...

# Step 3 -

We can use simple grep magic to know who is having birthday today.

grep $(date '+%d-%B') contacts.csv

Here by using date command we can print today's date in exact format we have in contact.csv

Now to get more information we can use Simple cut command.

For example -

name=$(grep $(date '+%d-%B') contacts.csv | cut -d, -f1) # for name
phone=$(grep $(date '+%d-%B') contacts.csv | cut -d, -f2) # for contact number

We can also use awk '{print $1}' to just get first name.

# Step 4 -

Now we Generate message. I am generating a very simple happy birthday message.

msg="Haaappppy Birthday ${name} .. Many Many happy returns of the day."

But you guys can go creative and make list of variety of messages and use shuf to get a random message string. Also It's good if you add name in your messages.

In last

tgsend $phone "$msg"

# Step 5 -

Create a cronjob at random time in mid night .. don't set this to exact 00:00 (24 hours format) otherwise this will look fishy. Also run this on your VPS server or somewhere online. like PythonAnywhere. You can also create a log file for yourself. If you want.

# Conclusion -

This idea was very simple but it changed my life. Now I wish all my friends on their birthday automatically and when they reply Thank you. At that time I realize ohh.. She is having birthday today and this way I don't have to worry about forgetting birthdays.

Also I use this to wish people on festivals .. Now I am just doing it with telegram but you guys can find some whatsapp libraries written in javanoscript. I know there are some. Also There is a way of sending messages from phone numbers too.

I will highly recommend doing this .. You can save so much time of sending these stupid messages to people you don't really care about.

I know this is Autism at its peak. But I am happy like this.

https://redd.it/l5mxg7
@r_linux
CVE-2021-3156: Heap-Based Buffer Overflow in Sudo

Serious looking vulnerability in sudo

Run command “sudoedit -s /”

If the system is vulnerable, it will respond with an
error that starts with “sudoedit:”

If the system is patched, it will respond with an error that starts with “usage:”

Arch have released a patch in the last few hours (1.9.5.p2)
Running on my system after updating produces
sudoedit -s /
usage: sudoedit [-AknS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...

Which looks like it's patched.

https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit

/edit: just checked on a Ubuntu 18.04 server and it seems to have been patched so I assume later versions are patched also

/edit2: /u/WarriorXK has confirmed patched on Debian 10 - and it appears not to be patched on Debian 8.

https://redd.it/l5n12d
@r_linux
RHEL no-cost* vs openSUSE Leap

Red Hat allows its clients to use RHEL for free on up to 16 machines. On the other hand, openSUSE Leap boasts binary compatibility with SUSE Linux Enterprise and comes without any restriction on usage.

[https://sysadmin-journal.com/rhel-no-cost-vs-opensuse-leap/](https://sysadmin-journal.com/rhel-no-cost-vs-opensuse-leap/)

https://redd.it/l5nbzv
@r_linux
LFCA Exam Study Guide (Linux Foundation Certified IT Associate) Study Guide

Linux Foundation has announced a new beginner certification LFCA. You can do this certification before doing certifications like LFCS and LFCE. Here is the study guide for LFCA, in case you decide to appear for it.

https://ravikirans.com/lfca-linux-exam-study-guide/

All other Linux-based certifications can be found here

https://ravikirans.com/category/linux-certification/

https://redd.it/l5efbb
@r_linux
Lenovo ThinkPad X1 Carbon Gen 8 with Ubuntu Pre-Installed -- a Disaster So Far

I recently bought a new ThinkPad X1 Carbon Gen 8 computer with Ubuntu Linux factory pre-installed. It crashed right out of the box during its so-called Out Of Box Experience (OOBE) system configuration process. It became so corrupted the first session that I could not even power it off normally. And, at the end of the very first time I turned it on, I had to resort to the last ditch Emergency Reset button on the bottom of the unit to get it to power down completely. (Yes. I did leave it for a full hour on the black screen of death with a list of error messages just to be sure it wasn't actually doing something in the background in the final stages of power down.) At least one cause of the initial OOBE crash was most likely a local internet service interruption during the OOBE -- and more fundamentally, the associated OOBE programming bugs that would allow that kind of rare, but fully foreseeable, scenario to crash and corrupt the entire operating system. (I am now tending so suspect it was more than likely that there were some other pre-existing faults with the system image used to create my computer. I have been programming since....1985 or 1986, so that's not a completely baseless speculation.)

The only thing worse than the computer itself has been the exceptionally poor treatment I have received from Lenovo Support. (I even filled out 2 Lenovo-requested customer satisfaction surveys, one sent out to my email by their V.P. and General Manager of eCommerce, Ajit Sivadasan, and I never heard back from anyone in management wondering why a customer would be so upset about being treated soo poorly in their attempt to get service for a brand new error-plagued laptop. Everyone in support that I talk to keep trying to tell me their department doesn't support Linux!) About 40 hours of my personal time in (over 12 days), I've been lied to, ignored, passed around in circles by (automated-chat-bot-, online-chat-, hardware-, software-, and warranty-) support, hung up on, muted indefinitely, and "facilitated" with unhelpful, incomplete, and irrelevant advice and instructions (each multiple times).

I have found some help from non-Support Lenovo Engineers on the Lenovo forums, but that means I'm spending a whole lot of my time fixing their problem. And the ThinkPad is only better, but far from fixed (down to 17 reported "Important"-level errors + 5 more in the final blackscreen every time I power off, plus 1/3 or the original desktopApplications now missing or gone hiding), and I'm still not getting clear, comprehensive, and fully correct answers -- even from the software engineers. (Sorry guys, I do appreciate the help, and dealing with individual unhappy customers may not really be part of your proper jobs, but I need to be completely honest here -- things are still a long way from OK at my end).

So, (40 hours) x (going consulting rate for technical office admin help -- call it $50/hour) = $2000 -- more than the price of the computer. (Maybe that's why they had them on sale???)

I personally really, really hate Microsoft Windows and Office. (I used to do MS Office Application Development for stock analysts and their portfolio manager customers at a large, old bank in Chicago for about 5 years in the early 2000's, so I've seen MS products from the inside in real corporate office environments back then and for decades since.) MS Windows/MS Office has never come even remotely close to meeting my personal needs, and so I really wanted to try out Linux in a comparatively pain-and-worry-free environment so that I could more easily automate certain office functions in the way I find convenient.

(Even longer ago, I had to design, create, test, use, and document a couple of 25,000 line scientific data analysis programs at a DOE science lab, so the level of complexity and care required to create a large, error-free program isn't really an issue for me. Learning a new high-level language is a nuisance, but I've actually got the time
to do that again now.) Just 12 days ago, I was actually quite excited to have a new Lenovo Linux computer to start experimenting around with, and I was sincerely thankful for Lenovo offering one with Linux pre-installed so that I didn't have to worry about something I missed in that end of it.

Perhaps my undoing was that I chose the Ubuntu OS (vs. the Fedora OS) from Lenovo? Both should be fine, but maybe Lenovo just can't handle Ubuntu yet? Ironically, I chose Ubuntu because it was reported to be even more stable than Fedora. Even I -- a "non-Linux person" -- was able to install Ubuntu on my own on in a separate partition on an old, 2nd-hand, Toshiba Satellite Windows 7 machine when I was "demoing" Linux desktops to see if I wanted to make the leap. It was old tech, so I didn't have to deal with the possibility of new missing drivers and the like, but it wasn't all that bad.

Or perhaps I just drew the unlucky straw and got a rare ThinkPad lemon. But given the extraordinarily poor performance of Lenovo support so far, I'd say try elsewhere if you can. You might get lucky and never need them. Or you might just get them on a day when they actually remember how to help. But my experience suggests you shouldn't count on it. (Really a shame. I was quite excited and positive about Lenovo just 12 days ago. I even got my partner to by a Lenovo Yoga with MS Windows (she has to have MS for her work) a few days after I ordered mine. (No, she isn't terribly happy with hers either. Her PC works, but they did a little visual marketing bait and switch on her with the stylus -- not that she actually needed one, but she got excited thinking she was getting one with her model of Yoga. She bought it for other reasons.)

I'd be interested to hear other's experiences with pre-installed Linux (any brand of PC) and separately Lenovo support of Linux (Ubuntu vs. Fedora). (Yes, I see some older threads with more positive results, but frankly a lot of them read a bit like marketing vs. real experience, and I'm curious if things have shifted at Lenovo recently for some reason. Seems like they've been really trying to force the bottom line to show immediate profits.)

Sincerely,

R. C. Blasdell, Ph.D.

https://redd.it/l5ti5c
@r_linux
dpkg-deb: error: tar subprocess was killed by signal (Segmentation fault)

I have a server running on a Raspberry Pi 4 B+

Went to do my weekly update/upgrade and came back with the following errors when using both apt and apt-get.

usr@server:~ $ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree
firmware-realtek raspi-config
6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.5 MB of archives.
After this operation, 11.3 kB of additional disk space will be used.
Do you want to continue? Y/n Y
Get:1 http://archive.raspberrypi.org/debian buster/main armhf firmware-atheros a ll 1:20190114-1+rpt11 3,887 kB
Get:2 http://archive.raspberrypi.org/debian buster/main armhf firmware-brcm80211 all 1:20190114-1+rpt11 4,600 kB
Get:3 http://archive.raspberrypi.org/debian buster/main armhf firmware-libertas all 1:20190114-1+rpt11 3,424 kB
Get:4 http://archive.raspberrypi.org/debian buster/main armhf firmware-misc-nonf ree all 1:20190114-1+rpt11 3,071 kB
Get:5 http://archive.raspberrypi.org/debian buster/main armhf firmware-realtek a ll 1:20190114-1+rpt11 496 kB
Get:6 http://archive.raspberrypi.org/debian buster/main armhf raspi-config all 2 0210119 27.9 kB
Fetched 15.5 MB in 4s (4,406 kB/s)
dpkg-deb: error: tar subprocess was killed by signal (Segmentation fault)
Traceback (most recent call last):
File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb
output = subprocess.checkoutput(command)
File "/usr/lib/python3.7/subprocess.py", line 395, in check
output
kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ''dpkg-deb', '-f', '/var/cache/apt/archi ves/firmware-atheros_1%3a20190114-1+rpt11_all.deb', 'Package', 'Source', 'Versio n', 'Architecture', 'Status'' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 281, in <module>
main(config)
File "/usr/bin/apt-listchanges", line 96, in main
pkg = DebianFiles.Package(deb)
File "/usr/share/apt-listchanges/DebianFiles.py", line 215, in init
parser.readdeb(self.path)
File "/usr/share/apt-listchanges/DebianFiles.py", line 128, in readdeb
{'what': file, 'errmsg': str(ex)}) from ex
NameError: name 'file' is not defined

During handling of the above exception, another exception