Compare commits

..

4 Commits

Author SHA1 Message Date
Julien Le Coupanec
8249479622 Merge pull request #328 from biswajitdas-007/javascript
String methods added
2025-11-19 22:47:59 +01:00
Julien Le Coupanec
65ad8bf5d3 Merge pull request #425 from its-coded-coder/master
Add one liner to kill process on port
2025-11-19 22:46:24 +01:00
its-coded-coder
dba33d6681 Add one liner to kill process on port 2025-08-22 19:37:08 +03:00
Biswajit Das
9d8c46566b String methods added 2023-03-18 14:03:03 +05:30
4 changed files with 7 additions and 175 deletions

View File

@@ -95,3 +95,9 @@ arr.reduce(callback[, initialValue]) // Apply a function against
arr.reduceRight(callback[, initialValue]) // Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
arr.some(callback[, initialValue]) // Returns true if at least one element in this array satisfies the provided testing function.
arr.values() // Returns a new Array Iterator object that contains the values for each index in the array.
// String methods
String.charAt(index) // Returns the character at the specified index in a string.
String.indexOf(character) // Returns the index of the first occurrence of a specified value in a string.
String.substring(starting_index, ending_index) // Returns a new string that is a subset of the original string.
String.substring(starting_index) // Returns a substring from starting index to last index of string.

View File

@@ -1,122 +0,0 @@
##############################################################################
# NMAP TARGET DEFINITION
##############################################################################
nmap 10.10.10.1 # Scan one IP
nmap 10.10.10.1 10.10.10.2 # Scan multiple IPs
nmap 10.10.10.10-254 # Scan an IP range
nmap domain.example.com # Scan a domain
nmap 192.168.1.0/24 # Scan using CIDR
nmap -iL list.txt # Scan targets from the file list.txt
nmap -iR 10 # Scan 10 hosts randomly
nmap exclude 10.10.10.1 # Scan but exclude one IP
##############################################################################
# NMAP SCANNING MODES
##############################################################################
nmap 10.10.10.1 -sS # TCP SYN port scan
nmap 10.10.10.1 -sT # TCP connect port scan
nmap 10.10.10.1 -sU # UDP scan
nmap 10.10.10.1 -sA # TCP ACK port scan
nmap 10.10.10.1 -sW # TCP Window port scan
##############################################################################
# NMAP HOST SCAN
##############################################################################
nmap 10.10.10.1-3 -sL # List targets only
nmap 10.10.10.1/24 -sn # Host discovery only.
nmap 10.10.10.1-5 -Pn # Port scan only.
nmap 10.10.10.1-5 -PS22-25,80 # TCP SYN discovery on port 22 to 25 and 80.
nmap 10.10.10.1-5 -PA22,443 # TCP ACK discovery on port 22 and 443.
nmap 10.10.10.1-5 -PU53 # UDP discovery on port 53.
nmap 10.10.10.1-1/24 -PR # ARP discovery
nmap 10.10.10.1 -n # No DNS resolution
##############################################################################
# NMAP PORT SCAN
##############################################################################
nmap 10.10.10.1 -p 22 # Scan port 22
nmap 10.10.10.1 -p 22-80 # Scan a port range
nmap 10.10.10.1 -p U:53,T:22-25,80 # Scan multiple ports UDP and TCP
nmap 10.10.10.1 -p- # Scan all ports
nmap 10.10.10.1 -p http,https # Scan ports based on service name
nmap 10.10.10.1 -F # Scan quickly 100 common ports
nmap 10.10.10.1 top-ports 1000 # Scan the top 1000 ports
##############################################################################
# NMAP DETECTION
##############################################################################
nmap 10.10.10.1 -sV # Attempts to determine the version of the service running on port
nmap 10.10.10.1 -sV version-intensity 8 # Intensity level 0 to 9. Higher number increases possibility of correctness
nmap 10.10.10.1 -sV version-light # Enable light mode. Lower possibility of correctness. Faster
nmap 10.10.10.1 -sV version-all # Enable intensity level 9. Higher possibility of correctness. Slower
nmap 10.10.10.1 -A # Enables OS detection, version detection, script scanning, and traceroute
nmap 10.10.10.1 -O # Remote OS detection using TCP/IP stack fingerprinting
nmap 10.10.10.1 -O osscan-limit # If at least one open and one closed TCP port are not found it will not try OS detection against host
nmap 10.10.10.1 -O osscan-guess # Makes Nmap guess more aggressively
nmap 10.10.10.1 -O max-os-tries 1 # Set the maximum number x of OS detection tries against a target
nmap 10.10.10.1 -A # Enables OS detection, version detection, script scanning, and traceroute
##############################################################################
# NMAP EVASION
##############################################################################
nmap 10.10.10.1 -T0 # Paranoid (0) Intrusion Detection System evasion
nmap 10.10.10.1 -T1 # Sneaky (1) Intrusion Detection System evasion
nmap 10.10.10.1 -T2 # Polite (2) Slows down the scan to use less bandwidth and use less target machine resources
nmap 10.10.10.1 -T3 # Normal (3) Default speed
nmap 10.10.10.1 -T4 # Aggressive (4) Speeds scans
nmap 10.10.10.1 -T5 # Insane (5) Extra Speeds scan
nmap 10.10.10.1 -f # Requested scan (including ping scans) use tiny fragmented IP packets. Harder for packet filters
nmap 10.10.10.1 mtu 32 # Set your own offset size
nmap -D 10.10.10.1,10.10.10.2 # Send scans from multiple IPs
nmap -S www.github.com # Scan Github (-e eth0 -Pn may be required)
nmap -g 53 10.10.10.1 # Use given source port number
nmap proxies http://myproxy:80 10.10.10.1 # Relay connections through HTTP/SOCKS4 proxies
##############################################################################
# NMAP SCRIPTS
##############################################################################
nmap 10.10.10.1 script default # Scan with default NSE scripts.
nmap 10.10.10.1 script=banner # Scan with a single script banner
nmap 10.10.10.1 script=http* # Scan with a wildcard http
nmap 10.10.10.1 script=http,banner # Scan with two scripts http and banner
nmap 10.10.10.1 script “not intrusive” # Scan default, but without intrusive scripts
##############################################################################
# NMAP OUTPUT
##############################################################################
nmap 10.10.10.1 -oN nmap.file # Normal output to the file nmap.file
nmap 10.10.10.1 -oX nmap.file # XML output to the file nmap.file
nmap 10.10.10.1 -oG nmap.file # Grepable output to the file nmap.file
nmap 10.10.10.1 -oA results # Output in the three major formats at once
nmap 10.10.10.1 -oG # Grepable output to screen. -oN
nmap 10.10.10.1 -oN nmap.file append-output # Append a scan to a previous scan file
nmap 10.10.10.1 -v # Increase the verbosity level
nmap 10.10.10.1 -vv # Increase more the verbosity level
nmap 10.10.10.1 -d # Increase debugging level
nmap 10.10.10.1 reason # Display the reason a port is in a particular state
nmap 10.10.10.1 open # Only show open ports
nmap 10.10.10.1 -T4 packet-trace # Show all packets sent and received
nmap iflist # Shows the host interfaces and routes
nmap resume nmap.file # Resume scanning

