Bash and Citrix workspace: Difference between pages

From Piszczynski
(Difference between pages)
m (6 revisions imported)
 
piszczynski>Aleks
 
Line 1: Line 1:
==Handy Bash commands==
1. Force the system to check all file systems at boot:


sudo touch /forcefsck
== Citrix Workspace ==


==Supported Ciphers==
These are the SSL ciphers supported by the current version of citrix workspace 23.5.0.78(2305)


2. Use cat to create or append text files;
- taken from HELLO packet sent to citrix gateway on netscaler
 
<pre>
cat > myfile.txt
Cipher Suites (16 suites)
— Creates small text file. Use Ctrl+D to send text to file.
                Cipher Suite: Reserved (GREASE) (0x6a6a)
 
                Cipher Suite: TLS_AES_128_GCM_SHA256 (0x1301)
cat >> myfile.txt
                Cipher Suite: TLS_AES_256_GCM_SHA384 (0x1302)
— Appends lines to bottom of pre-existing file.
                Cipher Suite: TLS_CHACHA20_POLY1305_SHA256 (0x1303)
 
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)
 
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)
3. Use pushd and popd to put move directories on and off of a stack.
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (0xc02c)
 
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)
pushd /directory
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca9)
— Moves to new directory.
                Cipher Suite: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca8)
 
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)
popd
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)
— brigs you back to original directory
                Cipher Suite: TLS_RSA_WITH_AES_128_GCM_SHA256 (0x009c)
 
                Cipher Suite: TLS_RSA_WITH_AES_256_GCM_SHA384 (0x009d)
 
                Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
4. Open new root bash environment:
                Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA (0x0035)
 
</pre>
sudo bash
— Use “exit” to return to your onw shell.
 
 
5. Make bash execute one command as root:
 
sudo bash -c “echo ‘QT_QPA_PLATFORMTHEME=gtk2’ >> /etc/environment”
— Note: “sudo echo” at a command prompt will not work.
 
 
6. Use wget to download files from the internet:
 
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
— Downloads Google Chrome installer package into the current directory.
 
 
7. Automaticallly look for and install packages in a script:
 
dpkg -l | grep -qw gdebi || sudo apt-get install -yyq gdebi
— Install gdebi packaage if it is not already installed.
 
 
8. Hide your cursor:
 
tput civis
— Hides cursor.
 
tput cnorm
— Brings cursor back.
 
 
9. Fix a terminal that’s gone crazy:
 
. .profile
— Reloads your environment.
 
reset
— resets the terminal completely.
 
 
9. Find a command in history:
 
Ctrl+R
— Activates history search: Start typing to search for text.
Pressing enter without typing will exit search.
 
— Note: Pessing Ctrl+S will turn off input and output from X!
Press Ctrl+Q to turn it nack on.
 
 
10. String commands together at promt as they would run in a script:
 
command 1; commnad 2; commnad 3; …
— Runs one command after another regardless of any command’s exit code.
 
 
11. Change file permissions on entire directory of files:
 
find /path/to/directory -type f -exec chmod 644 {} \;
— Note: Changing “type -f” to “type -d” will do the same for all directories
in the specified directory.
 
 
12. Using ranges in commands:
 
/bin/df -h /dev/sd[a-z][1-9] 2>/dev/null
— Lists only drive partitions when running the df command.
 
mkdir test{01..10}
— Creates 10 numbered directories.
 
 
13. Catching and dumping unwanted keyboard input (Percy’s patch):
 
long-running-command; read -t 1 -n 10000 discard
 
14: Make bash script executable
 
chmod 555 <filename>
 
==Find Command==
 
Use find to get files of a 1033 bytes size that are not executable:
*find . -type f -size 1033c ! -executable
 
==Text Tools==
===Grep===
 
Use Grep command to find strings in text. Useful for finding matches in logs etc:
 
Find and print the line containing the word:
*grep <string to match> <file>
 
can use the -n option to show line number
 
can use the -m option to stop after a number of matches
 
use -o to only return matches to the string
 
use -a to treat binary file as text
 
===uniq===
Use to find unique lines or strings in text
 
Pipe text into command to get info, eg to get only unique occurances:
*cat <textfile> | sort | uniq -u

Revision as of 17:51, 14 June 2023

Citrix Workspace

Supported Ciphers

These are the SSL ciphers supported by the current version of citrix workspace 23.5.0.78(2305)

- taken from HELLO packet sent to citrix gateway on netscaler

Cipher Suites (16 suites)
                Cipher Suite: Reserved (GREASE) (0x6a6a)
                Cipher Suite: TLS_AES_128_GCM_SHA256 (0x1301)
                Cipher Suite: TLS_AES_256_GCM_SHA384 (0x1302)
                Cipher Suite: TLS_CHACHA20_POLY1305_SHA256 (0x1303)
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xc02b)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f)
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (0xc02c)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)
                Cipher Suite: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca9)
                Cipher Suite: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca8)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013)
                Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014)
                Cipher Suite: TLS_RSA_WITH_AES_128_GCM_SHA256 (0x009c)
                Cipher Suite: TLS_RSA_WITH_AES_256_GCM_SHA384 (0x009d)
                Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
                Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA (0x0035)