This file contains 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
# Exploit Title: Schneider Electric Modicon M340 Buffer Overflow Vulnerability | |
# Google Dork: [if applicable] | |
# Date: 2020/5/21 | |
# Exploit Author: ssdemajia | |
# Vendor Homepage: http://download.schneider-electric.com/files?p_Doc_Ref=SEVD-2015-344-01 | |
# Version: BMXNOC0401 December 15, 2015, | |
# BMXNOE0100 (H) December 15, 2015, | |
# BMXNOE0110 (H) December 15, 2015, | |
# BMXNOR0200 (H) January 16, 2016, | |
# BMXP342020 January 16, 2016, |
This file contains 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 getRandom(low, up) { | |
// 获得包括low和up范围内的随机整数 | |
var nums = up - low + 1; | |
return Math.floor(Math.random() * nums + low); // Math.floor向下取整 , 2.6 = 2 | |
} |
This file contains 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
# coding:utf-8 | |
class Node: | |
def __init__(self, prev=None, nex=None, val=None): | |
self.prev = prev | |
self.next = nex | |
self.val = val | |
class DoubleLinkList: | |
def __init__(self): |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div class="container"> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="drag"> |
This file contains 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 Node: | |
def __init__(self, prev=None, nex=None, val=None): | |
self.prev = prev | |
self.next = nex | |
self.val = val | |
class DoubleLinkList: | |
def __init__(self): | |
self.head = Node() |
This file contains 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 bind(func, obj) { | |
return function() { | |
return func.apply(obj, arguments); | |
}; | |
} | |
// 使用 | |
// 比如一开始有一个函数 | |
function foo(something) { | |
console.log(this.a, something); | |
return this.a + something; |
This file contains 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 functools import wraps | |
def coroutine(func): | |
""" | |
装饰器,用来预激活协程,协程用之前需要用next来激活 | |
""" | |
@wraps(func) | |
def primer(*args, **kwargs): | |
gen = func(*args, **kwargs) | |
next(gen) # 激活 |
NewerOlder