一次自动化发现攻击脚本且调用前端页面快速下发配置项目的随笔_html/css_WEB-ITnose
一次自动化发现攻击脚本且调用前端页面快速下发配置项目的个人笔记,服务器脚本部分主要是根据syslog来发现攻击特征然后格式化输出到网页,做各种判断后通知且通过php手动(自动)下发配置,都是一些判断循环啥的,就不贴了。
这里主要是记一些制作前端html网页和后端php页面交互的一些有用的代码
html部分:
声明是html5网页
html格式
可视化主体 是文字标题 123456字号从大到小 是文字段落 加粗字体 图片
是提交按钮
是在html里调用php变量
在
里添加用于显示中文在
里添加用于自动刷新调用javascript来当跳转按钮
style="margin-left:1200px;" 绝对位置属性样式
name= name属性来表示哪个元素 不要用id,虽然唯一但有时取不到值
style='background-color:red' 背景色
框架,网页中嵌入网页
换行
水平线 注释
背景音自动播放
php部分:
$_REQUEST
php中$_REQUEST可以获取以POST方法和GET方法提交的数据,但是速度比较慢
$_GET
用来获取由浏览器通过GET方法提交的数据。GET方法他是通过把参数数据加在提交表单的action属性所指的URL中,值和表单内每个字段一一对应,然后在URL中可以看到,但是有如下缺点: 安全性不好,在URL中可以看得到。传送数据量较小,不能大于2KB。
$_POST (推荐使用)
用来获取由浏览器通过POST方法提交的数据。POST方法他是通过HTTP POST机制,将表单的各个字段放置在HTTP HEADER内一起传送到action属性所指的URL地址中,用户看不到这个过程。他提交的大小一般来说不受限制,但是具体根据服务器的不同,还是略有不同。相对于_GET方式安全性略高
$_SERVER['PHP_AUTH_USER'] 获取用户名
$_SERVER['PHP_AUTH_PASSWD'] 获取密码
header("Location: jk.php"); 放到
exit; 跳转后不读后面的代码
php里按钮动作
if($_POST['提交按钮值']==“提交按钮值”){
判断提交按钮按下后执行php
}
・・ 数字1边上的引号 是php里执行shell命令的结果
system(“shell命令”,$retval) 执行shell命令并直接输出结果到网页(不用echo),返回执行状态成功true,否则false
system()等函数要等到这个命令运行完才返回(实际上是要等命令的输出结果),这肯定会引起PHP脚本的超时。解决的办法是 把命令的输出重定向到另外一个文件或流中,如:system("/usr/local/bin/order_proc > /tmp/null &");
passthru() 执行命令并直接输出结果到网页(不用echo),一般用来输出图片

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...
