PWN题写出exp拿不到权限 Got EOF while sending in interactive

上次写了个超级简单的PWN题,执行自己写的exp却拿不到权限,出现了下面这种情况
在这里插入图片描述
Got EOF while sending in interactive
当时以为是这个pwn题程序本身的问题,后来发现是自己的payload写错了。
没有拿到权限,所以用ls查看文件无效,直接退出
以后再出现这样的问题的时候,就可以知道是自己的exp写错了
PS:我是个菜鸡,大佬勿喷

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
好的,以下是用VHDL语言编写的电动智能巡线两轮小车电机PWM调速代码,其中包括顶层实体和PWM模块: 1. 顶层实体代码: ```vhdl entity car_controller is port ( clk : in std_logic; rst : in std_logic; sensor_out : in std_logic_vector(1 downto 0); motor1_duty : out std_logic_vector(7 downto 0); motor2_duty : out std_logic_vector(7 downto 0) ); end entity; architecture rtl of car_controller is signal pwm1_duty : std_logic_vector(7 downto 0); signal pwm2_duty : std_logic_vector(7 downto 0); begin pwm1 : entity work.pwm(8) -- PWM模块的实例化 port map ( clk => clk, rst => rst, duty => pwm1_duty, pwm_out => motor1_duty ); pwm2 : entity work.pwm(8) -- PWM模块的实例化 port map ( clk => clk, rst => rst, duty => pwm2_duty, pwm_out => motor2_duty ); process(clk, rst, sensor_out) begin if rst = '1' then pwm1_duty <= (others => '0'); pwm2_duty <= (others => '0'); elsif rising_edge(clk) then case sensor_out is when "00" => -- 直行 pwm1_duty <= "10101010"; -- 设置左轮占空比为50% pwm2_duty <= "10101010"; -- 设置右轮占空比为50% when "01" => -- 左转 pwm1_duty <= "01010101"; -- 设置左轮占空比为25% pwm2_duty <= "10101010"; -- 设置右轮占空比为50% when "10" => -- 右转 pwm1_duty <= "10101010"; -- 设置左轮占空比为50% pwm2_duty <= "01010101"; -- 设置右轮占空比为25% when others => -- 停止 pwm1_duty <= (others => '0'); pwm2_duty <= (others => '0'); end case; end if; end process; end architecture; ``` 2. PWM模块代码: ```vhdl entity pwm is generic ( width : natural := 8 ); port ( clk : in std_logic; rst : in std_logic; duty : in std_logic_vector(width-1 downto 0); pwm_out : out std_logic ); end entity; architecture rtl of pwm is signal counter : unsigned(width-1 downto 0); signal pwm : std_logic; begin process(clk, rst) begin if rst = '1' then counter <= (others => '0'); pwm <= '0'; elsif rising_edge(clk) then if counter = to_unsigned(0, width) then counter <= to_unsigned(255, width); pwm <= '1'; else counter <= counter - 1; pwm <= '0'; end if; end if; end process; pwm_out <= pwm and duty(width-1); end architecture; ``` 以上代码实现了基于巡线传感器的智能小车电机PWM调速功能,其中`car_controller`为顶层实体,根据巡线传感器输信号来控制左右轮电机PWM占空比,从而实现小车的转向。`pwm`模块实现了PWM波形的产生,其中计数器`counter`在每一个PWM周期中从最大值倒计数到0,当计数器为0时,PWM输为高电平,否则为低电平。`duty`为占空比输入,控制PWM波形的高电平持续时间。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值