How to Install ADB & Fastboot on Ubuntu 18.04 / Linux Mint 19?. Android Debug Bridge (ADB) is a versatile command-line tool that enables you to communicate with a device from a client machine. With adb command, you can perform a variety of device actions, such as the installation of Applications, copying files, run shell commands, debug applications e.t.c.
ADB also provides access to a Unix shell for running commands on the device. ADB works in a client-server model and it includes three components:
adbd: This is a daemon running in the background and allows the running of commands.
A server: This is a background process running on your development machine to manage communication between the client and the daemon.
A client: The client is responsible for sending commands from you local machine to a device over USB connection.
Install ADB & Fastboot on Ubuntu 18.04 / Linux Mint 19
ADB comes included with Google’s Android SDK but the package can be installed independently on Ubuntu 18.04 / Linux Mint 19. Install both ADB & Fastboot by running the commands below.
3) Make sure about the location of the directory which contains a file named » install.sh «. It must be in downloads/XXXX(You named!!)/ uld.
I repeat. » install.sh » is in ULD.
4) Open TERMINAL to go to the directory which has » install.sh » in it.
cd downloads
cd XXXX
cd uld
5) Install a driver by command.
sudo ./install.sh
Note that you have to hit «Enter» many many times to reach the line which asks you to choose y/n. Go slow. Otherwise you’ll have to go back to the directory of ULD and command again.
This time we are using mSMTP because it’s easy, and Gmail because it’s free.
I would prefer to create a new Gmail account specific only for this purpose. Use your creativity to create long and obfuscated password, e.g. with mkpasswd -m sha-512 yOuRp4ssW0rD you can get a long string which is should be very nice for password.
Then edit the config file at /etc/msmtp/ssmtp.conf:
root=youremail@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=youremail@gmail.com
AuthPass=yOuRfUnKyP4ssWorD
UseTLS=YES
UseSTARTTLS=YES
AuthMethod=LOGIN
mSMTP is not a daemon, so don’t worry about starting the service or such.
Next, test your setup:
echo"test message"| mail -s "testing msmtp"yourothermail@gmail.com
Note the blank like after the subject, everything after this line is the body of the email. When you’re finished, press Ctrl-D. mSMTP may take a few seconds to send the message before closing.
apt-get install curl
2. The Script
#!/bin/bash
#Script to report public IP address change
#By: Soultidis D. Christos
curl ipinfo.io/ip > /home/username/emailscript/erxeteip.txt
oldip=`cat /home/username/emailscript/oldip.txt`
erxeteip=`cat /home/username/emailscript/erxeteip.txt`
if [[ $erxeteip = $oldip ]]
then
#echo $oldip > /home/username/emailscript/oldip.txt
echo "Kamia allagi"
else
echo $erxeteip > /home/username/emailscript/newip.txt
echo $erxeteip > /home/username/emailscript/oldip.txt
cat /home/username/emailscript/newip.txt | mailx -s "Dynamic Public IP Address" youremail@gmail.com
fi
This time we use Bash, because you might not realize that you’re already fluent with Bash.
Save this anywhere in your home folder. I personally have my own /home/username/emailscript/
3. Cron
To make this run periodically, add the script as a cron job. More detail on cron you can STFG (Search The Fine Google).
I am making this post because last 2 days I tried to install msmtp to my Debian 10 server. Previously I used ssmtp where I did not have any problems but it cannot be installed at the time of making this tutorial. Because nobody is maintaining the package anymore or something like this as far as I understood.
I spend countless hours to the error that said my username and password is not accepted by Gmail. So here is my tutorial to how fully install it and configure it.
Step 1: Installing required packages.
sudo apt-get install msmtp msmtp-mta
Step 2: Create an app password in Google for msmtp
This (Step 2.* in this tutorial) was the missing piece of the puzzle which weren’t in any of the msmtp tutorials I did through. I found out about it in one of the Postfix tutorials where it was included after many hours of trial and error. Because at first, I thought the msmtp config file where was password field had to be filled with the same password with what you log in as a person to your account.
Step 2.1: Select Security from the side menu and turn 2-Step Verification ON.
Step 2.2: After that click on App passwords
Step 2.3: Next up select Other (Custom name)
Step 2.4: Fill in the name as msmtp for example
Step 2.5: Get the password for your msmtp configuration file
Save this password to some notepad temporarily so you can copy & paste it later to a configuration file because once you click DONE you cannot see the password again. At least I have not found a way to re-open this popup.
Step 3: Create a configuration file
sudo nano /etc/msmtprc
Step 4: Configure msmtprc file
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
account gmail
host smtp.gmail.com
port 587
from username@gmail.com
user username
password password
account default : gmail
The username@gmail.com has to be changed in the config file with the email you used to create an app password
The user field where is username has to be changed as well. For example, if your email is john.doe@gmail.com then change username to john.doe.
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
account gmail
host smtp.gmail.com
port 587
from john.doe@gmail.com
user john.doe
password fkelpwkdymcwslwo
account default : gmail
Step 5: Testing the email configuration
echo "Message" | mail -s "Title" youremailaddress@gmail.com
After that command, you should receive an email from your configured account.
The easiest way to enable desktop icons is to use Gnome Tweak Tool. Run sudo apt-get install gnome-tweak-tool, then launch Gnome Tweak Tool from the Gnome Shell menu. It will be called Advanced Settings.
Then, click on the Desktop button. Enable the option that says «Have file manager handle the desktop. Now, any files placed in the Desktop folder inside your home folder should appear on ther desktop.
Για να επιστρέψουμε λοιπόν τα εικονίδια αρκεί να δώσουμε αυτές τις δύο εντολές.
gsettings set org.gnome.desktop.background draw-background true
gsettings set org.gnome.desktop.background show-desktop-icons true
Για να επιστρέψουμε στην άδεια επιφάνεια εργασίας που είχαμε προηγουμένως δίνουμε τις ίδιες εντολές, αλλά αντί για το true στο τέλος δίνουμε false.
How do I install OpenSSH sshd server under Debian GNU/Linux operating systems?
You need to use the apt-get or aptitude command to install OpenSSH server under Debian Linux. Open a terminal and type the following command to update package database as root user: # apt-get update
Task: Install OpenSSH server Under Debian Linux
Type the following command: # apt-get install openssh-server
Sample outputs:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
ssh-askpass rssh molly-guard ufw
The following NEW packages will be installed:
openssh-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 318 kB of archives.
After this operation, 717 kB of additional disk space will be used.
Get:1 http://mirror.anl.gov/debian/ squeeze/main openssh-server amd64 1:5.5p1-6+squeeze1 [318 kB]
Fetched 318 kB in 3s (89.0 kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 153448 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.5p1-6+squeeze1_amd64.deb) ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.5p1-6+squeeze1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Restarting OpenBSD Secure Shell server: sshd.
By default openssh will run on the TCP port 22. You can verify the same with the following command: # netstat -tulpn | grep :22
Sample outputs:
You can connect to the Openssh server, type: $ ssh user@localhost
$ ssh user@sever-ip-here
How Do I Start / Stop / Restart OpenSSH Server Under Debian Linux?
Type the following commands as root user: # service ssh stop
# service ssh start
# service ssh restart
# service ssh status
OR # /etc/init.d/ssh stop
# /etc/init.d/ssh start
# /etc/init.d/ssh restart
# /etc/init.d/ssh status
Sample session:
Click to enlarge the image
How Do I Open Port 22 At The Firewall Level?
Edit your firewall script and append the following rule to restrict access to 192.168.1.0/24:
/sbin/iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
Save and close the file. OR, you can type the command as follows and save it to your firewall config file:
# /sbin/iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
# iptables-save > /path/to/your.firewall.conf
How Do I Configure and Secure OpenSSH Server under Debian Linux?
You need to edit the /etc/ssh/sshd_config file using the text editor such as vi, run: # vi /etc/ssh/sshd_config
See this article which explains config option to tweak in order to improve OpenSSH server security.
Έχουμε αναφερθεί στο θέμα της δικτυακής παρακολούθησης από ορισμένες ιστοσελίδες η διάφορα άλλα στοιχεία σε αυτές. Και δεν μιλάμε φυσικά για την ηθική “παρακολούθηση” που σας κάνει μια ιστοσελίδα, όταν κάνετε περιήγηση σε αυτήν, για να έχετε πιο καλή πρόσβαση (αυτό αλλωστε είναι δεδομένο και αποδεκτό).
Μιλάμε για όσες παρακολουθήσεις γίνονται χωρίς να το ξέρετε.
Σε γενικές γραμμές αυτά τα συνολικά δεδομενα προορίζονται για διαφημιστικές χρήσεις, ωστε να βλέπουν οι εταιρείες τις τάσεις των ανθρώπων, ανάλογα τις επιλογές τους στο διαδίκτυο.
Το βέβαιο όμως είναι ότι αυτά τα στοιχεία πάνε και σε άλλα χέρια διαφόρων κρατικών υπηρεσιών και από εκεί και πέρα η χρήση τους είναι ανάλογα τις ανάγκες τους (τις πολίτικες εννοώ).
Έχουμε δώσει αρκετές τέτοιες λύσεις εδώ στο osarena, για την ασφάλεια σας και την ανωνυμια σας και η ενημέρωση που έχουμε δώσει για αυτά τα θέματα είναι υπέρ του δέοντος και με χαρά βλέπουμε πως έχουν αρχισει και πιάνουν τόπο.
-To Collusion, είναι ένα πρόσθετο (addon) για τον Firefox browser, τ’ οποίο σ’ ένα απλό διάγραμμα σας δείχνει τι συμβαίνει κατά την κίνηση σας στο διαδίκτυο.
Το ποιες σελιδες δηλαδη σας παρακολουθούν.
Με μπλε η γκρι χρώμα είναι οι ιστοσελίδες που επισκεπτόσαστε και με κόκκινο οι διαφημιστικές και “κακές”παρακολουθήσεις.
Όλα αυτά είναι συνδεδεμένα μεταξύ τους με γραμμές. Δηλαδή τα στοιχεία που η κάθε σελιδα και τυχόν παρακολουθούν.
Να λάβετε υπόψη σας, πως αν έχετε κάνει login σε καποια ιστοσελίδα και ας έχετε κλείσει το tab που την έχετε, αυτή θεωρητικά σας παρακολουθεί.
Με κλικ στο κάθε εικονίδιο, στην αριστερή πλευρά δίνει καποια εξήγηση για το κάθε τι.
Αυτό δε σημαίνει όμως, ότι υποχρεωτικά παρακολουθεί τις κινησεις σας. Απλά έχετε το αναγκαίο cookie της, για την καλύτερη και ταχύτερη περιήγηση σας σε αυτή.
-Η χρήση του είναι απλούστατη και μετά την εγκατάσταση του (δεν απαιτεί επανεκκίνηση), θα εμφανίσει το εικονίδιο του στην toolbar του Firefox σας.
Με κλικ επανω στο εικονίδιο του, σας ανοιγει μια άλλη σελιδα (σε νέο tab) που σας δείχνει το γράφημα:
(Στη πράξη είδα πως το Ghostery που είχαμε παρουσιάσει δουλεύει μια χαρά, καθώς είχε πράγματι απομονώσει όλα όσα δεν ήθελα).
-Με ένα κλικ και πάλι, δίνει την επιλογη να διαγράψετε όλες αυτές τις παρακολουθήσεις πουν δεν επιθυμείτε.
-Το συγκεκριμένο πρόσθετο μαλιστα είναι αξιολογημένο από την Mozilla και σκοπος του Collusion είναι να προσφέρει μεγαλύτερη διαφάνεια στους χρήστες που σερφάρουν στο διαδίκτυο επιτρέποντας έναν εύκολο και κατανοητό τρόπο προβολής για το ποιοι και πως διαμοιράζουν τα δεδομένα του.
Χαρακτηριστική η δήλωση του Gary Kovacs (διευθύνων σύμβουλος της Mozilla), ο οποίος είπε:
Από τη στιγμη που άρχισα να χρησιμοποιώ το Collusion, μέχρι το τέλος της ημέρας, με είχαν παρακολουθήσει πάνω από 150 διαφορετικές εταιρίες ή ιστότοποι.
Το WPScan είναι ένα vulnerability scanner για σελίδες δημιουργημένες με WordPress.
Γραμμένο σε ruby,είναι ικανό να εντοπίσει κοινά τρωτά σημεία της ασφάλειας καθώς και αναγράφονται όλα τα plugins που χρησιμοποιούνται από έναν δικτυακό τόπο φιλοξενίας WordPress.
EΓΚΑΤΑΣΤΑΣΗ:
Αν λοιπόν, έχετε κάποια σελίδα WP η θέλετε να σκανάρετε κάποια που σας ενδιαφέρει, μπορείτε να το εγκαταστησετε στο Ubuntu σας, ακολουθώντας τα παρακάτω βήματα (λογικά θα πρέπει να δουλέψει σε όλες τις εκδόσεις από 10.04 και πάνω):
-Ανοίξτε ένα τερματικό (μπορείτε να το καλέσετε είτε μέσω dash, αρχίζοντας να γράφετε την λέξη terminal, είτε πατώντας συγχρόνως τα πλήκτρα: Ctrl-Alt-T), δίνοντας μια-μια τις παρακάτω εντολές, πατώντας Enter μετά την κάθε μια και δίνοντας τον κωδικό σας, αν ζητηθεί:
Με τα παραπάνω εγκαταστήσαμε εξαρτήσεις και το ίδιο το πρόγραμμα. Τώρα κανονικά στον προσωπικό σας φάκελο (/home), θα έχει δημιουργηθεί και ο φάκελος του WPScan.
-Για άλλες διανομές, μπορείτε να το κατεβάσετε από την σελίδα του:
Για non-intrusive checks σε κάποια WordPress ιστοσελίδα, μπορείτε να χρησιμοποιήσετε αυτή την εντολή από το τερματικό:
osarena code
ruby ./wpscan.rb --url www.domain.com
ΣΗΜΕΙΩΣΗ: Όπου http://www.domain.com, βάζετε την διεύθυνση της WP σελιδας που θέλετε να σκαναρετε.
-Για παράδειγμα, αν θέλετε να σκαναρετε τα πρόσθετα που χρησιμοποιεί μια σελιδα WP, θα δώσετε κάτι τέτοιο:
osarena code
ruby ./wpscan.rb --url www.domain.com --enumerate p
ΣΗΜΕΙΩΣΗ: Όπου http://www.domain.com, βάζετε την διεύθυνση της WP σελιδας που θέλετε να σκαναρετε.
Η εντολη θα απαριθμήσει όλα τα εγκατεστημένα πρόσθετα της σελίδας.
Για περισσότερα, μπορείτε να ελέγξετε το αρχείο README που έρχεται με το εργαλείο, ή να εκτελέσετε αυτή την εντολή από το τερματικό:
osarena code
catREADME
>>>Δείτε το σε δράση στο παρακάτω βίντεο, ώστε να καταλάβετε καλύτερα την λειτουργία του:
Το τερματικό είναι ένα πολύ ισχυρό εργαλείο με το οποίο μπορούμε να κάνουμε τα πάντα.
Έχουμε αναφερθεί σε αυτό αρκετά και έχουμε συγκεντρώσει όλα αυτά που πρέπει να ξέρετε, ώστε να το χρησιμοποιείτε σωστά (Τερματικό: Δες τι μπορείς να κάνεις που ίσως δεν γνώριζες!).
Το ccrypt είναι ενα εργαλείο γραμμής εντολών με το οποιο μπορείται εύκολα και γρήγορα να κρυπτογραφήσετε και να αποκρυπτογραφήσετε αρχεία με μονό δυο πολύ απλές εντολές .
Για να εγκαταστήσετε το ccrypt σε Ubuntu/Mint και παράγωγες διανομές ανοίγετε το τερματικό(μπορείτε να το καλέσετε είτε μέσω dash, αρχίζοντας να γράφετε την λέξη terminal,είτε πατώντας συγχρόνως τα πλήκτρα: Ctrl-Alt-T) και δίνετε την εντολή:
osarena code
1
sudoapt-get installccrypt
Για να κρυπτογραφήσετε το αρχείο θα πρέπει με την εντολή cd να μετακινηθείτε στο φάκελο που βρίσκετε και να δώσετε την εντολή:
osarena code
1
ccrypt file_name
Όπου file_name βάζετε το όνομα του αρχείου και τέλος θα σας ζητηθεί να βάλετε ένα κωδικό κρυπτογράφησης. Το κρυπτογραφημένο αρχείο θα πρέπει να έχει την κατάληξη .cpt.
Για να αποκρυπτογραφήσετε το αρχείο,χρησιμοποιηστε την παρακάτω εντολή και μετά γράψτε το κωδικό που δώσατε πιο πριν:
# Εφόσον όλα τα προηγούμενα έχουν γίνει σωστά τότε θα λάβουμε ένα μήνυμα όπως το παρακάτω:
Κώδικας:
root@pc:/home/user# /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.4...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
ανοίγουμε εναν φυλλομετρητή (κοινος browser)
και πατάμε στο URL localhost
έπειτα για όνομα lampp και τον κωδικό μας
Στην σελίδα όπου θα μας ανοίξει πάμε αριστερά κάτω στα tools και πατάμε το phpmyadmin για να φτιάξουμε την βάση μας.
προσέχουμε να ειναι utf8_general_ci
#παταμε απο το αριστερο μενου την επιλογη mysql
#παλι απο το αριστερο μενου που θα εμφανιστει το db
#απο το κεντρικο μενου το προσθηκη
Σαν host βαζουμε localhost
Db το ονοματης βάσης μας π.χ wordpress
User το ονομα του administator της βασης πχ wordpressadmin
και ολα Υ (yes)
Εκτελεση
Έπειτα και εφόσον ολα εχουν γινει καλα
παταμε απο αριστερα το user
απο επανω παλι το προσθηκη
και βαζουμε παλι
Σαν host βαζουμε localhost
User το ονομα του administator της βασης πχ wordpressadmin που ειχαμε βαλει
Password το Password που θα εχει ο admin της βασης
και Εκτελεση
Τελος με την βάση
8)δημιουργούμε ενα αρχείο με το ονομα wp-config.php απο το παράδειγμα που μας δίνει το wordpress
9)ανοίγουμε το αρχειο με το gedit ωστε να βάλουμε τα στοιχεια της βάσης μας
Κώδικας:
gedit /opt/lampp/htdocs/wordpress/wp-config.php
10) αλλάζουμε αυτά
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here’);/** MySQL database username */
define(‘DB_USER’, ‘username_here’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here’);
σε
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpress’);/** MySQL database username */
define(‘DB_USER’, ‘wordpressadmin’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘123’);
11) κανουμε επανεκκίνηση το xampp
Κώδικας:
/opt/lampp/lampp restart
Τέλος στο url πατάμε localhost/wordpress
βάζουμε τα στοιχειά όπου θέλουμε και ΤΕΛΟΣ
—————————————————————–
#Αν θέλετε να εξελληνίσετε το περιβάλλον μιας εγκατάστασης WordPress ,μπορείτε εγκαθιστώντας ένα μεμονωμένο αρχείο γλώσσας (τύπου MO). Είναι απλό:
ΒΗΜΑ 1ο. Kατεβάστε το αρχείο el.mo ( απο το http://el.wordpress.org/)και βάλτε το στον κατάλογο wp-content/languages της εγκατάστασής σας. — Αν δεν έχει κατάλογο languages στο wp-content, φτιάξτε έναν.
Κώδικας:
mkdir /opt/lampp/htdocs/wordpress/languages
ΒΗΜΑ 2ο. Ανοίξτε το αρχείο wp-config.php του WordPress και αλλάξτε τον ορισμό της γλώσσας. Σε αγγλική εγκατάσταση ο ορισμός ενδέχεται να είναι κενός:
Πρέπει να έχετε συνδεθεί για να σχολιάσετε.