Comments (7)
Thanks @CodeMaxx.
from zsc.
Hi Brian,
Thanks for your report, First I want just notice that you can grep the payloads by witn own zsc command
python zsc.py --show-payloads linux_x86
here are more samples:
Search windows_x86 shellcodes: python zsc.py --show-payloads windows_x86
(this need exact os name or you can use pattern)
or search a word with pattern:
python zsc.py -l windows*
python zsc.py -l *exec*
python zsc.py -l *xor_random
That's weird, I don't have problem with python zsc.py --show-payloads *linux_x86/system/none
, but using grep will makes the problem!
- notice: to search a specific payload please use one or two star(s)
*
python zsc.py --show-payloads *linux_x86/system/none
python zsc.py --show-payloads linux_x86/system/none*
python zsc.py --show-payloads *linux_x86/system/none*
from zsc.
Hi Brian again, I've found this problem in here, it's because of \n
is end of the printing line.
the line is info(payload+'\n')
, if we go inside of info()
we can see:
def info(content):
sys.stdout.write(color.color('yellow') + '[+] ' + color.color('green') +
content + color.color('reset'))
return
it's color + content + color
but in our case is color + content + \n + color
, by using grep
we could catch the line which is including out search pattern linux_x86/system/none
and our lines are same:
color + content
reset color + color + content
reset color + color + content
reset color + color + content
as I referred this problem could be solved by using zsc --show-payloads *linux_x86/system/none*
or any solution for fixing this in info()
?
I was thinking about replacing \n
with reset color+\n
but it's not a good idea...
@sizzop @jowasp @Pratik151 @paraschetal @CodeMaxx any idea ?
from zsc.
@Ali-Razmjoo I'm unable to reproduce this. Ok now I can.
from zsc.
@Ali-Razmjoo What we can do is to modify the info()
function to remove \n
s at the end of content and add same no. of \n
after color.color('reset')
from zsc.
Hey Akash, I think one solution could be like this (check the last char if it's \n
and replace it with color.color('reset') + '\n'
):
def info(content):
content = content[:-1] + color.color('reset') + '\n' if (content[-1] == '\n') else content
sys.stdout.write(color.color('yellow') + '[+] ' + color.color('green') +
content + color.color('reset'))
return
I think content = content[:-1] + color.color('reset') + '\n' if (content[-1] == '\n') else content
should be add to all stdout functions, or if anyone have better idea ?
from zsc.
@Ali-Razmjoo Yeah thats exactly what I mean ... except that we count the newline characters at the end of content
because if there are multiple newlines then we need to remove all of them.
Number of newline chars at the end = len(content) - len(content.rstrip("\n"))
from zsc.
Related Issues (20)
- obfuscate: no validation on file type HOT 1
- No tab completion when calling ZSC from different directory HOT 3
- shell-storm download mangles quotes HOT 2
- shell-storm search changes contexts HOT 1
- Confusing addition to `help` command HOT 3
- Implement continuous integration with travis HOT 1
- After one has choosen obfuscate and then the language there is no way to go back to change language HOT 1
- OWASP Code Sprint 2017 HOT 1
- issue in php encoders HOT 1
- Update fails HOT 12
- It is impossible to exit/quit/back in shellcode download menu. HOT 1
- Obfuscate other sources code? HOT 1
- can close
- how to obfuscate with this? HOT 1
- ZSC made nothing HOT 5
- output shellcode file not showing the shellcode after obfuscate method
- compiling HOT 4
- Proof of code obfuscation functionality HOT 8
- Can not update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zsc.