View File

@@ -1,53 +0,0 @@
##############################################################################
# SNORT SNIFFER MODE
##############################################################################
snort -v # Verbose mode
snort -e # Display the link layer headers
snort -d # Display data payload
snort -X # Display full packet details (HEX)
snort -eX # Display all packet details
snort -v -n 10 # Sniff 'N' number of packets
##############################################################################
# SNORT LOGGER MODE
##############################################################################
Log path is /var/log/snort
snort -v -l /home/user/Desktop # Use another log path
snort-v -K ASCII # Log in the ASCII format
snort -v -r snort.log # Read from snort files
snort -v -r snort.log -n 10 # Read 10 packets from snort files
snort -v -r snort.log tcp # Filter packets for TCP
snort -v -r snort.log udp and port 53 # Filter packets for DNS (UDP:53)
##############################################################################
# SNORT PCAP
##############################################################################
snort -c /etc/snort/snort.conf -q -r example.pcap -A console # Processing one PCAP file
snort -c /etc/snort/snort.conf -q --pcap-list= "example1.pcap example2.pcap" -A console # Processing some PCAP files
snort -c /etc/snort/snort.conf -q --pcap-dir=/home/whereyourpcapis -A console # Processing some PCAP files from a folder
snort -c /etc/snort/snort.conf -q --pcap-list="example1.pcap example2.pcap" -A console --pcap-show # Result the processed PCAP files
##############################################################################
# SNORT IDS - IPS MODE
##############################################################################
snort -c /etc/snort/snort.conf # Use configuration file
snort -c /etc/snort/snort.conf -T # Test instance and configuration file
snort -c /etc/snort/snort.conf -N # Disable logging
snort -c /etc/snort/snort.conf -D # Run snort in background
snort -c /etc/snort/snort.conf -v -A none # Alerting in mode "No output"
snort -c /etc/snort/snort.conf -v -A console # Alerting in mode "Output console"
snort -c /etc/snort/snort.conf -v -A fast # Alerting in mode "Output file resumed"
snort -c /etc/snort/snort.conf -v -A full # Alerting in mode "Output file complete"
snort -c /etc/snort/rules/local.rules -v -A console # Alerting without config file

View File

@@ -21,6 +21,7 @@ cat /proc/<process_id>/maps # Show the current virtual memory usage of a Linux
ip r # Display ip of the server
lsof -i :9000 # List process running on port 9000
kill -9 $(lsof -t -i:PORT) # Kill the process running on whichever port specified
journalctl -u minio.service -n 100 --no-pager # List last 100 logs for specific service