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
| tcpdump -v -n -w attack.log dst port 80 -c 250 | |
| tcpdump -nr attack.log |awk '{print $3}' \ | |
| |grep -oE '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}' |sort |uniq -c |sort -rn |head -20 | |
| #!/bin/bash | |
| BLOCKDB="ips.txt" | |
| IPS=$(grep -Ev "^#" $BLOCKDB) | |
| for i in $IPS |
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
| tag = (name, content, attributes) -> | |
| name: name | |
| attributes: attributes | |
| content: content | |
| htmlDoc = (title, bodyContent) -> | |
| tag "html", [tag("head", [tag "title", [title]]), | |
| tag "body", bodyContent] | |
| |
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
| (function(){ | |
| var e = document.createElement('script'); e.type='text/javascript'; | |
| e.async = true; | |
| e.src = document.location.protocol + '//yourdomain.com/packaged_third_party_javascript.js'; | |
| var s = document.getElementsByTagName('script')[0]; | |
| s.parentNode.insertBefore(e, s); | |
| })(); |
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
| create table user ( id serial, ... ); | |
| create table group ( id serial, ... ); | |
| create table topic ( | |
| id serial, | |
| group_id int foreign key group(id) | |
| ); | |
| create table lastread ( | |
| id serial, |
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
| // Calculates the checksum for a sentence | |
| // Calculates the checksum for a sentence | |
| static string getChecksum(string sentence) { | |
| //Start with first Item | |
| int checksum= Convert.ToByte(sentence[sentence.IndexOf('$')+1]); | |
| // Loop through all chars to get a checksum | |
| for (int i=sentence.IndexOf('$')+2 ; i<sentence.IndexOf('*') ; i++){ | |
| // No. XOR the checksum with this character's value | |
| checksum^=Convert.ToByte(sentence[i]); |
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
| from smtplib import SMTP | |
| from email.MIMEText import MIMEText | |
| from email.Header import Header | |
| from email.Utils import parseaddr, formataddr | |
| def send_email(sender, recipient, subject, body): | |
| """Send an email. | |
| All arguments should be Unicode strings (plain ASCII works as well). |
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
| <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> | |
| If you do, then ONLY phone numbers within the following tags will be highlighted: | |
| <!-- sphoneid telnr="+15551234456" fileas="John Smith" -->(555) 1234 456<!-- sphoneid --> | |
| http://forum.skype.com/index.php?showtopic=78380 |
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
| // required: gcc -traditional-cpp pi.c | |
| #define _ -F<00||--F-OO--; | |
| int F=00,OO=00; | |
| main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO() | |
| { | |
| _-_-_-_ | |
| _-_-_-_-_-_-_-_-_ | |
| _-_-_-_-_-_-_-_-_-_-_-_ | |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_ | |
| _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ |
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
| set keymap=russian-jcukenwin | |
| set iminsert=0 | |
| set imsearch=0 | |
| highlight lCursor guifg=NONE guibg=Cyan | |
| :setlocal spell spelllang=ru_yo,en_us | |
| :setlocal spell spelllang=ru_ru,en_us | |
| # use Ctrl-^ to switch |
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
| class AttrDict(dict): | |
| def __getattr__(self, key): | |
| return self[key] | |
| def __setattr__(self, key, value) | |
| self[key] = value |