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
| <?php | |
| // https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html | |
| // dd if=/dev/zero bs=1M count=10240 | gzip > 10G.gzip | |
| $agent = lower($_SERVER['HTTP_USER_AGENT']); | |
| //check for nikto, sql map or "bad" subfolders which only exist on wordpress | |
| if (strpos($agent, 'nikto') !== false || strpos($agent, 'sqlmap') !== false || startswith($url,'wp-') || startswith($url,'wordpress') || startswith($url,'wp/')) | |
| { | |
| sendBomb(); |
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
| upstream odoo-server { | |
| server 0.0.0.0:8069; | |
| } | |
| upstream odoo-server-im { | |
| server 0.0.0.0:8072 weight=1 fail_timeout=0; | |
| } | |
| server { |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include "vector.h" | |
| void vector_init(vector *v) | |
| { | |
| v->data = NULL; | |
| v->size = 0; |
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 MyAdmin(admin.ModelAdmin): | |
| def has_delete_permission(self, request, obj=None): | |
| return False | |
| def get_actions(self, request): | |
| actions = super(MyAdmin, self).get_actions(request) | |
| if 'delete_selected' in actions: | |
| del actions['delete_selected'] | |
| return actions |
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 pandas as pd | |
| # Register your models here. | |
| def export_to_excel(modeladmin, request, queryset): | |
| response = HttpResponse(content_type="application/xls") | |
| data = serializers.serialize("json", queryset, stream=response) | |
| data = json.loads(data.decode("utf-8")) | |
| data = [i['fields'] for i in data] | |
| data = pd.DataFrame(data) | |
| data = data.fillna('空') |
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 socket, sys, os | |
| print "][ Attacking " + sys.argv[1] + " ... ][" | |
| print "injecting " + sys.argv[2]; | |
| def attack(): | |
| #pid = os.fork() | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect((sys.argv[1], 80)) | |
| print ">> GET /" + sys.argv[2] + " HTTP/1.1" | |
| s.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n") | |
| s.send("Host: " + sys.argv[1] + "\r\n\r\n"); |
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
| <input type="text" id="key"/><input type="url" id="url"/><button onclick="set()">Add</button> | |
| <div id="result"></div> | |
| <script language="javascript"> | |
| function set() | |
| { | |
| var key = document.getElementById('key').value; | |
| //大小写转换 | |
| if(key <= 'z' && key >= 'a') | |
| key = String.fromCharCode(key.charCodeAt() - 32); | |
| localStorage[key] = document.getElementById('key').value; |
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
| <script language="javascript"> | |
| //测试 | |
| //localStorage['B'] = "http://baidu.com"; | |
| //控制器 | |
| function keyDown(cmd) | |
| { | |
| var keycode = cmd.which; | |
| var real = String.fromCharCode(cmd.which); | |
| //open URL! | |
| //模型 |
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
| <?php | |
| $str='<title>Our Demo RSS</title> <link>http://www.tracypeterson.com/RSS/RSS.php</link> | |
| <description>A Test RSS</description> | |
| <language>en-us</language> | |
| <pubDate>$now</pubDate> | |
| <lastBuildDate>$now</lastBuildDate> | |
| <docs>http://someurl.com</docs> <managingEditor>you@youremail.com</managingEditor> <webMaster>you@youremail.com</webMaster>'; | |
| preg_match_all('/tle>(.*)</', $str, $v[0]); | |
| preg_match_all('/ocs>(.*)</', $str, $v[1]); | |
| preg_match_all('/ion>(.*)</', $str, $v[2]); |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| int n,j=30,tmp=1; | |
| long long hash[30];//注意长度 | |
| hash[1]=1;//计算后储存 | |
| for(n=2;n<30;n++) | |
| { | |
| tmp=(tmp+1)*2; | |
| hash[n]=tmp; |
NewerOlder