Skip to content

Instantly share code, notes, and snippets.

View sundaysec's full-sized avatar
🎯
Focusing

PHILEMON SUNDAY JOEL sundaysec

🎯
Focusing
View GitHub Profile
@huangzhichong
huangzhichong / selenium-webdriver-cheatsheet.md
Created August 7, 2012 12:38
Selenium Webdriver CheatSheet

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
@phuesler
phuesler / netcat_tcp_server.sh
Last active October 7, 2024 14:15
Simple tcp server using netcat
#!/bin/bash
# Simple tcp server using netcat
# - depending on the netcat version either use nc -l 5555 or nc -l -p 5555
# - verify with `telnet locahhost 5555`
# - quit the telnet with `ctrl-]` and then type quit
# - the while loop is there so reopen the port after a client has disconnected
# - supports only one client at a time
PORT=5555;
while :; do nc -l -p $PORT | tee output.log; sleep 1; done
@keithweaver
keithweaver / domain-to-aws-ec2-instance.md
Created March 20, 2017 23:49
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
@sundaysec
sundaysec / firewall.sh
Created August 5, 2018 08:29
DHCP and DNS server firewall
#!/bin/sh
# Compiled for iptables (any version)
#
# Similar to fw 1, but the firewall is used as DHCP and DNS server for internal network.
# This firewall has two interfaces. Eth0 faces outside and has a dynamic address; eth1 faces inside.
# Policy includes basic rules to permit unrestricted outbound access and anti-spoofing rules. Access to the firewall is permitted only from internal network and only using SSH. The firewall can send DNS queries to servers out on the Internet. Another rule permits DNS queries from internal network to the firewall. Special rules permit DHCP requests from internal network and replies sent by the firewall.