This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
import glob | |
import OpenSSL.crypto | |
import tldextract | |
import pymongo | |
import sys | |
import logging | |
from pymongo.errors import BulkWriteError | |
from datetime import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import operator | |
import logging | |
from datetime import datetime, timedelta, timezone | |
''' | |
Script deletes all backups, except the <x> latest backups, and any backup younger than retirement_age. | |
where <x> is max_backups. | |
If you take daily backups, retirement_age should equal max_backups | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.handler = (event, context, callback) => { | |
//Get contents of response | |
const response = event.Records[0].cf.response; | |
const headers = response.headers; | |
//Set new headers | |
headers['strict-transport-security'] = [{key: 'Strict-Transport-Security', value: 'max-age=63072000'}]; | |
headers['x-content-type-options'] = [{key: 'X-Content-Type-Options', value: 'nosniff'}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo bin/masscan 103.8.144.0/22 103.8.147.0/24 103.8.160.0/22 150.242.180.0/23 150.242.180.0/23 203.217.176.0/22 43.252.232.0/22 103.245.88.0/22 175.28.12.0/22 202.60.56.0/22 203.12.220.0/24 203.62.1.0/24 -p80,443,8000,8001,8008,8880,8080,8081,8443,8998,10000,8888,8800,8050 --banners --source-ip 192.168.0.17 -oJ scan.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import os | |
''' Upload all files + folders in this directory to the <dest_folder> of <bucket_name> | |
also checks the correct mime types to properly display in browsers | |
''' | |
bucket_name = 'govscan.info' | |
dest_folder = 'docs' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import tldextract | |
import logging | |
import time | |
if __name__ == "__main__": | |
# Logging setup | |
logging.basicConfig(filename='logs/virus_total.log', | |
filemode='w', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain | hostname | ip | |
---|---|---|---|
1govnet | 1govserv.1govnet.gov.my | 203.12.220.140 | |
1malaysia | 1malaysia.com.my | 52.84.225.176 | |
mygeoportal | 1malaysiamap.mygeoportal.gov.my | 103.8.160.33 | |
kpkt | 1myc.kpkt.gov.my | 103.8.145.205 | |
treasury | 1pp.treasury.gov.my | 103.8.144.196 | |
akmal | 2u.akmal.gov.my | 43.252.232.178 | |
jkr | 3ps.jkr.gov.my | 43.252.232.157 | |
rurallink | aardo19.rurallink.gov.my | 150.242.181.32 | |
met | abt.met.gov.my | 175.28.14.115 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
state_mapping = { '09': 'Perlis', | |
'02': 'Kedah', | |
'03': 'Kelantan', | |
'11': 'Terengganu', | |
'07': 'Pulau Pinang', | |
'08': 'Perak', | |
'06': 'Pahang', | |
'10': 'Selangor', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
from bs4 import BeautifulSoup | |
import json | |
import pru_14_json # https://calon.spr.gov.my/pru14_json.js | |
import time | |
import csv | |
import operator | |
# Full list of Parlimen seats, :https://calon.spr.gov.my/pru14_json.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
State | Seat ID | Seat Name | Candidate Name | Candidate Ballot Name | Candidate Party | |
---|---|---|---|---|---|---|
Johor | N.01 | BULOH KASAP | ZAHARI BIN SARIP | ZAHARI SARIP | BN | |
Johor | N.01 | BULOH KASAP | NORSAMSU BIN MOHD YUSOF | NORSAMSU MOHD YUSOF | PKR | |
Johor | N.02 | JEMENTAH | CHIAM YOK MENG | CHIAM YOK MENG | BN | |
Johor | N.02 | JEMENTAH | TAN CHEN CHOON | TAN CHEN CHOON | PKR | |
Johor | N.02 | JEMENTAH | KHAIRUL FAIZI BIN AHMAD KAMIL | KHAIRUL FAIZI BIN AHMAD KAMIL | PAS | |
Johor | N.03 | PEMANIS | NORMALA BINTI SUDIRMAN | CIKGU MALA | PAS | |
Johor | N.03 | PEMANIS | CHONG FAT FULL | DR CHONG | PKR | |
Johor | N.03 | PEMANIS | KOO SHIAW LEE | KOO SHIAW LEE | BN | |
Johor | N.04 | KEMELAH | SULAIMAN BIN MOHD NOR | DR SULAIMAN MOHD NOR | PKR |