This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Set Printer IP --------- | |
SET PRINTERIP="192.168.0.47" | |
REM ------------------------ | |
ECHO OFF | |
CLS | |
IF [%1] == [] GOTO :no_file | |
FOR /F tokens^=4^ delims^=^" %%a in ('C:\windows\System32\curl.exe -s -X ^"POST^" http://%PRINTERIP%:8080/api/v1/connect') DO (SET TOKEN=%%a) | |
ECHO Token is: %TOKEN% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<style> | |
#fileselector, #upload {display: none;} | |
</style> | |
<form id="fileform"> | |
<input type="button" id="connect" value="Connect"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import argparse | |
import os.path | |
import sys | |
debug = False | |
# if debug = True, ignore command line arguments and use the following: | |
ip = "192.168.0.47" | |
port = 8080 |