Skip to content
View nvqna's full-sized avatar

Block or report nvqna

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. suballocator suballocator Public

    Memory suballocator written in C.

    C

  2. mount and ls -al a list of open nfs ... mount and ls -al a list of open nfs shares
    1
    for i in $(cat nfs-open.txt); do echo $i >> /all-nfs.out; mount -t nfs $i /mnt/; ls -al /mnt/*/* >> all-nfs.out; umount /mnt/;  done
    2
    
                  
  3. server-status-one-line.sh server-status-one-line.sh
    1
    echo ""; echo "Server Status One-liner"; echo ""; echo "Storage: "; df -h | sed -n '2,2p' | awk '{print "Disk:",$3"/"$2,$5}'; df -i | sed -n '2,2p' | awk '{print "Inodes:",$3"/"$2,$5}'; echo ""; echo "Load Average: "; cat /proc/loadavg; echo -ne "Thread Count: "; cat /proc/cpuinfo | grep processor | wc -l; echo ""; echo "Usage: "; mpstat | tail -2; echo ""; echo "Memory: "; free -m; echo ""; echo "Vmstat: "; vmstat; echo ""; echo "Services: ";ps cax | grep mysqld > /dev/null; if [ $? -eq 0 ]; then echo "mysql is running"; else echo "mysql is not running"; fi; ps cax | grep httpd > /dev/null; if [ $? -eq 0 ]; then echo "httpd is running"; else echo "httpd is not running"; fi; ps cax | grep exim > /dev/null; if [ $? -eq 0 ]; then echo "exim is running"; else echo "exim is not running"; fi; ps cax | grep named > /dev/null; if [ $? -eq 0 ]; then echo "named is running"; else echo "named is not running(Are they root?)"; fi; ps cax | grep pure-ftpd > /dev/null; if [ $? -eq 0 ]; then echo "ftpd is running"; else echo "ftpd is not running"; fi; ps cax | grep courier > /dev/null; if [ $? -eq 0 ]; then echo "courier is running"; else echo "courier is not running"; fi; netstat -tunap | grep -v 0.0.0.0 | awk '/.*[0-9]+.[0-9]+.[0-9]+.[0-9].*/{gsub(/::ffff:/,"",$0);print $4"\t" $5 "\t" $6"\t" $7}' | awk -F"/" '{print $1"\t"$2}' > netstat.log; echo ""; echo "Connections:";echo "Number of connections to each port:";cat netstat.log | awk {'print $1'} | cut -d: -f 2 | sort | uniq -c | sort -nk 1;echo;echo "Number of connections from each IP:";cat netstat.log | awk {'print $2'} | cut -d: -f 1 | sort | uniq -c | sort -nk 1;echo;echo "Number of instances of a particular IP connecting to particular port with connection states:";cat netstat.log | awk -F":" {'print $2 "\t" $3'} | awk {'print $1 "\t" $2 "\t" $4 "\t" $6'} | sort | uniq -c | sort -nk 1;echo;echo "SYN_RECV connections:";cat netstat.log | awk -F":" {'print $2 "\t" $3'} | awk {'print $1 "\t" $2 "\t" $4 "\t" $6'} | sort | uniq -c | sort -nk 1 | grep SYN_RECV; echo "Most CPU Intensive:"; ps auxf | sort -nr -k 3 | head -2;echo; echo "Most Memory Intensive:"; ps auxf | sort -nr -k 4 | head -2;
  4. connections-by-ips.sh connections-by-ips.sh
    1
    netstat -tunap | grep -v 0.0.0.0 | awk '/.*[0-9]+.[0-9]+.[0-9]+.[0-9].*/{gsub(/::ffff:/,"",$0);print $4"\t" $5 "\t" $6"\t" $7}' | awk -F"/" '{print $1"\t"$2}' > netstat.log; echo ""; echo "Connections:";echo "Number of connections to each port:";cat netstat.log | awk {'print $1'} | cut -d: -f 2 | sort | uniq -c | sort -nk 1;echo;echo "Number of connections from each IP:";cat netstat.log | awk {'print $2'} | cut -d: -f 1 | sort | uniq -c | sort -nk 1;echo;echo "Number of instances of a particular IP connecting to particular port with connection states:";cat netstat.log | awk -F":" {'print $2 "\t" $3'} | awk {'print $1 "\t" $2 "\t" $4 "\t" $6'} | sort | uniq -c | sort -nk 1;echo;echo "SYN_RECV connections:";cat netstat.log | awk -F":" {'print $2 "\t" $3'} | awk {'print $1 "\t" $2 "\t" $4 "\t" $6'} | sort | uniq -c | sort -nk 1 | grep SYN_RECV;
  5. Command to identify potential printf... Command to identify potential printf format string vulnerabilities.
    1
    #!/bin/sh
    2
    grep 'printf([a-zA-Z]*)' *.c
  6. perl-2-python perl-2-python Public

    Script to convert (basic) perl code to python.

    Perl 1