当我尝试使用const initialImageDimension = { height: 200, width: 500 };
const watermarkDimension = { height: 20, width: 50 };
// uploaded image dimension.
const uploadedImageDimension = { height: 300, width: 600 };
const newWatermarkHeight = ( (watermarkDimension.height * uploadedImageDimension.height) / initialImageDimension.height ) ;
const newWatermarkWidth = ( (watermarkDimension.width * uploadedImageDimension.width) / initialImageDimension.width ) ;
// new watermark dimension
const relativeWatermarkDimension = { height: newWatermarkHeight, width: newWatermarkWidth }
捕获数据包时,将捕获注入的数据包。但是,当我将其更改为int sock_raw = socket( AF_PACKET , SOCK_RAW , htons(ETH_P_ALL));
时,不会捕获注入的数据包。为什么会这样呢?我使用OWASP ZAP工具注入数据包。