This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Projects/jawa2(branch:dev*) » python examples/disassemble.py ../minecraft/ajk.class tyler@jawa | |
; ---------------------------------------------- constant pool | |
; ------------------------------------------------- total: 118 | |
; 0001: ConstantFloat(value='ConstantFloat') | |
; 0002: ConstantFloat(value='ConstantFloat') | |
; 0003: ConstantFloat(value='ConstantFloat') | |
; 0004: ConstantFloat(value='ConstantFloat') | |
; 0005: ConstantFloat(value='ConstantFloat') | |
; 0006: ConstantClass(name=ConstantUTF8(value='aco')) | |
; 0007: ConstantClass(name=ConstantUTF8(value='aig')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == '__main__': | |
import sys | |
from jawa import JarFile, ConstantString | |
try: | |
from cStringIO import StringIO | |
except ImportError: | |
from StringIO import StringIO | |
with JarFile(sys.argv[1]) as jf: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gevent | |
from utopia import Network | |
def join_channels(event, *args): | |
event.origin.send('join', '#botwar') | |
network = Network('Freenode') | |
network.servers.add_server('irc.freenode.net', 6667) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
__all__ = ('Flags',) | |
import struct | |
class Flags(object): | |
""" | |
Convience class for handling bit flags. | |
""" | |
def __init__(self, binary_format, flags): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClassFlags(Flags): | |
""" | |
:class:~jawa.classfile.ClassFile access flags. | |
""" | |
def __init__(self): | |
super(ClassFlags, self).__init__('>H', { | |
'acc_public': 0x0001, | |
'acc_final': 0x0010, | |
'acc_super': 0x0020, | |
'acc_interface': 0x0200, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SU = "0" | |
#Region | |
#AutoIt3Wrapper_UseUpx=n | |
#AutoIt3Wrapper_res_requestedExecutionLevel=asInvoker | |
#EndRegion | |
Global Const $137 = 1 | |
Global Const $140 = 24 | |
Global Const $139 = -268435456 | |
Global Const $105 = 4 | |
Global Const $106 = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You now own BRINK, BRINK Spec Ops DLC, BRINK Psycho Ops DLC, BRINK Doom Pack | |
DLC, BRINK Fallout Pack DLC, Brink Agents of Change DLC, Fallout: New Vegas, | |
Hunted: The Demon's Forge, Fallout New Vegas CaravanPack, Fallout New Vegas | |
ClassicPack, Fallout New Vegas: Courier's Stash, Fallout New Vegas TribalPack, | |
GECK - New Vegas Edition, Fallout New Vegas: Dead Money, Fallout New Vegas: | |
Honest Hearts, Fallout New Vegas Old World Blues, Fallout New Vegas: Lonesome | |
Road DLC, Fallout New Vegas: Gun Runners' Arsenal, The Elder Scrolls V: | |
Skyrim, Creation Kit, Medieval II: Total War, Rome: Total War Gold Edition, | |
Rome: Total War - Alexander, Medieval II: Total War Kingdoms, Empire: Total | |
War, Empire: Total War - Special Forces Unit, Empire: Total War - Dahomey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement | |
import os | |
import sys | |
import random | |
import getopt | |
import string | |
from itertools import repeat | |
from urllib2 import Request, urlopen, URLError, HTTPError | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
import sys | |
import json | |
import getopt | |
from jawa.core.jf import JarFile | |
from jawa.core.constants import ConstantClass, ConstantFieldRef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================================================== | |
ERROR: test_save (__main__.CreationTest) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "tests/creation_test.py", line 35, in test_save | |
self.nbt.save('__test__.nbt') | |
File "/home/tyler/Projects/PyNBT/pynbt/nbt.py", line 307, in save | |
g = gzip.GzipFile(fileobj=f, mode='wb') if compressed else f | |
File "/usr/lib/python3.2/gzip.py", line 201, in __init__ | |
self._write_gzip_header() |