批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程
[批处理文件精品]批处理版照片整理器[批处理文件精品]纯批处理备份&还原驱动在线第三方下载
返回列表 发帖

[特效代码] bat自动登录群晖

bat自动登录群晖
要分发群晖共享文件夹给一群老年的小白用,我想搞个bat,双击运行并自动输入帐号和密码,查了一下,可以用curl进行登录输入。这个bat怎么写呢???


群晖登录面页源码:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11" />
<meta name="msapplication-TileImage" content="resources/images/icon_tile.png?v=4398" />
<meta name="application-name" content="dms&nbsp;-&nbsp;Synology&nbsp;DiskStation" />
<meta name="msapplication-TileColor" content="#246BB3"/>
<meta name="description" content="DiskStation 提供功能完整的网络存储 (NAS) 解决方案,可让您轻松管理及备份数据,并在 Windows、Mac 及 Linux 计算机之间分享数据。" />
<meta name="keywords" content="多任务处理,网页应用程序,个人云端" />

<link rel="apple-touch-icon" href="webman/resources/images/icon_dsm_96.png?v=4398" />
<link rel="mask-icon" href="webman/safari_pin_icon.svg" color="#0086E5" />
<link rel="shortcut icon" href="webman/favicon.ico?v=4399" />
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_96.png?v=4398" sizes="96x96"/>
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_64.png?v=4398" sizes="64x64"/>
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_48.png?v=4398" sizes="48x48"/>
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_32.png?v=4398" sizes="32x32"/>
<link rel="shortcut icon" href="webman/resources/images/icon_dsm_16.png?v=4398" sizes="16x16"/>
<title>dms&nbsp;-&nbsp;Synology&nbsp;DiskStation</title>
<link rel="stylesheet" type="text/css" href="scripts/ext-3/resources/css/ext-all.css?v=1526696808" />
<link rel="stylesheet" type="text/css" href="scripts/ext-3/resources/css/xtheme-gray.css?v=1526696808" />
<link rel="stylesheet" type="text/css" href="scripts/ext-3/ux/ux-all.css?v=1526696808" />
<link rel="stylesheet" type="text/css" href="synoSDSjslib/sds.css?v=1526696819" />
<link rel="stylesheet" type="text/css" href="webman/resources/css/desktop.css?v=1526696830" />
<style type="text/css">
@import url("webman/modules/WelcomeTip/style.css?v=1526696830");
@import url("webman/modules/BandwidthControl/style.css?v=1526696988");
@import url("webman/modules/DataDrivenDocuments/style.css?v=1526696829");
@import url("webman/modules/Utils/style.css?v=1526696914");
@import url("webman/modules/LogCenter/style.css?v=1526696869");
@import url("webman/modules/WelcomeApp/style.css?v=1526696830");
@import url("webman/modules/AviaryEditor/style.css?v=1526696829");
@import url("webman/modules/TaskSchedulerWidget/style.css?v=1526696830");
@import url("webman/modules/SystemInfoApp/style.css?v=1526696829");
@import url("webman/modules/DSMNotify/style.css?v=1526696914");
@import url("webman/modules/HAManager/style.css?v=1526696917");
@import url("webman/modules/LicenseManager/style.css?v=1526696957");
@import url("webman/modules/TaskSchedulerUtils/style.css?v=1526696914");
@import url("webman/modules/StorageManager/style.css?v=1526696829");
@import url("webman/modules/Share/style.css?v=1526696914");
@import url("webman/modules/AdminCenter/style.css?v=1526696905");
@import url("webman/modules/PollingTask/style.css?v=1526696914");
@import url("webman/modules/EzInternet/style.css?v=1526696830");
@import url("webman/modules/SupportForm/style.css?v=1526696914");
@import url("webman/modules/HAMessageHandler/style.css?v=1526696830");
@import url("webman/modules/ThumbConvertProgress/style.css?v=1526697038");
@import url("webman/modules/Widgets/style.css?v=1526696830");
@import url("webman/modules/MyDSCenter/style.css?v=1526696914");
@import url("webman/modules/C3/style.css?v=1526696829");
@import url("webman/modules/HelpBrowser/style.css?v=1526696914");
@import url("webman/modules/PkgManApp/style.css?v=1526696914");
@import url("webman/modules/SecurityScan/style.css?v=1526696884");
@import url("webman/modules/ResourceMonitor/style.css?v=1526696829");
@import url("webman/modules/ConfigBackup/style.css?v=1526697363");
@import url("webman/modules/VideoPlayer2/style.css?v=1526696962");
</style>
<style type="text/css">
@import url("webman/modules/ClipBoardJS/style.css?v=1526696914");
@import url("webman/modules/AudioPlayer/style.css?v=1526696914");
@import url("webman/modules/FileTaskMonitor/style.css?v=1532576714");
@import url("webman/modules/DiskMessageHandler/style.css?v=1526696830");
@import url("webman/modules/PhotoViewer/style.css?v=1526696914");
@import url("webman/modules/FileBrowser/style.css?v=1532576719");
@import url("webman/modules/HotkeyManager/style.css?v=1526696829");
@import url("webman/modules/ExternalDevices/style.css?v=1526696829");
@import url("webman/modules/PersonalSettings/style.css?v=1526696914");
</style>
<link rel="stylesheet" type="text/css" href="webman/3rdparty/Docker/style.css?v=1567738491" />
<link rel="stylesheet" type="text/css" href="webman/3rdparty/SynoFinder/style.css?v=1525083208" />
<link rel="stylesheet" type="text/css" href="webman/3rdparty/DownloadStation/style.css?v=1553083127" />
<link rel="stylesheet" type="text/css" href="webman/3rdparty/AudioStation/style.css?v=1526265385" />
<link rel="stylesheet" type="text/css" href="webman/3rdparty/VideoStation/style.css?v=1559639502" />

</head>
<body role="application">
<div id="sds-wallpaper"></div>
<!-- Don't contain any text node to avoid IE insertBefore bug -->
<div id="sds-login-dialog-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="login-form" class="x-plain-body" method="POST" action="webman/login.cgi" target="login_iframe"><input type="text" class="x-form-text" id="login_username" name="username" maxlength="256" /><input type="password" class="x-form-text" id="login_passwd" name="passwd" maxlength="256" autocomplete="off" /><input class="x-form-text" type="text" id="login_otp" name="OTPcode" maxlength="8" autocomplete="off" /><input type="submit" id="login_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="login_iframe" name="login_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
<div id="sds-apply-preview-form" style="position: absolute; top: -10000px; left: -10000px;"><form id="preview-form" class="x-plain-body" method="POST" action="webman/modules/ControlPanel/modules/dsm.cgi" target="preview_iframe"><input type="submit" id="preview_submit" style="position: absolute; top: -10000px; left: -10000px;" tabindex="-1" /></form><iframe id="preview_iframe" name="preview_iframe" width="0" height="0" frameborder="0" style="display: none;"></iframe></div>
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.Defs&version=1&method=getjs&v=1575039899"></script>
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.JSUIString&version=1&method=getjs&lang=chs&v=1574516079"></script>
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.UIString&version=1&method=getjs&lang=chs&v=1574516079"></script>
<script type="text/javascript" src="scripts/prototype-1.7.2/prototype.js?v=1526696808"></script>
<script type="text/javascript" src="scripts/ext-3/adapter/ext/ext-base.js?v=1526696808"></script>
<script type="text/javascript" src="scripts/ext-3/ext-all.js?v=1526696808"></script>
<script type="text/javascript" src="scripts/ext-3/ux/ux-all.js?v=1526696808"></script>
<script type="text/javascript" src="scripts/scrollbar/flexcroll.js?v=1526696808"></script>
<script type="text/javascript" src="synoSDSjslib/sds.js?v=1526696819"></script>
<script type="text/javascript" src="webman/desktop.js?v=1526696829"></script>
<script type="text/javascript" src="webapi/entry.cgi?api=SYNO.Core.Desktop.SessionData&version=1&method=getjs&SynoToken=&v=1526696812"></script>

<script type="text/javascript" src="webman/security.cgi"></script>
<div class="pre-load-x-window-br"></div>
</body>
<noscript><div class='syno-no-script'><div class='title align-center'>此页面无法显示</div><div class='desc align-center'>请让您的浏览器运行 JavaScript。</div><div class='icon align-center'></div></div></noscript>
</html>

  1. curl.exe --compressed --location --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134" --data "username=用户名" --data "passwd=密码" --data "OTPcode=otpcode" "http://群晖url/webman/login.cgi"
复制代码
微信:flashercs
QQ:49908356

TOP

回复 2# flashercs

只要一行代码吗?执行没有反映!

TOP

回复 3# xie989

你是要用IE浏览器打开群晖 并自动输入用户 密码 otpcode 然后登陆成功吗?
微信:flashercs
QQ:49908356

TOP

对,就是这个功能。但协议是https://的,还有个不安全提示

TOP

返回列表