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
2
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
blockchain
contrib
Merge requests
!2
sellar.bat para sellar desde ms-windows
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
sellar.bat para sellar desde ms-windows
rbidegain/contrib:undefined
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Open
Rafael Bidegain
requested to merge
rbidegain/contrib:undefined
into
master
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
👍
1
👎
0
Merge request reports
Compare
master
master (HEAD)
and
latest version
latest version
90f74a21
1 commit,
4 years ago
1 file
+
51
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
sellar.bat
0 → 100644
+
51
−
0
Options
@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
Loading