From 1fd2bfab839e9a81b935746b44b9b30665886a5e Mon Sep 17 00:00:00 2001 From: gunboy001 Date: Sat, 3 Nov 2018 15:50:23 +0100 Subject: [PATCH] removed duplicate and general formatting --- linux_general.txt | 84 ++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/linux_general.txt b/linux_general.txt index 24998ba..19a9aa0 100644 --- a/linux_general.txt +++ b/linux_general.txt @@ -189,62 +189,58 @@ modify the conf. file at /etc/systemd/logind.conf or /etc/systemd/logind.conf.d/*.conf - -To get the windows product key execute with admin privileges: wmic path softwarelicensingservice get OA3xOriginalProductKey +-To get the windows product key execute with admin privileges: wmic path softwarelicensingservice get OA3xOriginalProductKey - -Use mitmf or ettercap to start mitm then use ferret to capture cookies (ferret -i eth0) - use hamster to set session cookies and then in browser set the proxy settings to manual giving the address - provided by hamster and finally open that link +-Use mitmf or ettercap to start mitm then use ferret to capture cookies (ferret -i eth0) + use hamster to set session cookies and then in browser set the proxy settings to manual giving the address + provided by hamster and finally open that link - -Example usage of mitmf: sudo mitmf --arp --spoof --gateway 192.168.1.1 --target 192.168.1.10 -i wlan0 +-Example usage of mitmf: sudo mitmf --arp --spoof --gateway 192.168.1.1 --target 192.168.1.10 -i wlan0 - -IP forwarding: "https://wiki.archlinux.org/index.php/Internet_sharing_(Italiano)" more precisely: - "echo 1 > /proc/sys/net/ipv4/ip_forward" thank me later +-IP forwarding: "https://wiki.archlinux.org/index.php/Internet_sharing_(Italiano)" more precisely: + "echo 1 > /proc/sys/net/ipv4/ip_forward" thank me later - -To restart network interfaces: "ifdown " "ifup " "/etc/init.d/networking restart" - (tested working on Ubuntu server and Debian) +-To restart network interfaces: "ifdown " "ifup " "/etc/init.d/networking restart" + (tested working on Ubuntu server and Debian) - -If airmon-ng doesn't work use "ifconfig down" then "iwconfig mode monitor" and finally - "ifconfig up" +-If airmon-ng doesn't work use "ifconfig down" then "iwconfig mode monitor" and finally + "ifconfig up" - -To note that "iwconfig" and "ifconfig" are basically equivalent, iwconfig can be used as "iwconfig " - to mask just one interface and it gives more information like the status and mode (managed, monitor) +-To note that "iwconfig" and "ifconfig" are basically equivalent, iwconfig can be used as "iwconfig " + to mask just one interface and it gives more information like the status and mode (managed, monitor) - -To fix arduino permissions "ls -la /dev/tty*" and see which group TTYs are in, then add yourself to that group: - "usermod -a -G examplegroup exampleusername" source in: https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/ - or just use "$USER" to add current user +-Who are you? "whoami" - -Who are you? "whoami" +-Where am I? "groups" - -Where am I? "groups" +-To add executables you have to add them to your $PATH, example: "export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin" + "https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path" + or from "https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere" + quote "If you just type export PATH=$PATH: at the command line it will only last for the length of the session. + If you want to change it permanently add export PATH=$PATH: (the bin/ folder) to your ~/.bashrc file (just at the end is fine)." - -To add executables you have to add them to your $PATH, example: "export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin" - "https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path" - or from "https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere" - quote "If you just type export PATH=$PATH: at the command line it will only last for the length of the session. - If you want to change it permanently add export PATH=$PATH: (the bin/ folder) to your ~/.bashrc file (just at the end is fine)." +-To check system logs use "journalctl" (you must have systemctl), some guides: + https://wiki.archlinux.org/index.php/Systemd#Journal + https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs - -To check system logs use "journalctl" (you must have systemctl), some guides: - https://wiki.archlinux.org/index.php/Systemd#Journal - https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs +-https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ - -https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ +-To create a systemd (systemctl) service (aka how to make a program start at boot): + create a file under /etc/systemd/system/ and call it .service + then follow the formatting { + [Unit] + Description=PowerTOP auto tune - -To create a systemd (systemctl) service (aka how to make a program start at boot): - create a file under /etc/systemd/system/ and call it .service - then follow the formatting { - [Unit] - Description=PowerTOP auto tune + [Service] + Type=idle # Not necessary + Environment="TERM=dumb" # Not necessary + ExecStart="PATHTOEXECUTABLE --OPTIONS" - [Service] - Type=idle # Not necessary - Environment="TERM=dumb" # Not necessary - ExecStart="PATHTOEXECUTABLE --OPTIONS" - - [Install] - WantedBy=multi-user.target - } - And then enable it using "systemctl whatever.service enable", here are some guides and references: - https://askubuntu.com/questions/112705/how-do-i-make-powertop-changes-permanent - https://wiki.archlinux.org/index.php/powertop - https://askubuntu.com/questions/919054/how-do-i-run-a-single-command-at-startup-using-systemd + [Install] + WantedBy=multi-user.target + } + And then enable it using "systemctl whatever.service enable", here are some guides and references: + https://askubuntu.com/questions/112705/how-do-i-make-powertop-changes-permanent + https://wiki.archlinux.org/index.php/powertop + https://askubuntu.com/questions/919054/how-do-i-run-a-single-command-at-startup-using-systemd