Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
contrib
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rafael Bidegain
contrib
Commits
db6aeb46
Commit
db6aeb46
authored
4 years ago
by
Rafael Bidegain
Browse files
Options
Downloads
Patches
Plain Diff
sellar.bat, para sellar desde ms-windows
parent
2ccda06b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sellar.bat
+51
-0
51 additions, 0 deletions
sellar.bat
with
51 additions
and
0 deletions
sellar.bat
0 → 100644
+
51
−
0
View file @
db6aeb46
@echo
off
rem sellar.bat
rem sella un archivo en la BFA
rem Autor: Rafael Bidegain rbidegain@loteriadelaciudad.gob.ar
rem 04 de mayo de 2021
rem Licencia GPLv2-only
rem Este script fue dessarrollado observando tsa2.sh de Robert Martin-Legene
rem
rem controlo la llamada al verificar.bat tenga un parametro
if
[
%
1
]==[]
(
echo
falta
el
archivo
para
sellar
echo
sellar
file
.xml
goto
fin
)
rem controlo el parametro corresponda a un archivo que existe
IF
NOT
EXIST
%
1
(
echo
no
existe
el
archivo
[
%
1
]
para
sellar
goto
fin
)
rem elimino el archivo sha.txt usado en otra oportunidad
IF
EXIST
sha
.txt
(
del
sha
.txt
)
rem obtengo el hash sha256 del archivo y lo guardo en sha.txt
bin
\sha256sum
%
1
|
bin
\awk
"{print $1}"
>
sha
.txt
rem seteo la variable SHA con el hash sha256 del archivo
set
/p
SHA
=<
sha
.txt
rem controlo la variable SHA
if
[
%SHA%
]==[]
(
echo
fallo
al
generar
el
hash
sha256
.
goto
fin
)
rem creo el archivo sellar.json
echo
{
"hashes"
:
[
"
%SHA%
"
]}
>
sellar
.json
rem sello el archivo enviando el hash sha256
bin
\curl
--header
"Content-Type: application/json"
--data
@sellar.json
https
://tsa2.buenosaires.gob.ar/stamp
rem envío un salto de linea a la consola
echo
.
:fin
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment