Skip to content

s-3ntinel/imgjs_polygloter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Polyglot

This program can craft a valid image that is simultaneously a valid and executable javascript file (polyglot). Its main use is to bypass CSP.

Main inspiration came from this article.

https://portswigger.net/research/bypassing-csp-using-polyglot-jpegs

Usage

JPG

./img_polygloter.py jpg --height 123 --width 321 --payload "alert(document.domain);" --output jpg_poly.js

GIF

./img_polygloter.py gif --payload "alert(document.domain);" --output gif_poly.js

TODO

  • gif dimensions, if possible
  • png crafting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages