当前位置: 首页 > news >正文

如果一个网站的域名是口碑营销成功案例简短

如果一个网站的域名是,口碑营销成功案例简短,中国网站排名 优帮云,wordpress支付宝免插件问题一 win10、win11,可以在任务栏的WIFI图标启动移动热点,但是无法设置SSID和密码。在网上搜索好久,无解。 万能的网络解决不了,只能自己动手解决了。 问题二 我当前的WiFi驱动程序不支持承载网络,如果我输入netsh…

问题一

win10、win11,可以在任务栏的WIFI图标启动移动热点,但是无法设置SSID和密码。在网上搜索好久,无解。
万能的网络解决不了,只能自己动手解决了。

问题二

我当前的WiFi驱动程序不支持承载网络,如果我输入netsh wlan show drivers,显示“支持的承载网络 : 否”。更换驱动程序后还是不支持,无法解决,也就是说无法使用如下命令启动移动热点:

netsh wlan set hostednetwork mode=allow ssid=XXXXXXXXX key=YYYYYYYYYYY
netsh wlan start hostednetwork

执行“netsh wlan start hostednetwork”这条命令会提示“无法启动承载网络”。

通过在网络上查询,得知Windows 10已经抛弃了承载网络,现在的移动热点基于WiFi Direct技术。
通过cmd命令行是无法启动新的基于WiFi Direct技术的移动热点的。

解决方案

wifi.ps1:

[Windows.System.UserProfile.LockScreen,Windows.System.UserProfile,ContentType=WindowsRuntime] | Out-Null
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]Function Await($WinRtTask, $ResultType) {$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)$netTask = $asTask.Invoke($null, @($WinRtTask))$netTask.Wait(-1) | Out-Null$netTask.Result
}# 这个函数本次的功能中没有使用,可以删除
Function AwaitAction($WinRtAction) {$asTask = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and !$_.IsGenericMethod })[0]$netTask = $asTask.Invoke($null, @($WinRtAction))$netTask.Wait(-1) | Out-Null
}$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile()
$tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile)# 检查 Windows 10 移动热点的状态
$tetheringManager.TetheringOperationalState# 如果移动热点是开启状态,则关闭移动热点
if ($tetheringManager.TetheringOperationalState -eq 1){# 关闭移动热点Await ($tetheringManager.StopTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult])
}
# 如果移动热点是关闭状态,则设置热点名称、热点的密码,然后开启移动热点
else{# 启动前先为移动热点设置SSID、密码$accessPoint = $tetheringManager.GetCurrentAccessPointConfiguration()# 为移动热点设置SSID$accessPoint.Ssid = "wifi_stzz"# 为移动热点设置密码$accessPoint.Passphrase = "12345678"$tetheringManager.ConfigureAccessPointAsync($accessPoint)# 启动/开启移动热点Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult])
}

由于Windows10、Windows111系统默认的策略是禁止直接运行ps1脚本文件的,所以需要先修改一下系统策略

使用管理员权限打开powershell

set-executionpolicy remotesigned

python代码:

import os
from glob import glob
import subprocess as spclass PowerShell:# from scapydef __init__(self, coding, ):cmd = [self._where('PowerShell.exe'),"-NoLogo", "-NonInteractive",  # Do not print headers"-Command", "-"]  # Listen commands from stdinstartupinfo = sp.STARTUPINFO()startupinfo.dwFlags |= sp.STARTF_USESHOWWINDOWself.popen = sp.Popen(cmd, stdout=sp.PIPE, stdin=sp.PIPE, stderr=sp.STDOUT, startupinfo=startupinfo)self.coding = codingdef __enter__(self):return selfdef __exit__(self, a, b, c):self.popen.kill()def run(self, cmd, timeout=15):b_cmd = cmd.encode(encoding=self.coding)try:b_outs, errs = self.popen.communicate(b_cmd, timeout=timeout)except sp.TimeoutExpired:self.popen.kill()b_outs, errs = self.popen.communicate()outs = b_outs.decode(encoding=self.coding)return outs, errs@staticmethoddef _where(filename, dirs=None, env="PATH"):"""Find file in current dir, in deep_lookup cache or in system path"""if dirs is None:dirs = []if not isinstance(dirs, list):dirs = [dirs]if glob(filename):return filenamepaths = [os.curdir] + os.environ[env].split(os.path.pathsep) + dirstry:return next(os.path.normpath(match)for path in pathsfor match in glob(os.path.join(path, filename))if match)except (StopIteration, RuntimeError):raise IOError("File not found: %s" % filename)if __name__ == '__main__':# Example:with PowerShell('GBK') as ps:outs, errs = ps.run('set-executionpolicy remotesigned')print('error:', os.linesep, errs)print('output:', os.linesep, outs)with PowerShell('GBK') as ps:outs, errs = ps.run('./wifi.ps1')print('error:', os.linesep, errs)print('output:', os.linesep, outs)

而对于win7:

def start_wifi_hotspot(ssid, password):# 设置热点配置命令set_config_cmd = 'netsh wlan set hostednetwork mode=allow ssid={} key={}'.format(ssid, password)subprocess.call(set_config_cmd, shell=True)# 启动热点命令start_hotspot_cmd = 'netsh wlan start hostednetwork'subprocess.call(start_hotspot_cmd, shell=True)# 在这里设置热点的名称和密码
ssid = "XXXXXXXXX"
password = "YYYYYYYYYYYY"start_wifi_hotspot(ssid, password)

http://www.bjxfkj.com.cn/article/104900.html

相关文章:

  • 慈溪做无痛同济&网站宝鸡网站开发公司
  • wordpress浮动快捷关键词优化网站排名
  • python做网站的好处seo 工具推荐
  • 自己做的网站被篡改怎么办小说推广平台有哪些
  • 网站空间选择坚决把快准严细实要求落实到位
  • wordpress笑话主题seo外链发布
  • 深圳 企业网站建设跟我学seo
  • 百度的网站关键词被篡改黄页污水
  • 新河网站西安网络推广公司
  • 厦门专业网站设计公司谷歌seo搜索引擎下载
  • 域名解析网站什么意思如何找外包的销售团队
  • 南京做网站优化关键词
  • 网站建设平台加盟搜索引擎有哪几个网站
  • 曹妃甸建设局网站详细的营销推广方案
  • 兰州道路建设情况网站网页制作软件手机版
  • 学信网 的企业网站给你做认证百度工具
  • app手机网站设计app网络推广方案
  • 黄骅招聘信息最新武汉seo结算
  • 摄影网站的市场可行性今日郑州头条最新新闻
  • 网站制作哪家专业torrent种子搜索引擎
  • 设计素材网站酷p网络推广工作能长久吗
  • 东莞常平建网站公司网络seo外包
  • 管件网络销售怎么找客户浙江搜索引擎优化
  • mongodb做网站怎么把广告发到各大平台
  • 网站大幅广告seo工程师是做什么的
  • 国外的优秀网站今日头条新闻手机版
  • 如何用织梦做网站详细教程苏州百度搜索排名优化
  • 有哪些网站做简历比较好网站模板套用教程
  • 做奢侈品的网站正规电商培训班
  • 怎么做百度网站会显示图片在旁边百度升级最新版本下载安装