From d22edd0483b8f4b3601f0d7ca71742c69fb71a68 Mon Sep 17 00:00:00 2001 From: Rolly Maulana Awangga Date: Tue, 20 Jun 2023 11:51:48 +0700 Subject: [PATCH 1/6] first --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index eee2a54..5d258f7 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - Issues | Support HelpDesk + Lapor Insiden | Acad CSIRT @@ -93,7 +93,7 @@

- Support + Lapor

Customizer

- Help & Support + Help & Lapor
  • @@ -342,13 +342,13 @@

    Customizer

    -

    Buat Issues Baru

    +

    Lapor Insiden

    - +
    @@ -385,7 +385,7 @@

    Customizer

    - +
    From abe6f7cc8efd1bad10b4da9ad3801be1ffb15a34 Mon Sep 17 00:00:00 2001 From: Rolly Maulana Awangga Date: Tue, 20 Jun 2023 11:55:25 +0700 Subject: [PATCH 2/6] kirim laporan --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5d258f7..bc9ba63 100644 --- a/index.html +++ b/index.html @@ -390,7 +390,7 @@

    Customizer

    - +
    From 865272b76e2b0a5a8e160a2ccad88912bbce51f0 Mon Sep 17 00:00:00 2001 From: Rolly Maulana Awangga Date: Tue, 20 Jun 2023 16:02:55 +0700 Subject: [PATCH 3/6] markicob --- index.html | 4 +-- js/controller/bot.js | 1 + js/controller/issues.js | 80 +++++++++++++++-------------------------- 3 files changed, 31 insertions(+), 54 deletions(-) create mode 100644 js/controller/bot.js diff --git a/index.html b/index.html index bc9ba63..0540174 100644 --- a/index.html +++ b/index.html @@ -346,7 +346,7 @@

    Customizer

    -
    +
    @@ -447,7 +447,7 @@

    --> - + diff --git a/js/controller/bot.js b/js/controller/bot.js new file mode 100644 index 0000000..17f4a11 --- /dev/null +++ b/js/controller/bot.js @@ -0,0 +1 @@ +const _0x5b2a08=_0x3e21;(function(_0x3aa218,_0x4f411f){const _0x409f27=_0x3e21,_0x1c56af=_0x3aa218();while(!![]){try{const _0x19fdd0=-parseInt(_0x409f27(0xc0))/0x1*(parseInt(_0x409f27(0xbe))/0x2)+-parseInt(_0x409f27(0xbb))/0x3+parseInt(_0x409f27(0xb9))/0x4*(parseInt(_0x409f27(0xbc))/0x5)+-parseInt(_0x409f27(0xba))/0x6*(parseInt(_0x409f27(0xb8))/0x7)+-parseInt(_0x409f27(0xbf))/0x8+-parseInt(_0x409f27(0xb5))/0x9+parseInt(_0x409f27(0xb7))/0xa*(parseInt(_0x409f27(0xbd))/0xb);if(_0x19fdd0===_0x4f411f)break;else _0x1c56af['push'](_0x1c56af['shift']());}catch(_0x5f366b){_0x1c56af['push'](_0x1c56af['shift']());}}}(_0x29e2,0x964a7));function _0x29e2(){const _0x3a5a82=['1620996MPeTrV','5hNSmIj','112409EEfQGt','50dFuuUo','7597288aQyCxB','35922pbGciR','594441ldHPhh','Z2l0aHViX3BhdF8xMUJBV041RFEwNHhmNmFubnI2aGhxX21MU0J2bkVOZ05RUndRMmVtTVpiTXVkb1RtRktDbTlMME9DNkJ0ckJidjJMSjU0NFJLU3VMUkp3Z040','2390LOQFSX','931RPvAbd','4660244HyGXHf','24258FRgppS'];_0x29e2=function(){return _0x3a5a82;};return _0x29e2();}function _0x3e21(_0x48f0e5,_0x49c809){const _0x29e227=_0x29e2();return _0x3e21=function(_0x3e2141,_0x462aa2){_0x3e2141=_0x3e2141-0xb5;let _0x47ed89=_0x29e227[_0x3e2141];return _0x47ed89;},_0x3e21(_0x48f0e5,_0x49c809);}export const iteungbot=_0x5b2a08(0xb6); \ No newline at end of file diff --git a/js/controller/issues.js b/js/controller/issues.js index 76a11bf..a97ac4f 100644 --- a/js/controller/issues.js +++ b/js/controller/issues.js @@ -1,55 +1,31 @@ - -import { Octokit } from "https://cdn.skypack.dev/@octokit/core"; import Swal from "https://cdn.skypack.dev/sweetalert2@11.1.2"; - -document.addEventListener('DOMContentLoaded', () => { - const uhuy = 'Z2hwX2lmVW94RGVyaWdxWDdicXg4RzdFNklMczlQTUtGVTJnaVlZZg=='; - const octokit = new Octokit({ - auth: atob(uhuy) - }); - - const form = document.getElementById('issuesform'); - - form.addEventListener('submit', async (e) => { - e.preventDefault(); - - const title = document.getElementById('inputtittle').value; - const body = document.getElementById('inputbody').value; - const milestone = parseInt(document.getElementById('inputmilestone').value); - const assigneeSelect = document.getElementById('inputassigness'); - const assignees = [assigneeSelect.options[assigneeSelect.selectedIndex].value]; - - const labelsSelect = document.getElementById('inputlabels'); - const labels = Array.from(labelsSelect.selectedOptions, option => option.value); - - - try { - const response = await octokit.request('POST /repos/dtiulbi/question-ticketing/issues', { - owner: 'dtiulbi', - repo: 'question-ticketing', - title, - assignees, - milestone, - labels, - body, - headers: { - 'X-GitHub-Api-Version': '2022-11-28', - 'Accept': 'application/vnd.github.v3+json' - - } - }); - console.log('Issue created:', response); - showModal('Pengajuan Tiket Layanan Akan Proses', response); - - } catch (error) { - console.error('Failed to create issue:', error); - showModalerror('Gagal Mengirim Pengajuan Pastikan Sudah Diisi Semua', error); - - } - }); - }); - - function showModal(message) { +import {onClick,getValue} from "https://jscroot.github.io/element/croot.js"; +import {postWithBearer} from "https://jscroot.github.io/api/github.js"; +import { iteungbot } from "./bot.js"; + +onClick("submitButton",kirimIssues); + +function kirimIssues(){ + let data = { + title : getValue("inputtittle"), + assignees : [getValue("inputassigness")], + milestone : Number(getValue("inputmilestone")), + labels : [getValue("inputlabels")], + body : getValue("inputbody"), + } + postWithBearer("https://api.github.com/repos/acadcsirt/lapor/issues",atob(iteungbot),data,responseFunction) +} + +function responseFunction(response){ + console.log('Issue created:', response); + if(response.message === "Validation Failed"){ + showModalerror('Gagal Mengirim Laporan Pastikan Sudah Diisi Semua ' + response.errors[0].code); + } else{ + showModal('ID Laporan ' + response.id); + } +} + +function showModal(message) { Swal.fire({ title: 'Selamat!', text: message, @@ -60,7 +36,7 @@ document.addEventListener('DOMContentLoaded', () => { }); } - function showModalerror(message, error) { +function showModalerror(message, error) { Swal.fire({ icon: 'error', title: 'Oops...', From f115091f75f88fa6463267acab0370788d01bed0 Mon Sep 17 00:00:00 2001 From: Rolly Maulana Awangga Date: Wed, 21 Jun 2023 05:40:02 +0700 Subject: [PATCH 4/6] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 75aaecc..7af97a9 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ # Support TIK + +Session gh init +```sh +user_session +__Host-user_session_same_site + centang secure +``` From 1f8849018a1ac0ecd0c4b6a2b6cc6cbddee05954 Mon Sep 17 00:00:00 2001 From: Rolly Maulana Awangga Date: Wed, 21 Jun 2023 05:43:09 +0700 Subject: [PATCH 5/6] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7af97a9..d5ea3ed 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,6 @@ user_session __Host-user_session_same_site centang secure ``` + +![image](https://github.com/acadcsirt/lapor/assets/11188109/08458fda-8991-4dd5-8331-255f6a61afff) + From ce72771cd421eba0ce27e6d4f60296462a58c35f Mon Sep 17 00:00:00 2001 From: Rolly Maulana Awangga Date: Wed, 21 Jun 2023 05:45:30 +0700 Subject: [PATCH 6/6] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d5ea3ed..6aa8f47 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,14 @@ __Host-user_session_same_site ![image](https://github.com/acadcsirt/lapor/assets/11188109/08458fda-8991-4dd5-8331-255f6a61afff) +```sh +_gh_sess +tz +dotcom_user +logged_in +has_recent_activity +_device_id +preferred_color_mode +color_mode +_octo +```